dummynet dropping too many packets
rihad
rihad at mail.ru
Wed Oct 7 14:58:21 UTC 2009
Robert Watson wrote:
> 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.
>
In dev/bce/if_bcereg.h:
#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 ifq_drv_maxlen is expected to end up smaller than
MAX_TX_BD. What if MAX_TX_BD is itself way smaller than 1024?
More information about the freebsd-net
mailing list