Index: if_vmx.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_vmx.c,v retrieving revision 1.70 diff -u -p -r1.70 if_vmx.c --- if_vmx.c 11 Sep 2022 08:38:39 -0000 1.70 +++ if_vmx.c 28 Jul 2023 23:26:10 -0000 @@ -924,18 +924,20 @@ vmxnet3_txintr(struct vmxnet3_softc *sc, struct vmxnet3_txcompdesc *txcd; bus_dmamap_t map; struct mbuf *m; - u_int cons, next; + u_int prod, cons, next; uint32_t rgen; + prod = ring->prod; cons = ring->cons; - if (cons == ring->prod) + + if (cons == prod) return; next = comp_ring->next; rgen = comp_ring->gen; /* postread */ - for (;;) { + do { txcd = &comp_ring->txcd[next]; if ((txcd->txc_word3 & VMX_TXC_GEN) != rgen) break; @@ -958,7 +960,7 @@ vmxnet3_txintr(struct vmxnet3_softc *sc, VMXNET3_TXC_EOPIDX_M; cons++; cons %= NTXDESC; - } + } while (cons != prod); /* preread */ comp_ring->next = next;