diff options
author | luigi <luigi@FreeBSD.org> | 2014-02-18 05:01:04 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2014-02-18 05:01:04 +0000 |
commit | 5bacc3bb87b954978543b0d82a4d5705e33f5c06 (patch) | |
tree | a79f129924ca9cf087c1e108d2d184a16ac1e42b /sys/dev/e1000/if_igb.c | |
parent | dd5bb071cd203986ef23e5ceecdcef3cea848542 (diff) | |
download | FreeBSD-src-5bacc3bb87b954978543b0d82a4d5705e33f5c06.zip FreeBSD-src-5bacc3bb87b954978543b0d82a4d5705e33f5c06.tar.gz |
MFH: sync the netmap code with the one in HEAD
(enhanced VALE switch, netmap pipes, emulated netmap mode).
See details in the log for svn 261909.
Diffstat (limited to 'sys/dev/e1000/if_igb.c')
-rw-r--r-- | sys/dev/e1000/if_igb.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c index 0873daa..fe5c6ad 100644 --- a/sys/dev/e1000/if_igb.c +++ b/sys/dev/e1000/if_igb.c @@ -3961,8 +3961,7 @@ igb_txeof(struct tx_ring *txr) mtx_assert(&txr->tx_mtx, MA_OWNED); #ifdef DEV_NETMAP - if (netmap_tx_irq(ifp, txr->me | - (NETMAP_LOCKED_ENTER|NETMAP_LOCKED_EXIT))) + if (netmap_tx_irq(ifp, txr->me)) return (FALSE); #endif /* DEV_NETMAP */ @@ -4630,13 +4629,13 @@ igb_initialize_receive_units(struct adapter *adapter) * an init() while a netmap client is active must * preserve the rx buffers passed to userspace. * In this driver it means we adjust RDT to - * somthing different from next_to_refresh + * something different from next_to_refresh * (which is not used in netmap mode). */ if (ifp->if_capenable & IFCAP_NETMAP) { struct netmap_adapter *na = NA(adapter->ifp); struct netmap_kring *kring = &na->rx_rings[i]; - int t = rxr->next_to_refresh - kring->nr_hwavail; + int t = rxr->next_to_refresh - nm_kr_rxspace(kring); if (t >= adapter->num_rx_desc) t -= adapter->num_rx_desc; @@ -4826,8 +4825,10 @@ igb_rxeof(struct igb_queue *que, int count, int *done) BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); #ifdef DEV_NETMAP - if (netmap_rx_irq(ifp, rxr->me | NETMAP_LOCKED_ENTER, &processed)) + if (netmap_rx_irq(ifp, rxr->me, &processed)) { + IGB_RX_UNLOCK(rxr); return (FALSE); + } #endif /* DEV_NETMAP */ /* Main clean loop */ |