From efdd0d0949d5c07e009155353a00ddfdf03597cf Mon Sep 17 00:00:00 2001 From: Mike Belopuhov Date: Mon, 17 Jul 2017 16:01:25 +0000 Subject: Pick the correct TX buffer when unrolling --- sys/dev/pv/if_xnf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/pv') 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)); -- cgit v1.2.3