summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2016-01-20 10:04:33 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2016-01-20 10:04:33 +0000
commit9732d004dd37617112977d1c58356900866f1f89 (patch)
treed8d8b6ac44cc730a5c972a6097e3d89be2623112 /sys/dev
parent20b59cc3db7d50395bc9677a300e26f77c1fd062 (diff)
Don't bump output errors when when tx ring is full
Reported by Jonathon Sisson <openbsd at j3z ! org>, thanks!
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pv/if_xnf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/pv/if_xnf.c b/sys/dev/pv/if_xnf.c
index 61a3fb1c810..8c2832441db 100644
--- a/sys/dev/pv/if_xnf.c
+++ b/sys/dev/pv/if_xnf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xnf.c,v 1.8 2016/01/19 17:16:19 mikeb Exp $ */
+/* $OpenBSD: if_xnf.c,v 1.9 2016/01/20 10:04:32 mikeb Exp $ */
/*
* Copyright (c) 2015, 2016 Mike Belopuhov
@@ -492,10 +492,8 @@ xnf_encap(struct xnf_softc *sc, struct mbuf *m, uint32_t *prod)
bus_dmamap_t dmap;
int error, i, n = 0;
- if ((XNF_TX_DESC - (*prod - sc->sc_tx_cons)) < XNF_TX_FRAG) {
- error = ENOENT;
- goto errout;
- }
+ if ((XNF_TX_DESC - (*prod - sc->sc_tx_cons)) < XNF_TX_FRAG)
+ return (ENOENT);
i = *prod & (XNF_TX_DESC - 1);
dmap = sc->sc_tx_dmap[i];