* [PATCH v1 0/2] basic ioctl support for netlink sockets
@ 2016-03-18 0:03 David Decotigny
2016-03-18 0:03 ` [PATCH v1 1/2] ethtool: minor doc update David Decotigny
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: David Decotigny @ 2016-03-18 0:03 UTC (permalink / raw)
To: David S. Miller, linux-kernel, netdev
Cc: Nikolay Aleksandrov, Michael S. Tsirkin, Ben Hutchings,
Jeff Kirsher, David Decotigny, Nicolas Dichtel, Andrew Lunn,
Hadar Hen Zion, Edward Cree, John Fastabend, Herbert Xu,
Thomas Graf, Daniel Borkmann, Ken-ichirou MATSUZAWA,
Florian Westphal, David Herrmann
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.
############################################
# 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v1 1/2] ethtool: minor doc update
2016-03-18 0:03 [PATCH v1 0/2] basic ioctl support for netlink sockets David Decotigny
@ 2016-03-18 0:03 ` David Decotigny
2016-03-18 0:29 ` Ben Hutchings
2016-03-18 0:03 ` [PATCH v1 2/2] netlink: add support for NIC driver ioctls David Decotigny
2016-03-20 17:31 ` [PATCH v1 0/2] basic ioctl support for netlink sockets David Miller
2 siblings, 1 reply; 6+ messages in thread
From: David Decotigny @ 2016-03-18 0:03 UTC (permalink / raw)
To: David S. Miller, linux-kernel, netdev
Cc: Nikolay Aleksandrov, Michael S. Tsirkin, Ben Hutchings,
Jeff Kirsher, David Decotigny, Nicolas Dichtel, Andrew Lunn,
Hadar Hen Zion, Edward Cree, John Fastabend, Herbert Xu,
Thomas Graf, Daniel Borkmann, Ken-ichirou MATSUZAWA,
Florian Westphal, David Herrmann
From: David Decotigny <decot@googlers.com>
Updates: commit 793cf87de9d1 ("ethtool: Set cmd field in
ETHTOOL_GLINKSETTINGS response to wrong nwords")
Signed-off-by: David Decotigny <decot@googlers.com>
---
include/uapi/linux/ethtool.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index 2835b07..9222db8 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -1648,9 +1648,9 @@ enum ethtool_reset_flags {
* %ETHTOOL_GLINKSETTINGS: on entry, number of words passed by user
* (>= 0); on return, if handshake in progress, negative if
* request size unsupported by kernel: absolute value indicates
- * kernel recommended size and cmd field is 0, as well as all the
- * other fields; otherwise (handshake completed), strictly
- * positive to indicate size used by kernel and cmd field is
+ * kernel expected size and all the other fields but cmd
+ * are 0; otherwise (handshake completed), strictly positive
+ * to indicate size used by kernel and cmd field stays
* %ETHTOOL_GLINKSETTINGS, all other fields populated by driver. For
* %ETHTOOL_SLINKSETTINGS: must be valid on entry, ie. a positive
* value returned previously by %ETHTOOL_GLINKSETTINGS, otherwise
--
2.8.0.rc3.226.g39d4020
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v1 2/2] netlink: add support for NIC driver ioctls
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:03 ` David Decotigny
2016-03-20 17:31 ` [PATCH v1 0/2] basic ioctl support for netlink sockets David Miller
2 siblings, 0 replies; 6+ messages in thread
From: David Decotigny @ 2016-03-18 0:03 UTC (permalink / raw)
To: David S. Miller, linux-kernel, netdev
Cc: Nikolay Aleksandrov, Michael S. Tsirkin, Ben Hutchings,
Jeff Kirsher, David Decotigny, Nicolas Dichtel, Andrew Lunn,
Hadar Hen Zion, Edward Cree, John Fastabend, Herbert Xu,
Thomas Graf, Daniel Borkmann, Ken-ichirou MATSUZAWA,
Florian Westphal, David Herrmann
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v1 1/2] ethtool: minor doc update
2016-03-18 0:03 ` [PATCH v1 1/2] ethtool: minor doc update David Decotigny
@ 2016-03-18 0:29 ` Ben Hutchings
0 siblings, 0 replies; 6+ messages in thread
From: Ben Hutchings @ 2016-03-18 0:29 UTC (permalink / raw)
To: David Decotigny, David S. Miller, linux-kernel, netdev
Cc: Nikolay Aleksandrov, Michael S. Tsirkin, Jeff Kirsher,
David Decotigny, Nicolas Dichtel, Andrew Lunn, Hadar Hen Zion,
Edward Cree, John Fastabend, Herbert Xu, Thomas Graf,
Daniel Borkmann, Ken-ichirou MATSUZAWA, Florian Westphal,
David Herrmann
[-- Attachment #1: Type: text/plain, Size: 1593 bytes --]
On Thu, 2016-03-17 at 17:03 -0700, David Decotigny wrote:
> From: David Decotigny <decot@googlers.com>
>
> Updates: commit 793cf87de9d1 ("ethtool: Set cmd field in
> ETHTOOL_GLINKSETTINGS response to wrong nwords")
>
> Signed-off-by: David Decotigny <decot@googlers.com>
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> include/uapi/linux/ethtool.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
> index 2835b07..9222db8 100644
> --- a/include/uapi/linux/ethtool.h
> +++ b/include/uapi/linux/ethtool.h
> @@ -1648,9 +1648,9 @@ enum ethtool_reset_flags {
> * %ETHTOOL_GLINKSETTINGS: on entry, number of words passed by user
> * (>= 0); on return, if handshake in progress, negative if
> * request size unsupported by kernel: absolute value indicates
> - * kernel recommended size and cmd field is 0, as well as all the
> - * other fields; otherwise (handshake completed), strictly
> - * positive to indicate size used by kernel and cmd field is
> + * kernel expected size and all the other fields but cmd
> + * are 0; otherwise (handshake completed), strictly positive
> + * to indicate size used by kernel and cmd field stays
> * %ETHTOOL_GLINKSETTINGS, all other fields populated by driver. For
> * %ETHTOOL_SLINKSETTINGS: must be valid on entry, ie. a positive
> * value returned previously by %ETHTOOL_GLINKSETTINGS, otherwise
--
Ben Hutchings
Absolutum obsoletum. (If it works, it's out of date.) - Stafford Beer
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 0/2] basic ioctl support for netlink sockets
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:03 ` [PATCH v1 2/2] netlink: add support for NIC driver ioctls David Decotigny
@ 2016-03-20 17:31 ` David Miller
2016-03-21 17:43 ` David Decotigny
2 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2016-03-20 17:31 UTC (permalink / raw)
To: ddecotig
Cc: linux-kernel, netdev, nikolay, mst, ben, jeffrey.t.kirsher, decot,
nicolas.dichtel, andrew, hadarh, ecree, john.r.fastabend, herbert,
tgraf, daniel, chamaken, fw, dh.herrmann
From: David Decotigny <ddecotig@gmail.com>
Date: Thu, 17 Mar 2016 17:03:54 -0700
> This removes the requirement that ethtool be tied to the support
> of a specific L3 protocol, also updates a comment.
You're adding an ioctl handler to netlink sockets, and it is not
at all apparent to me how this influences ethtool handling at all.
Therefore you have to explain this here and in your commit message.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 0/2] basic ioctl support for netlink sockets
2016-03-20 17:31 ` [PATCH v1 0/2] basic ioctl support for netlink sockets David Miller
@ 2016-03-21 17:43 ` David Decotigny
0 siblings, 0 replies; 6+ messages in thread
From: David Decotigny @ 2016-03-21 17:43 UTC (permalink / raw)
To: David Miller
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, nikolay,
Michael S. Tsirkin, Ben Hutchings, Jeff Kirsher, nicolas.dichtel,
andrew, hadarh, ecree, john.r.fastabend, Herbert Xu, tgraf,
daniel, chamaken, fw, dh.herrmann
sent updated version. commit description should have the details. what
we are doing there is mimic what some others are doing, such as udp.c:
when returning -ENOIOCTLCMD, net/core would fallback to dev_ioctl,
which implements the NIC driver ioctls, which include ethtool ioctl.
On Sun, Mar 20, 2016 at 10:31 AM, David Miller <davem@davemloft.net> wrote:
> From: David Decotigny <ddecotig@gmail.com>
> Date: Thu, 17 Mar 2016 17:03:54 -0700
>
>> This removes the requirement that ethtool be tied to the support
>> of a specific L3 protocol, also updates a comment.
>
> You're adding an ioctl handler to netlink sockets, and it is not
> at all apparent to me how this influences ethtool handling at all.
>
> Therefore you have to explain this here and in your commit message.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-03-21 17:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v1 2/2] netlink: add support for NIC driver ioctls David Decotigny
2016-03-20 17:31 ` [PATCH v1 0/2] basic ioctl support for netlink sockets David Miller
2016-03-21 17:43 ` David Decotigny
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).