summaryrefslogtreecommitdiff
path: root/sys/dev/pv
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2017-07-17 16:01:25 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2017-07-17 16:01:25 +0000
commitefdd0d0949d5c07e009155353a00ddfdf03597cf (patch)
treeb3f168f795ebcb04118ed0b125712c8e0af03aa1 /sys/dev/pv
parentade3dd0744f62830748a8fed15ace1b0811e2317 (diff)
Pick the correct TX buffer when unrolling
Diffstat (limited to 'sys/dev/pv')
-rw-r--r--sys/dev/pv/if_xnf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pv/if_xnf.c b/sys/dev/pv/if_xnf.c
index fb7ca80f3b0..2b24fe994f6 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.59 2017/07/17 15:58:22 mikeb Exp $ */
+/* $OpenBSD: if_xnf.c,v 1.60 2017/07/17 16:01:24 mikeb Exp $ */
/*
* Copyright (c) 2015, 2016 Mike Belopuhov
@@ -654,7 +654,7 @@ xnf_encap(struct xnf_softc *sc, struct mbuf *m_head, uint32_t *prod)
for (; *prod != oprod; (*prod)--) {
i = (*prod - 1) & (XNF_TX_DESC - 1);
txd = &txr->txr_desc[i];
- id = --sc->sc_tx_next & (XNF_TX_DESC - 1);
+ id = txd->txd_req.txq_id;
txb = &sc->sc_tx_buf[id];
memset(txd, 0, sizeof(*txd));