aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/netmap/netmap.c
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2013-11-05 00:56:07 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2013-11-05 00:56:07 +0000
commit954dca4c99eb4b2e2dd7b7791a1f1e5ce32b2dea (patch)
treed5ce89fdd8d10462d2f87c2ed1d1ca2e98fc33eb /sys/dev/netmap/netmap.c
parent5ab0d24d489e9451e3467e43965d21d5e5a755aa (diff)
Notes
Diffstat (limited to 'sys/dev/netmap/netmap.c')
-rw-r--r--sys/dev/netmap/netmap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c
index faa07b8a511d..85d479786fc6 100644
--- a/sys/dev/netmap/netmap.c
+++ b/sys/dev/netmap/netmap.c
@@ -2684,7 +2684,7 @@ netmap_poll(struct cdev *dev, int events, struct thread *td)
struct netmap_adapter *na;
struct ifnet *ifp;
struct netmap_kring *kring;
- u_int i, check_all, want_tx, want_rx, revents = 0;
+ u_int i, check_all_tx, check_all_rx, want_tx, want_rx, revents = 0;
u_int lim_tx, lim_rx, host_forwarded = 0;
struct mbq q = { NULL, NULL, 0 };
void *pwait = dev; /* linux compatibility */
@@ -2759,7 +2759,8 @@ netmap_poll(struct cdev *dev, int events, struct thread *td)
* there are pending packets to send. The latter can be disabled
* passing NETMAP_NO_TX_POLL in the NIOCREG call.
*/
- check_all = (priv->np_qlast == NETMAP_HW_RING) && (lim_tx > 1 || lim_rx > 1);
+ check_all_tx = (priv->np_qlast == NETMAP_HW_RING) && (lim_tx > 1);
+ check_all_rx = (priv->np_qlast == NETMAP_HW_RING) && (lim_rx > 1);
if (priv->np_qlast != NETMAP_HW_RING) {
lim_tx = lim_rx = priv->np_qlast;
@@ -2833,7 +2834,7 @@ flush_tx:
nm_kr_put(kring);
}
if (want_tx && retry_tx) {
- selrecord(td, check_all ?
+ selrecord(td, check_all_tx ?
&na->tx_si : &na->tx_rings[priv->np_qfirst].si);
retry_tx = 0;
goto flush_tx;
@@ -2879,7 +2880,7 @@ do_retry_rx:
}
if (retry_rx) {
retry_rx = 0;
- selrecord(td, check_all ?
+ selrecord(td, check_all_rx ?
&na->rx_si : &na->rx_rings[priv->np_qfirst].si);
goto do_retry_rx;
}