diff options
author | luigi <luigi@FreeBSD.org> | 2014-06-09 15:24:45 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2014-06-09 15:24:45 +0000 |
commit | ebbf6b80b7c61883bee08d58e7291d274b4201a0 (patch) | |
tree | a448df913c38e0849c39af93fd624da3bf845225 /sys/dev/netmap/netmap_mbq.c | |
parent | 2472187c4f707df7b460212773ffae872c03d247 (diff) | |
download | FreeBSD-src-ebbf6b80b7c61883bee08d58e7291d274b4201a0.zip FreeBSD-src-ebbf6b80b7c61883bee08d58e7291d274b4201a0.tar.gz |
sync netmap code with the version in HEAD:
- fix handling of tx mbufs in emulated netmap mode;
- introduce mbq_lock() and mbq_unlock()
- rate limit some error messages
- many whitespace and comment fixes
Diffstat (limited to 'sys/dev/netmap/netmap_mbq.c')
-rw-r--r-- | sys/dev/netmap/netmap_mbq.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/netmap/netmap_mbq.c b/sys/dev/netmap/netmap_mbq.c index 2606b13..503f5a1 100644 --- a/sys/dev/netmap/netmap_mbq.c +++ b/sys/dev/netmap/netmap_mbq.c @@ -76,9 +76,9 @@ static inline void __mbq_enqueue(struct mbq *q, struct mbuf *m) void mbq_safe_enqueue(struct mbq *q, struct mbuf *m) { - mtx_lock(&q->lock); + mbq_lock(q); __mbq_enqueue(q, m); - mtx_unlock(&q->lock); + mbq_unlock(q); } @@ -110,9 +110,9 @@ struct mbuf *mbq_safe_dequeue(struct mbq *q) { struct mbuf *ret; - mtx_lock(&q->lock); + mbq_lock(q); ret = __mbq_dequeue(q); - mtx_unlock(&q->lock); + mbq_unlock(q); return ret; } |