aboutsummaryrefslogtreecommitdiff
path: root/sys/net/netmap_user.h
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2014-11-10 08:31:56 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2014-11-10 08:31:56 +0000
commit0506889c15d39b8edb35bf871ef1f35112a13e1e (patch)
treefccb9e9283439f0a4d398b84e0d3c8d65eb02897 /sys/net/netmap_user.h
parent8bcd603968ef19c64a0bfe69519a932cd4c2ee33 (diff)
downloadsrc-0506889c15d39b8edb35bf871ef1f35112a13e1e.tar.gz
src-0506889c15d39b8edb35bf871ef1f35112a13e1e.zip
return kernel-supplied error if available.
Also fix field names in a comment.
Notes
Notes: svn path=/head/; revision=274338
Diffstat (limited to 'sys/net/netmap_user.h')
-rw-r--r--sys/net/netmap_user.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/netmap_user.h b/sys/net/netmap_user.h
index 5faf671b8976..aab6c358de73 100644
--- a/sys/net/netmap_user.h
+++ b/sys/net/netmap_user.h
@@ -40,7 +40,7 @@
* From there:
* struct netmap_ring *NETMAP_TXRING(nifp, index)
* struct netmap_ring *NETMAP_RXRING(nifp, index)
- * we can access ring->nr_cur, ring->nr_avail, ring->nr_flags
+ * we can access ring->cur, ring->head, ring->tail, etc.
*
* ring->slot[i] gives us the i-th slot (we can access
* directly len, flags, buf_idx)
@@ -543,7 +543,8 @@ fail:
nm_close(d);
if (errmsg)
D("%s %s", errmsg, ifname);
- errno = EINVAL;
+ if (errno == 0)
+ errno = EINVAL;
return NULL;
}