Index: sys/dev/ixgbe/if_ix.c =================================================================== --- sys/dev/ixgbe/if_ix.c +++ sys/dev/ixgbe/if_ix.c @@ -2113,8 +2113,10 @@ static inline void ixgbe_perform_aim(struct adapter *adapter, struct ix_rx_queue *que) { - uint32_t newitr = 0; + struct ix_tx_queue *txq = &adapter->tx_queues[que->msix]; + struct tx_ring *txr = &txq->txr; struct rx_ring *rxr = &que->rxr; + uint32_t newitr = 0; /* * Do Adaptive Interrupt Moderation: @@ -2129,12 +2131,14 @@ que->eitr_setting = 0; /* Idle, do nothing */ - if (rxr->bytes == 0) { + if ((txr->bytes == 0) && (rxr->bytes == 0)) { return; } + if ((txr->bytes) && (txr->packets)) + newitr = txr->bytes / txr->packets; if ((rxr->bytes) && (rxr->packets)) { - newitr = (rxr->bytes / rxr->packets); + newitr = max(newitr, rxr->bytes / rxr->packets); } newitr += 24; /* account for hardware frame, crc */ @@ -2158,6 +2162,8 @@ que->eitr_setting = newitr; /* Reset state */ + txr->bytes = 0; + txr->packets = 0; rxr->bytes = 0; rxr->packets = 0;