diff options
| author | Luigi Rizzo <luigi@FreeBSD.org> | 2014-06-06 18:02:32 +0000 |
|---|---|---|
| committer | Luigi Rizzo <luigi@FreeBSD.org> | 2014-06-06 18:02:32 +0000 |
| commit | 997b054cf10b391fd4796b5e92c286ebd1fb1405 (patch) | |
| tree | a549466f01595fc69453502a804e60b8904e1a12 /sys/dev/netmap/netmap.c | |
| parent | a845d42777e57980e359b4df7f407d8a40bf6ea8 (diff) | |
Notes
Diffstat (limited to 'sys/dev/netmap/netmap.c')
| -rw-r--r-- | sys/dev/netmap/netmap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c index 8b62dec9888b..274a7d79d3f9 100644 --- a/sys/dev/netmap/netmap.c +++ b/sys/dev/netmap/netmap.c @@ -1050,7 +1050,7 @@ netmap_rxsync_from_host(struct netmap_adapter *na, struct thread *td, void *pwai (void)pwait; /* disable unused warnings */ (void)td; - mtx_lock_spin(&q->lock); + mbq_lock(q); /* First part: import newly received packets */ n = mbq_len(q); @@ -1092,7 +1092,7 @@ netmap_rxsync_from_host(struct netmap_adapter *na, struct thread *td, void *pwai if (kring->rcur == kring->rtail && td) /* no bufs available */ selrecord(td, &kring->si); - mtx_unlock_spin(&q->lock); + mbq_unlock(q); return ret; } @@ -2459,7 +2459,7 @@ netmap_transmit(struct ifnet *ifp, struct mbuf *m) * not possible on Linux). * Also avoid overflowing the queue. */ - mtx_lock_spin(&q->lock); + mbq_lock(q); space = kring->nr_hwtail - kring->nr_hwcur; if (space < 0) @@ -2476,7 +2476,7 @@ netmap_transmit(struct ifnet *ifp, struct mbuf *m) m = NULL; error = 0; } - mtx_unlock_spin(&q->lock); + mbq_unlock(q); done: if (m) |
