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_em.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_em.c')
-rw-r--r-- | sys/dev/e1000/if_em.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 516e84b..242d877 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -3835,8 +3835,7 @@ em_txeof(struct tx_ring *txr) EM_TX_LOCK_ASSERT(txr); #ifdef DEV_NETMAP - if (netmap_tx_irq(ifp, txr->me | - (NETMAP_LOCKED_ENTER | NETMAP_LOCKED_EXIT))) + if (netmap_tx_irq(ifp, txr->me)) return; #endif /* DEV_NETMAP */ @@ -4352,7 +4351,7 @@ em_initialize_receive_unit(struct adapter *adapter) * preserve the rx buffers passed to userspace. */ if (ifp->if_capenable & IFCAP_NETMAP) - rdt -= NA(adapter->ifp)->rx_rings[i].nr_hwavail; + rdt -= nm_kr_rxspace(&NA(adapter->ifp)->rx_rings[i]); #endif /* DEV_NETMAP */ E1000_WRITE_REG(hw, E1000_RDT(i), rdt); } @@ -4431,8 +4430,10 @@ em_rxeof(struct rx_ring *rxr, int count, int *done) EM_RX_LOCK(rxr); #ifdef DEV_NETMAP - if (netmap_rx_irq(ifp, rxr->me | NETMAP_LOCKED_ENTER, &processed)) + if (netmap_rx_irq(ifp, rxr->me, &processed)) { + EM_RX_UNLOCK(rxr); return (FALSE); + } #endif /* DEV_NETMAP */ for (i = rxr->next_to_check, processed = 0; count != 0;) { |