* [PATCH net] netlink: fix setsockopt in mmap examples in documentation
@ 2014-03-20 4:54 Stephen Hemminger
2014-03-20 18:12 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2014-03-20 4:54 UTC (permalink / raw)
To: David Miller, Patrick McHardy; +Cc: netdev
The documentation for how to use netlink mmap interface is incorrect.
The calls to setsockopt() require an additional argument.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
--- a/Documentation/networking/netlink_mmap.txt 2013-11-21 17:22:02.719654412 -0800
+++ b/Documentation/networking/netlink_mmap.txt 2014-03-19 21:13:51.994890229 -0700
@@ -226,9 +226,9 @@ Ring setup:
void *rx_ring, *tx_ring;
/* Configure ring parameters */
- if (setsockopt(fd, NETLINK_RX_RING, &req, sizeof(req)) < 0)
+ if (setsockopt(fd, SOL_NETLINK, NETLINK_RX_RING, &req, sizeof(req)) < 0)
exit(1);
- if (setsockopt(fd, NETLINK_TX_RING, &req, sizeof(req)) < 0)
+ if (setsockopt(fd, SOL_NETLINK, NETLINK_TX_RING, &req, sizeof(req)) < 0)
exit(1)
/* Calculate size of each individual ring */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net] netlink: fix setsockopt in mmap examples in documentation
2014-03-20 4:54 [PATCH net] netlink: fix setsockopt in mmap examples in documentation Stephen Hemminger
@ 2014-03-20 18:12 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-03-20 18:12 UTC (permalink / raw)
To: shemming; +Cc: kaber, netdev
From: Stephen Hemminger <shemming@brocade.com>
Date: Wed, 19 Mar 2014 21:54:20 -0700
> The documentation for how to use netlink mmap interface is incorrect.
> The calls to setsockopt() require an additional argument.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Applied, thanks Stephen.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-20 18:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-20 4:54 [PATCH net] netlink: fix setsockopt in mmap examples in documentation Stephen Hemminger
2014-03-20 18:12 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).