Skip to content

Commit cf60773

Browse files
committed
Don't call ifq_restart() if no tx descriptor is completed when it's
OACTIVE. ok dlg
1 parent cf3669d commit cf60773

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sys/dev/pci/if_vmx.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: if_vmx.c,v 1.92 2025/03/05 06:51:25 dlg Exp $ */
1+
/* $OpenBSD: if_vmx.c,v 1.93 2025/06/19 09:36:21 yasuoka Exp $ */
22

33
/*
44
* Copyright (c) 2013 Tsubai Masanari
@@ -1050,6 +1050,7 @@ vmxnet3_txintr(struct vmxnet3_softc *sc, struct vmxnet3_txqueue *tq)
10501050
struct mbuf *m;
10511051
u_int prod, cons, next;
10521052
uint32_t rgen;
1053+
unsigned int done = 0;
10531054

10541055
prod = ring->prod;
10551056
cons = ring->cons;
@@ -1085,6 +1086,7 @@ vmxnet3_txintr(struct vmxnet3_softc *sc, struct vmxnet3_txqueue *tq)
10851086
cons = (letoh32(txcd->txc_word0) >> VMXNET3_TXC_EOPIDX_S) &
10861087
VMXNET3_TXC_EOPIDX_M;
10871088
cons++;
1089+
done = 1;
10881090
cons %= NTXDESC;
10891091
} while (cons != prod);
10901092

@@ -1095,7 +1097,7 @@ vmxnet3_txintr(struct vmxnet3_softc *sc, struct vmxnet3_txqueue *tq)
10951097
comp_ring->gen = rgen;
10961098
ring->cons = cons;
10971099

1098-
if (ifq_is_oactive(ifq))
1100+
if (done && ifq_is_oactive(ifq))
10991101
ifq_restart(ifq);
11001102
}
11011103

0 commit comments

Comments
 (0)