diff options
| author | Andrey Zonov <zont@FreeBSD.org> | 2014-06-06 00:24:04 +0000 |
|---|---|---|
| committer | Andrey Zonov <zont@FreeBSD.org> | 2014-06-06 00:24:04 +0000 |
| commit | dc8a95e62bdd5dc2a17f57f3352094f1692fccb4 (patch) | |
| tree | fe8d19d2bab98eb8042b56352b4353282aec78ae /sys/dev/netmap/netmap.c | |
| parent | 96db02f25aeab97c261a6bc81173285f1b62b6b9 (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 52b5f3286e1d..1b7bf35342f6 100644 --- a/sys/dev/netmap/netmap.c +++ b/sys/dev/netmap/netmap.c @@ -1009,7 +1009,7 @@ netmap_rxsync_from_host(struct netmap_adapter *na, struct thread *td, void *pwai (void)pwait; /* disable unused warnings */ (void)td; - mtx_lock(&q->lock); + mtx_lock_spin(&q->lock); /* First part: import newly received packets */ n = mbq_len(q); @@ -1051,7 +1051,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(&q->lock); + mtx_unlock_spin(&q->lock); return ret; } @@ -2381,7 +2381,7 @@ netmap_transmit(struct ifnet *ifp, struct mbuf *m) * not possible on Linux). * Also avoid overflowing the queue. */ - mtx_lock(&q->lock); + mtx_lock_spin(&q->lock); space = kring->nr_hwtail - kring->nr_hwcur; if (space < 0) @@ -2398,7 +2398,7 @@ netmap_transmit(struct ifnet *ifp, struct mbuf *m) m = NULL; error = 0; } - mtx_unlock(&q->lock); + mtx_unlock_spin(&q->lock); done: if (m) |
