dummynet dropping too many packets

rihad rihad at mail.ru
Thu Oct 15 08:13:32 UTC 2009


For now we've mostly disabled dummynet and the drops have stopped, 
thanks to some extra unused bandwidth we have. But this isn't a real 
solution, of course, so this weekend I'm going to try the suggestion 
made by Robert Watson:

 > In the driver init code in if_bce, the following code appears:
 >
 >         ifp->if_snd.ifq_drv_maxlen = USABLE_TX_BD;
 >         IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen);
 >         IFQ_SET_READY(&ifp->if_snd);
 >
 > Which evaluates to a architecture-specific value due to varying 
pagesize.  You might just try forcing it to 1024.

But I've looked in /sys/dev/bce/if_bcereg.h of our FreeBSD 7.1 source 
code and found this:

#define TX_PAGES        2
#define TOTAL_TX_BD_PER_PAGE  (BCM_PAGE_SIZE / sizeof(struct tx_bd))
#define USABLE_TX_BD_PER_PAGE (TOTAL_TX_BD_PER_PAGE - 1)
#define TOTAL_TX_BD (TOTAL_TX_BD_PER_PAGE * TX_PAGES)
#define USABLE_TX_BD (USABLE_TX_BD_PER_PAGE * TX_PAGES)
#define MAX_TX_BD (TOTAL_TX_BD - 1)

meaning that USABLE_TX_BD is expected to be smaller than MAX_TX_BD. What 
if MAX_TX_BD is itself way smaller than 1024, which I'll eventually set 
ifq_drv_maxlen to? Can a driver guru please comment on this? In a few 
days I'm going to try it anyway, and if the system locks up I'll just 
revert back to the original code, and order a darn expensive Intel 10 
Gige card,  but it won't hurt to ask beforehand.

TIA


More information about the freebsd-net mailing list