we need to always schedule another rx ring refill callout in case we fail to do it at the spot. previously what would happen is that say we have 2 clusters on the rx ring and we schedule an rxrefill callout that fails to update the ring. then we still have those 2 clusters around. under heavy load ix (82598 specifically) would stall and stop producing rx interrupts until you send a packet: it would trigger an rxrefill and unstick the rx ring.
this also explains the "< 2" nonsense that i've argued for in the past. ok? diff --git dev/pci/if_ix.c dev/pci/if_ix.c index 8ab83f8..02e5315 100644 --- dev/pci/if_ix.c +++ dev/pci/if_ix.c @@ -961,8 +961,8 @@ ixgbe_legacy_irq(void *arg) /* Advance the Rx Queue "Tail Pointer" */ IXGBE_WRITE_REG(&sc->hw, IXGBE_RDT(que->rxr->me), que->rxr->last_desc_filled); - } else if (que->rxr->rx_ndescs < 2) - timeout_add(&sc->rx_refill, 0); + } else + timeout_add(&sc->rx_refill, 1); } if (ifp->if_flags & IFF_RUNNING && !IFQ_IS_EMPTY(&ifp->if_snd)) @@ -2747,7 +2747,7 @@ ixgbe_rxrefill(void *xsc) /* Advance the Rx Queue "Tail Pointer" */ IXGBE_WRITE_REG(&sc->hw, IXGBE_RDT(que->rxr->me), que->rxr->last_desc_filled); - } else if (que->rxr->rx_ndescs < 2) + } else timeout_add(&sc->rx_refill, 1); splx(s); }