diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2016-01-26 16:13:33 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2016-01-26 16:13:33 +0000 |
commit | b7faba758b4f2041967359148790af35d0d41eeb (patch) | |
tree | c45822a31deab587363680294c8454577c999b10 /sys/dev/pv | |
parent | 3e7b394ce9e7879ec16e72df11e27a88159c2da6 (diff) |
Rename _{req,rsp}_evt descriptor structure members to _{prod,cons}_event
Setting rxr_ and/or txr_cons_event value allows domU to delay completion
notification for receive and/or transmit ring to specified values of
consumer index. rxr_ and txr_prod_event values are updated by dom0 and
don't seem to hold any significance for us.
Diffstat (limited to 'sys/dev/pv')
-rw-r--r-- | sys/dev/pv/if_xnf.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/dev/pv/if_xnf.c b/sys/dev/pv/if_xnf.c index b053128b579..6375893928f 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.12 2016/01/25 10:46:54 mikeb Exp $ */ +/* $OpenBSD: if_xnf.c,v 1.13 2016/01/26 16:13:32 mikeb Exp $ */ /* * Copyright (c) 2015, 2016 Mike Belopuhov @@ -85,9 +85,9 @@ union xnf_rx_desc { struct xnf_rx_ring { uint32_t rxr_prod; - uint32_t rxr_req_evt; + uint32_t rxr_prod_event; uint32_t rxr_cons; - uint32_t rxr_rsp_evt; + uint32_t rxr_cons_event; uint32_t rxr_reserved[12]; union xnf_rx_desc rxr_desc[XNF_RX_DESC]; } __packed; @@ -124,9 +124,9 @@ union xnf_tx_desc { struct xnf_tx_ring { uint32_t txr_prod; - uint32_t txr_req_evt; + uint32_t txr_prod_event; uint32_t txr_cons; - uint32_t txr_rsp_evt; + uint32_t txr_cons_event; uint32_t txr_reserved[12]; union xnf_tx_desc txr_desc[XNF_TX_DESC]; } __packed; @@ -578,9 +578,9 @@ xnf_watchdog(struct ifnet *ifp) struct xnf_softc *sc = ifp->if_softc; struct xnf_tx_ring *txr = sc->sc_tx_ring; - printf("%s: tx prod %u cons %u,%u evt %u,%u\n", + printf("%s: tx stuck: prod %u cons %u,%u evt %u,%u\n", ifp->if_xname, txr->txr_prod, txr->txr_cons, sc->sc_tx_cons, - txr->txr_req_evt, txr->txr_rsp_evt); + txr->txr_prod_event, txr->txr_cons_event); } int @@ -617,7 +617,7 @@ xnf_txeof(struct xnf_softc *sc) if (pkts > 0) { sc->sc_tx_cons = cons; membar_producer(); - txr->txr_rsp_evt = cons + 1; + txr->txr_cons_event = cons + 1; pkts = 0; } @@ -715,7 +715,7 @@ xnf_rxeof(struct xnf_softc *sc) if (pkts > 0) { sc->sc_rx_cons = cons; membar_producer(); - rxr->rxr_rsp_evt = cons + 1; + rxr->rxr_cons_event = cons + 1; pkts = 0; } @@ -820,7 +820,7 @@ xnf_rx_ring_create(struct xnf_softc *sc) } sc->sc_rx_ref = sc->sc_rx_rmap->dm_segs[0].ds_addr; - sc->sc_rx_ring->rxr_req_evt = sc->sc_rx_ring->rxr_rsp_evt = 1; + sc->sc_rx_ring->rxr_prod_event = sc->sc_rx_ring->rxr_cons_event = 1; for (i = 0; i < XNF_RX_DESC; i++) { if (bus_dmamap_create(sc->sc_dmat, XNF_MCLEN, 1, @@ -924,7 +924,7 @@ xnf_tx_ring_create(struct xnf_softc *sc) } sc->sc_tx_ref = sc->sc_tx_rmap->dm_segs[0].ds_addr; - sc->sc_tx_ring->txr_req_evt = sc->sc_tx_ring->txr_rsp_evt = 1; + sc->sc_tx_ring->txr_prod_event = sc->sc_tx_ring->txr_cons_event = 1; for (i = 0; i < XNF_TX_DESC; i++) { if (bus_dmamap_create(sc->sc_dmat, XNF_MCLEN, sc->sc_tx_frags, |