Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1362016 > unrolled thread
| Started by | David Decotigny <ddecotig@gmail.com> |
|---|---|
| First post | 2016-03-21 18:20 +0100 |
| Last post | 2016-03-21 19:20 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH net-next v2 0/2] basic ioctl support for netlink sockets David Decotigny <ddecotig@gmail.com> - 2016-03-21 18:20 +0100
[PATCH net-next v2 2/2] netlink: add support for NIC driver ioctls David Decotigny <ddecotig@gmail.com> - 2016-03-21 18:20 +0100
Re: [PATCH net-next v2 0/2] basic ioctl support for netlink sockets David Miller <davem@davemloft.net> - 2016-03-21 19:20 +0100
| From | David Decotigny <ddecotig@gmail.com> |
|---|---|
| Date | 2016-03-21 18:20 +0100 |
| Subject | [PATCH net-next v2 0/2] basic ioctl support for netlink sockets |
| Message-ID | <rfbEJ-mO-7@gated-at.bofh.it> |
From: David Decotigny <decot@googlers.com>
This removes the requirement that ethtool be tied to the support
of a specific L3 protocol, also updates a comment.
History:
v2
updated commit description for the netlink ioctl patch
v1
initial submission
############################################
# Patch Set Summary:
David Decotigny (2):
ethtool: minor doc update
netlink: add support for NIC driver ioctls
include/uapi/linux/ethtool.h | 6 +++---
net/netlink/af_netlink.c | 10 +++++++++-
2 files changed, 12 insertions(+), 4 deletions(-)
--
2.8.0.rc3.226.g39d4020
[toc] | [next] | [standalone]
| From | David Decotigny <ddecotig@gmail.com> |
|---|---|
| Date | 2016-03-21 18:20 +0100 |
| Subject | [PATCH net-next v2 2/2] netlink: add support for NIC driver ioctls |
| Message-ID | <rfbEL-mO-19@gated-at.bofh.it> |
| In reply to | #1362016 |
From: David Decotigny <decot@googlers.com>
By returning -ENOIOCTLCMD, sock_do_ioctl() falls back to calling
dev_ioctl(), which provides support for NIC driver ioctls, which
includes ethtool support. This is similar to the way ioctls are handled
in udp.c or tcp.c.
This removes the requirement that ethtool for example be tied to the
support of a specific L3 protocol (ethtool uses an AF_INET socket
today).
Signed-off-by: David Decotigny <decot@googlers.com>
---
net/netlink/af_netlink.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index c841679..215fc08 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1033,6 +1033,14 @@ static int netlink_getname(struct socket *sock, struct sockaddr *addr,
return 0;
}
+static int netlink_ioctl(struct socket *sock, unsigned int cmd,
+ unsigned long arg)
+{
+ /* try to hand this ioctl down to the NIC drivers.
+ */
+ return -ENOIOCTLCMD;
+}
+
static struct sock *netlink_getsockbyportid(struct sock *ssk, u32 portid)
{
struct sock *sock;
@@ -2494,7 +2502,7 @@ static const struct proto_ops netlink_ops = {
.accept = sock_no_accept,
.getname = netlink_getname,
.poll = datagram_poll,
- .ioctl = sock_no_ioctl,
+ .ioctl = netlink_ioctl,
.listen = sock_no_listen,
.shutdown = sock_no_shutdown,
.setsockopt = netlink_setsockopt,
--
2.8.0.rc3.226.g39d4020
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-03-21 19:20 +0100 |
| Message-ID | <rfcAN-Zv-3@gated-at.bofh.it> |
| In reply to | #1362016 |
From: David Decotigny <ddecotig@gmail.com> Date: Mon, 21 Mar 2016 10:15:33 -0700 > From: David Decotigny <decot@googlers.com> > > This removes the requirement that ethtool be tied to the support > of a specific L3 protocol, also updates a comment. > > History: > v2 > updated commit description for the netlink ioctl patch > v1 > initial submission Series applied, thanks David.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web