Skip to content
Browse files

bnx: Disable RX max BDs based interrupt moderation

The RX max coalesce BDs is limited to 255, which means that the chip will
generate ~5800 interrupts/s when it sinks 1.48Mpps tiny packets.  However,
interrupt rate at 4000Hz is already enough for the chip to sink 1.48Mpps
tiny packets, so ticks based RX interrupt moderation should be prefered.
  • Loading branch information...
1 parent 8a382fe commit 306e54983ee873f2ef1c55b94257b6b1f47c70d3 Sepherosa Ziehau committed
Showing with 5 additions and 3 deletions.
  1. +2 −2 sys/dev/netif/bnx/if_bnx.c
  2. +3 −1 sys/dev/netif/bnx/if_bnxvar.h
View
4 sys/dev/netif/bnx/if_bnx.c
@@ -1964,8 +1964,8 @@ bnx_attach(device_t dev)
sc->bnx_tx_coal_ticks = BNX_TX_COAL_TICKS_DEF;
sc->bnx_rx_coal_bds = BNX_RX_COAL_BDS_DEF;
sc->bnx_tx_coal_bds = BNX_TX_COAL_BDS_DEF;
- sc->bnx_rx_coal_bds_int = BNX_RX_COAL_BDS_DEF;
- sc->bnx_tx_coal_bds_int = BNX_TX_COAL_BDS_DEF;
+ sc->bnx_rx_coal_bds_int = BNX_RX_COAL_BDS_INT_DEF;
+ sc->bnx_tx_coal_bds_int = BNX_TX_COAL_BDS_INT_DEF;
/* Set up ifnet structure */
ifp->if_softc = sc;
View
4 sys/dev/netif/bnx/if_bnxvar.h
@@ -284,12 +284,14 @@ struct bnx_softc {
/* RX coalesce BDs */
#define BNX_RX_COAL_BDS_MIN 0
-#define BNX_RX_COAL_BDS_DEF 80
+#define BNX_RX_COAL_BDS_DEF 0
+#define BNX_RX_COAL_BDS_INT_DEF 80
#define BNX_RX_COAL_BDS_MAX 255
/* TX coalesce BDs */
#define BNX_TX_COAL_BDS_MIN 0
#define BNX_TX_COAL_BDS_DEF 128
+#define BNX_TX_COAL_BDS_INT_DEF 128
#define BNX_TX_COAL_BDS_MAX 255
#endif /* !_IF_BNXVAR_H_ */

0 comments on commit 306e549

Please sign in to comment.
Something went wrong with that request. Please try again.