From: David Decotigny <ddecotig@gmail.com>
To: "David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Ben Hutchings <ben@decadent.org.uk>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
David Decotigny <decot@googlers.com>,
Nicolas Dichtel <nicolas.dichtel@6wind.com>,
Andrew Lunn <andrew@lunn.ch>,
Hadar Hen Zion <hadarh@mellanox.com>,
Edward Cree <ecree@solarflare.com>,
John Fastabend <john.r.fastabend@intel.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Thomas Graf <tgraf@suug.ch>,
Daniel Borkmann <daniel@iogearbox.net>,
Ken-ichirou MATSUZAWA <chamaken@gmail.com>,
Florian Westphal <fw@strlen.de>,
David Herrmann <dh.herrmann@gmail.com>
Subject: [PATCH v1 2/2] netlink: add support for NIC driver ioctls
Date: Thu, 17 Mar 2016 17:03:56 -0700 [thread overview]
Message-ID: <1458259436-85275-3-git-send-email-ddecotig@gmail.com> (raw)
In-Reply-To: <1458259436-85275-1-git-send-email-ddecotig@gmail.com>
From: David Decotigny <decot@googlers.com>
This patch removes the requirement that ethtool 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
next prev parent reply other threads:[~2016-03-18 0:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 0:03 [PATCH v1 0/2] basic ioctl support for netlink sockets David Decotigny
2016-03-18 0:03 ` [PATCH v1 1/2] ethtool: minor doc update David Decotigny
2016-03-18 0:29 ` Ben Hutchings
2016-03-18 0:03 ` David Decotigny [this message]
2016-03-20 17:31 ` [PATCH v1 0/2] basic ioctl support for netlink sockets David Miller
2016-03-21 17:43 ` David Decotigny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458259436-85275-3-git-send-email-ddecotig@gmail.com \
--to=ddecotig@gmail.com \
--cc=andrew@lunn.ch \
--cc=ben@decadent.org.uk \
--cc=chamaken@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=decot@googlers.com \
--cc=dh.herrmann@gmail.com \
--cc=ecree@solarflare.com \
--cc=fw@strlen.de \
--cc=hadarh@mellanox.com \
--cc=herbert@gondor.apana.org.au \
--cc=jeffrey.t.kirsher@intel.com \
--cc=john.r.fastabend@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=nikolay@cumulusnetworks.com \
--cc=tgraf@suug.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).