Re: [PATCH net] ethtool: do not print warning for applications using legacy API

2017-12-30 Thread David Decotigny
Signed-off-by: David Decotigny <de...@googlers.com> On Fri, Dec 29, 2017 at 10:02 AM, Stephen Hemminger <step...@networkplumber.org> wrote: > From: Stephen Hemminger <step...@networkplumber.org> > > In kernel log ths message appears on every boot: > "war

[PATCH iproute2 v1 1/2] iproute2: avoid exit in case of error.

2016-11-11 Thread David Decotigny
Be consistent with how non-0 print_route() return values are handled elesewhere: return -1. --- ip/iproute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iproute.c b/ip/iproute.c index 98bfad6..dae793b 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -1743,7 +1743,7 @@

[PATCH iproute2 v1 2/2] iproute2: a non-expected rtnl message is an error

2016-11-11 Thread David Decotigny
--- ip/iproute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iproute.c b/ip/iproute.c index dae793b..10d0afe 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -320,7 +320,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) if

[PATCH v1] mlx4: remove unused fields

2016-09-28 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This also can address following UBSAN warnings: [ 36.640343] [ 36.648772] UBSAN: Undefined behaviour in drivers/net/ethernet/mellanox/mlx4/fw.c:857:26 [ 36.

Re: [ethtool PATCH v4 4/4] ethtool: Enhancing link mode bits to support 25G/50G/100G

2016-08-23 Thread David Decotigny
f-by: Vidya Sagar Ravipati <vi...@cumulusnetworks.com> > Acked-By: David Decotigny <de...@googlers.com> > --- > ethtool.c | 30 ++ > 1 file changed, 30 insertions(+) > > diff --git a/ethtool.c b/ethtool.c > index 1d6564e..ab58c7f 100644 > --

Re: [ethtool PATCH v2 4/4] ethtool: Enhancing link mode bits to support 25G/50G/100G

2016-06-27 Thread David Decotigny
, ETHTOOL_LINK_MODE_10baseCR4_Full_BIT, > + "10baseCR4/Full" }, > + { 0, ETHTOOL_LINK_MODE_10baseLR4_ER4_Full_BIT, > + "10baseLR4_ER4/Full" }, > }; > int indent; > int did1, new_line_pend, i; > -- > 2.1.4 > Acked-By: David Decotigny <de...@googlers.com>

Re: [PATCH net-next V2 07/10] ethtool: Add 50G baseSR2 link mode

2016-06-23 Thread David Decotigny
ae...@mellanox.com> > Cc: Ben Hutchings <b...@kernel.org> > Cc: David Decotigny <de...@googlers.com> > --- > include/uapi/linux/ethtool.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/uapi/linux/ethtool.h b/include/uapi

Re: [PATCH net-next 7/9] net/mlx5e: Add 50G missing link mode to ethtool and mlx5 driver

2016-06-22 Thread David Decotigny
ssman <g...@mellanox.com> > CC: Ben Hutchings <b...@kernel.org> > CC: David Decotigny <de...@googlers.com> > Signed-off-by: Saeed Mahameed <sae...@mellanox.com> > --- > drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + > include/uapi/linux/ethtool.h

[ethtool PATCH v7 0/2] add support for new ETHTOOL_xLINKSETTINGS ioctls

2016-06-09 Thread David Decotigny
From: David Decotigny <de...@googlers.com> [ this is a plain re-post, same v7 as the ones previously sent ] History: v7 added ref to related kernel commit in netlink ioctl patch description v6 re-added last patch, to use AF_NETLINK when AF_INET not available v5 rebase

[ethtool PATCH v7 2/2] ethtool: use netlink socket when AF_INET not available

2016-06-09 Thread David Decotigny
From: David Decotigny <de...@googlers.com> To benefit from this, kernel commit 025c68186e07 ("netlink: add support for NIC driver ioctls") is needed. Signed-off-by: David Decotigny <de...@googlers.com> --- configure.ac | 2 +- ethtool.c| 7 +++ 2 files chang

[ethtool PATCH v7 1/2] ethtool.c: add support for ETHTOOL_xLINKSETTINGS ioctls

2016-06-09 Thread David Decotigny
From: David Decotigny <de...@googlers.com> More info with kernel commit 8d3f2806f8fb ("Merge branch 'ethtool-ksettings'"). Note: The new features implemented in this patch depend on kernel commit 793cf87de9d1 ("Set cmd field in ETHTOOL_GLINKSETTINGS response to wrong n

Re: [PATCH v3 1/3] net: phy: add phy_ethtool_{get|set}_link_ksettings

2016-05-09 Thread David Decotigny
ttings(struct net_device *ndev, > + const struct ethtool_link_ksettings *cmd); > > int __init mdio_bus_init(void); > void mdio_bus_exit(void); > -- > 1.7.4.4 > Acked-By: David Decotigny <de...@googlers.com>

[ethtool PATCH v7 0/2] add support for new ETHTOOL_xLINKSETTINGS ioctls

2016-05-09 Thread David Decotigny
From: David Decotigny <de...@googlers.com> [ this is a plain re-post, same v7 as the ones previously sent ] History: v7 added ref to related kernel commit in netlink ioctl patch description v6 re-added last patch, to use AF_NETLINK when AF_INET not available v5 rebase

[ethtool PATCH v7 1/2] ethtool.c: add support for ETHTOOL_xLINKSETTINGS ioctls

2016-05-09 Thread David Decotigny
From: David Decotigny <de...@googlers.com> More info with kernel commit 8d3f2806f8fb ("Merge branch 'ethtool-ksettings'"). Note: The new features implemented in this patch depend on kernel commit 793cf87de9d1 ("Set cmd field in ETHTOOL_GLINKSETTINGS response to wrong n

[ethtool PATCH v7 2/2] ethtool: use netlink socket when AF_INET not available

2016-05-09 Thread David Decotigny
From: David Decotigny <de...@googlers.com> To benefit from this, kernel commit 025c68186e07 ("netlink: add support for NIC driver ioctls") is needed. Signed-off-by: David Decotigny <de...@googlers.com> --- configure.ac | 2 +- ethtool.c| 7 +++ 2 files chang

Re: [PATCH v2 1/3] net: core: ethtool: add ethtool_op_{get|set}_link_ksettings

2016-05-09 Thread David Decotigny
Are you sure this belongs to ethtool.h? For one, I believe you need an #include phy.h somewhere. I would suggest instead to keep this in phy.h, presumably with a more explicit name suggesting that phydev is involved. On Sun, May 8, 2016 at 2:44 PM, Philippe Reynes wrote: >

[ethtool PATCH v7 2/2] ethtool: use netlink socket when AF_INET not available

2016-05-02 Thread David Decotigny
From: David Decotigny <de...@googlers.com> To benefit from this, kernel commit 025c68186e07 ("netlink: add support for NIC driver ioctls") is needed. Signed-off-by: David Decotigny <de...@googlers.com> --- configure.ac | 2 +- ethtool.c| 7 +++ 2 files chang

[ethtool PATCH v7 1/2] ethtool.c: add support for ETHTOOL_xLINKSETTINGS ioctls

2016-05-02 Thread David Decotigny
From: David Decotigny <de...@googlers.com> More info with kernel commit 8d3f2806f8fb ("Merge branch 'ethtool-ksettings'"). Note: The new features implemented in this patch depend on kernel commit 793cf87de9d1 ("Set cmd field in ETHTOOL_GLINKSETTINGS response to wrong n

[ethtool PATCH v7 0/2] add support for new ETHTOOL_xLINKSETTINGS ioctls

2016-05-02 Thread David Decotigny
From: David Decotigny <de...@googlers.com> [ this is a plain re-post, same v7 as the ones previously sent ] History: v7 added ref to related kernel commit in netlink ioctl patch description v6 re-added last patch, to use AF_NETLINK when AF_INET not available v5 rebase

[ethtool PATCH v7 0/2] add support for new ETHTOOL_xLINKSETTINGS ioctls

2016-04-22 Thread David Decotigny
From: David Decotigny <de...@googlers.com> [ re-sending this series, same v7 as the one previously sent ] History: v7 added ref to related kernel commit in netlink ioctl patch description v6 re-added last patch, to use AF_NETLINK when AF_INET not available v5 rebased main

[ethtool PATCH v7 1/2] ethtool.c: add support for ETHTOOL_xLINKSETTINGS ioctls

2016-04-22 Thread David Decotigny
From: David Decotigny <de...@googlers.com> More info with kernel commit 8d3f2806f8fb ("Merge branch 'ethtool-ksettings'"). Note: The new features implemented in this patch depend on kernel commit 793cf87de9d1 ("Set cmd field in ETHTOOL_GLINKSETTINGS response to wrong n

[ethtool PATCH v7 2/2] ethtool: use netlink socket when AF_INET not available

2016-04-22 Thread David Decotigny
From: David Decotigny <de...@googlers.com> To benefit from this, kernel commit 025c68186e07 ("netlink: add support for NIC driver ioctls") is needed. Signed-off-by: David Decotigny <de...@googlers.com> --- configure.ac | 2 +- ethtool.c| 7 +++ 2 files chang

[ethtool PATCH v7 0/2] add support for new ETHTOOL_xLINKSETTINGS ioctls

2016-03-25 Thread David Decotigny
From: David Decotigny <de...@googlers.com> History: v7 added ref to related kernel commit in netlink ioctl patch description v6 re-added last patch, to use AF_NETLINK when AF_INET not available v5 rebased main patch, removed last patch "use AF_LOCAL w

[ethtool PATCH v7 2/2] ethtool: use netlink socket when AF_INET not available

2016-03-25 Thread David Decotigny
From: David Decotigny <de...@googlers.com> To benefit from this, kernel commit 025c68186e07 ("netlink: add support for NIC driver ioctls") is needed. Signed-off-by: David Decotigny <de...@googlers.com> --- configure.ac | 2 +- ethtool.c| 7 +++ 2 files chang

[ethtool PATCH v7 1/2] ethtool.c: add support for ETHTOOL_xLINKSETTINGS ioctls

2016-03-25 Thread David Decotigny
From: David Decotigny <de...@googlers.com> More info with kernel commit 8d3f2806f8fb ("Merge branch 'ethtool-ksettings'"). Note: The new features implemented in this patch depend on kernel commit 793cf87de9d1 ("Set cmd field in ETHTOOL_GLINKSETTINGS response to wrong n

[ethtool PATCH v6 1/2] ethtool.c: add support for ETHTOOL_xLINKSETTINGS ioctls

2016-03-21 Thread David Decotigny
From: David Decotigny <de...@googlers.com> More info with kernel commit 8d3f2806f8fb ("Merge branch 'ethtool-ksettings'"). Note: The new features implemented in this patch depend on kernel commit 793cf87de9d1 ("Set cmd field in ETHTOOL_GLINKSETTINGS response to wrong n

[ethtool PATCH v6 2/2] ethtool: use netlink socket when AF_INET not available

2016-03-21 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- configure.ac | 2 +- ethtool.c| 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3105415..47d2a0f 100644 --- a/config

[PATCH net-next v2 0/2] basic ioctl support for netlink sockets

2016-03-21 Thread David Decotigny
From: David Decotigny <de...@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 subm

[PATCH net-next v2 1/2] ethtool: minor doc update

2016-03-21 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Updates: commit 793cf87de9d1 ("ethtool: Set cmd field in ETHTOOL_GLINKSETTINGS response to wrong nwords") Signed-off-by: David Decotigny <de...@googlers.com> --- include/uapi/linux/ethtool.h | 6 +++--- 1 file chang

[PATCH net-next v2 2/2] netlink: add support for NIC driver ioctls

2016-03-21 Thread David Decotigny
From: David Decotigny <de...@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 requi

[PATCH v1 2/2] netlink: add support for NIC driver ioctls

2016-03-19 Thread David Decotigny
From: David Decotigny <de...@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 <de...@googlers.com> --- net/netlink/af_netlink.c | 10 +- 1 fil

[PATCH v1 0/2] basic ioctl support for netlink sockets

2016-03-19 Thread David Decotigny
From: David Decotigny <de...@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 netlin

[PATCH v1 1/2] ethtool: minor doc update

2016-03-19 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Updates: commit 793cf87de9d1 ("ethtool: Set cmd field in ETHTOOL_GLINKSETTINGS response to wrong nwords") Signed-off-by: David Decotigny <de...@googlers.com> --- include/uapi/linux/ethtool.h | 6 +++--- 1 file chang

Re: [ethtool PATCH v4 10/11] ethtool.c: add support for ETHTOOL_xLINKSETTINGS ioctls

2016-03-15 Thread David Decotigny
Please note that v5 patch depends on Ben Hutchings' http://patchwork.ozlabs.org/patch/596879/ to make any sense. On Tue, Mar 15, 2016 at 4:42 PM, David Decotigny <ddeco...@gmail.com> wrote: > Just sent v5 of the series: now only this patch left. Applied all your > suggestions. >

Re: [ethtool PATCH v4 10/11] ethtool.c: add support for ETHTOOL_xLINKSETTINGS ioctls

2016-03-15 Thread David Decotigny
t;b...@decadent.org.uk> wrote: > On Fri, 2016-03-11 at 09:58 -0800, David Decotigny wrote: > [...] >> +static int parse_hex_u32_bitmap(const char *s, >> + unsigned int nbits, u32 *result) >> +{ >> + const unsigned nwords = __KERNEL_DIV_

[ethtool PATCH v5] ethtool.c: add support for ETHTOOL_xLINKSETTINGS ioctls

2016-03-15 Thread David Decotigny
From: David Decotigny <de...@googlers.com> More info with kernel commit 8d3f2806f8fb ("Merge branch 'ethtool-ksettings'"). Signed-off-by: David Decotigny <de...@googlers.com> --- ethtool.c | 681 - internal.h

Re: [ethtool PATCH v4 11/11] ethtool.c: support absence of v4 sockets

2016-03-15 Thread David Decotigny
to try AF_INET first for backward compatibility reasons, then fallback to AF_NETLINK? On Sun, Mar 13, 2016 at 10:24 AM, Ben Hutchings <b...@decadent.org.uk> wrote: > On Fri, 2016-03-11 at 09:58 -0800, David Decotigny wrote: >> From: David Decotigny <de...@googlers.com>

Re: [PATCH net-next] ethtool: Set cmd field in ETHTOOL_GLINKSETTINGS response to wrong nwords

2016-03-15 Thread david decotigny
Ben Hutchings decadent.org.uk> writes: > > When the ETHTOOL_GLINKSETTINGS implementation finds that userland is > using the wrong number of words of link mode bitmaps (or is trying to > find out the right numbers) it sets the cmd field to 0 in the response > structure. > > This is inconsistent

[ethtool PATCH v4 04/11] ethtool.c: do_seeprom checks for params & stdin sanity

2016-03-11 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Tested: On qemu e1000: $ dd if=/dev/zero bs=2 count=5 | /mnt/ethtool -E eth0 length 9 too much data from stdin $ dd if=/dev/zero bs=2 count=5 | /mnt/ethtool -E eth0 length 11 not enough data from stdin $ dd if=/dev/zero bs=2 count=5

[ethtool PATCH v4 02/11] ethtool.c: don't ignore fread() return value

2016-03-11 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This addresses: ethtool.c:1116:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: David Decotigny <de...@googlers.com> --- ethtool.c | 5 - 1 file changed,

[ethtool PATCH v4 10/11] ethtool.c: add support for ETHTOOL_xLINKSETTINGS ioctls

2016-03-11 Thread David Decotigny
From: David Decotigny <de...@googlers.com> More info with kernel SHA1: 8d3f2806f8fbd9b22 "Merge branch 'ethtool-ksettings'". Signed-off-by: David Decotigny <de...@googlers.com> --- ethtool.c | 682 +++-- internal.h

[ethtool PATCH v4 09/11] ethtool-copy.h: sync with net-next

2016-03-11 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This cover changes up to: commit 14e2037902d65213842b4e40305ff54a64abbcb6 Author: Nicolas Dichtel <nicolas.dich...@6wind.com> Date: Fri Mar 4 11:52:19 2016 +0100 ethtool.h: define INT_MAX for userland Signed-off-by: David D

[ethtool PATCH v4 08/11] kernel-copy.h: import kernel.h from net-next and use it

2016-03-11 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This is required for recent version of ethtool.h . This covers kernel.h up to: commit b5d3755a22e0cc4c369c0985aef0c52c2477c1e7 Author: Nicolas Dichtel <nicolas.dich...@6wind.com> Date: Fri Mar 4 11:52:16 2016 +0100

[ethtool PATCH v4 11/11] ethtool.c: support absence of v4 sockets

2016-03-11 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- ethtool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ethtool.c b/ethtool.c index 761252f..f9336e3 100644 --- a/ethtool.c +++ b/ethtool.c @@ -4615,6 +4615,9

[ethtool PATCH v4 03/11] ethtool.c: fix dump_regs heap corruption

2016-03-11 Thread David Decotigny
From: David Decotigny <de...@googlers.com> The 'regs' pointer is owned by do_gregs(), but updated internally inside dump_regs() without propagating it back to do_gregs(): later free(regs) in do_gregs() reclaims the wrong area. This commit moves the realloc() inside do_gregs(). Sign

[ethtool PATCH v4 06/11] test-common.c: fix test_realloc(NULL, ...)

2016-03-11 Thread David Decotigny
ed-off-by: Maciej Żenczykowski <m...@google.com> Signed-off-by: David Decotigny <de...@googlers.com> --- test-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-common.c b/test-common.c index adc3cd4..cd63d1d 100644 --- a/test-common.c +++ b/test-common.c @@ -10

[ethtool PATCH v4 05/11] marvell.c: fix strict alias warnings

2016-03-11 Thread David Decotigny
rules [-Werror=strict-aliasing] marvell.c:428:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] Note: code appears endian-dependent, not fixed by this commit. Signed-off-by: Maciej Żenczykowski <m...@google.com> Signed-off-by: David D

[ethtool PATCH v4 07/11] test-features.c: add braces around array initialization

2016-03-11 Thread David Decotigny
com> Signed-off-by: David Decotigny <de...@googlers.com> --- test-features.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-features.c b/test-features.c index d7bd994..6ebb364 100644 --- a/test-features.c +++ b/test-features.c @@ -18,7 +18,7 @@ static const

[ethtool PATCH v4 00/11] add support for new ETHTOOL_xLINKSETTINGS ioctls

2016-03-11 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This adds support for the new ETHTOOL_xLINKSETTINGS ioctls. This also fixes a few compilation warnings as well as a heap corruption bug. History: v4 review Ben Hutchings: using AF_UNIX instead of INET6 in the absence of v4 sockets

[ethtool PATCH v4 01/11] internal.h: change to new sane kernel headers on 64-bit archs

2016-03-11 Thread David Decotigny
[-Werror=format=] ctx->devname, ring_count->data); ^ Signed-off-by: Maciej Żenczykowski <m...@google.com> Signed-off-by: David Decotigny <de...@googlers.com> --- internal.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/internal.h b/internal.h in

[ethtool PATCH v4 08/11] kernel-copy.h: import kernel.h from net-next and use it

2016-03-07 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This is required for recent version of ethtool.h . This covers kernel.h up to: commit b5d3755a22e0cc4c369c0985aef0c52c2477c1e7 Author: Nicolas Dichtel <nicolas.dich...@6wind.com> Date: Fri Mar 4 11:52:16 2016 +0100

[ethtool PATCH v4 10/11] ethtool.c: add support for ETHTOOL_xLINKSETTINGS ioctls

2016-03-07 Thread David Decotigny
From: David Decotigny <de...@googlers.com> More info with kernel SHA1: 8d3f2806f8fbd9b22 "Merge branch 'ethtool-ksettings'". Signed-off-by: David Decotigny <de...@googlers.com> --- ethtool.c | 682 +++-- internal.h

[ethtool PATCH v4 07/11] test-features.c: add braces around array initialization

2016-03-07 Thread David Decotigny
com> Signed-off-by: David Decotigny <de...@googlers.com> --- test-features.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-features.c b/test-features.c index d7bd994..6ebb364 100644 --- a/test-features.c +++ b/test-features.c @@ -18,7 +18,7 @@ static const

[ethtool PATCH v4 06/11] test-common.c: fix test_realloc(NULL, ...)

2016-03-07 Thread David Decotigny
ed-off-by: Maciej Żenczykowski <m...@google.com> Signed-off-by: David Decotigny <de...@googlers.com> --- test-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-common.c b/test-common.c index adc3cd4..cd63d1d 100644 --- a/test-common.c +++ b/test-common.c @@ -10

[ethtool PATCH v4 09/11] ethtool-copy.h: sync with net-next

2016-03-07 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This cover changes up to: commit 14e2037902d65213842b4e40305ff54a64abbcb6 Author: Nicolas Dichtel <nicolas.dich...@6wind.com> Date: Fri Mar 4 11:52:19 2016 +0100 ethtool.h: define INT_MAX for userland Signed-off-by: David D

[ethtool PATCH v4 03/11] ethtool.c: fix dump_regs heap corruption

2016-03-07 Thread David Decotigny
From: David Decotigny <de...@googlers.com> The 'regs' pointer is owned by do_gregs(), but updated internally inside dump_regs() without propagating it back to do_gregs(): later free(regs) in do_gregs() reclaims the wrong area. This commit moves the realloc() inside do_gregs(). Sign

[ethtool PATCH v4 05/11] marvell.c: fix strict alias warnings

2016-03-07 Thread David Decotigny
rules [-Werror=strict-aliasing] marvell.c:428:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] Note: code appears endian-dependent, not fixed by this commit. Signed-off-by: Maciej Żenczykowski <m...@google.com> Signed-off-by: David D

[ethtool PATCH v4 02/11] ethtool.c: don't ignore fread() return value

2016-03-07 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This addresses: ethtool.c:1116:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: David Decotigny <de...@googlers.com> --- ethtool.c | 5 - 1 file changed,

[ethtool PATCH v4 04/11] ethtool.c: do_seeprom checks for params & stdin sanity

2016-03-07 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Tested: On qemu e1000: $ dd if=/dev/zero bs=2 count=5 | /mnt/ethtool -E eth0 length 9 too much data from stdin $ dd if=/dev/zero bs=2 count=5 | /mnt/ethtool -E eth0 length 11 not enough data from stdin $ dd if=/dev/zero bs=2 count=5

[ethtool PATCH v4 11/11] ethtool.c: support absence of v4 sockets

2016-03-07 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- ethtool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ethtool.c b/ethtool.c index 761252f..f9336e3 100644 --- a/ethtool.c +++ b/ethtool.c @@ -4615,6 +4615,9

[ethtool PATCH v4 00/11] add support for new ETHTOOL_xLINKSETTINGS ioctls

2016-03-07 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This adds support for the new ETHTOOL_xLINKSETTINGS ioctls. This also fixes a few compilation warnings as well as a heap corruption bug. History: v4 review Ben Hutchings: using AF_UNIX instead of INET6 in the absence of v4 sockets

[ethtool PATCH v4 01/11] internal.h: change to new sane kernel headers on 64-bit archs

2016-03-07 Thread David Decotigny
[-Werror=format=] ctx->devname, ring_count->data); ^ Signed-off-by: Maciej Żenczykowski <m...@google.com> Signed-off-by: David Decotigny <de...@googlers.com> --- internal.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/internal.h b/internal.h in

[ethtool PATCH v3 02/12] ethtool.c: don't ignore fread() return value

2016-03-04 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This addresses: ethtool.c:1116:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: David Decotigny <de...@googlers.com> --- ethtool.c | 5 - 1 file changed,

[ethtool PATCH v3 08/12] ethtool-copy.h: sync with net-next

2016-03-04 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This cover changes up to: commit 3f1ac7a700d039c61d8d8b99f28d605d489a60cf Author: David Decotigny <de...@googlers.com> Date: Wed Feb 24 10:57:59 2016 -0800 net: ethtool: add new ETHTOOL_xLINKSETTINGS API Signed-off-by: Dav

[ethtool PATCH v3 05/12] marvell.c: fix strict alias warnings

2016-03-04 Thread David Decotigny
rules [-Werror=strict-aliasing] marvell.c:428:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] Note: code appears endian-dependent, not fixed by this commit. Signed-off-by: Maciej Żenczykowski <m...@google.com> Signed-off-by: David D

[ethtool PATCH v3 07/12] test-features.c: add braces around array initialization

2016-03-04 Thread David Decotigny
com> Signed-off-by: David Decotigny <de...@googlers.com> --- test-features.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-features.c b/test-features.c index d7bd994..6ebb364 100644 --- a/test-features.c +++ b/test-features.c @@ -18,7 +18,7 @@ static const

[ethtool PATCH v3 12/12] ethtool.c: use v6 socket when v4 is not available

2016-03-04 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- ethtool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ethtool.c b/ethtool.c index e1acf09..4daf538 100644 --- a/ethtool.c +++ b/ethtool.c @@ -4618,6 +4618,9

[ethtool PATCH v3 09/12] internal.h: fix build for latest ethtool-copy.h

2016-03-04 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- internal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal.h b/internal.h index 5f8504d..5df8124 100644 --- a/internal.h +++ b/internal.h @@ -13,6 +13,

[ethtool PATCH v3 10/12] internal.h: TRUE/FALSE macros

2016-03-04 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- internal.h | 8 1 file changed, 8 insertions(+) diff --git a/internal.h b/internal.h index 5df8124..7c44d0e 100644 --- a/internal.h +++ b/internal.h @@ -42,6 +42,14 @@ typ

[ethtool PATCH v3 11/12] ethtool.c: add support for ETHTOOL_xLINKSETTINGS ioctls

2016-03-04 Thread David Decotigny
From: David Decotigny <de...@googlers.com> More info with kernel SHA1: 8d3f2806f8fbd9b22 "Merge branch 'ethtool-ksettings'". Signed-off-by: David Decotigny <de...@googlers.com> --- ethtool.c | 682 +++-- internal.h

[ethtool PATCH v3 04/12] ethtool.c: do_seeprom checks for params & stdin sanity

2016-03-04 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Tested: On qemu e1000: $ dd if=/dev/zero bs=2 count=5 | /mnt/ethtool -E eth0 length 9 too much data from stdin $ dd if=/dev/zero bs=2 count=5 | /mnt/ethtool -E eth0 length 11 not enough data from stdin $ dd if=/dev/zero bs=2 count=5

[ethtool PATCH v3 06/12] test-common.c: fix test_realloc(NULL, ...)

2016-03-04 Thread David Decotigny
ed-off-by: Maciej Żenczykowski <m...@google.com> Signed-off-by: David Decotigny <de...@googlers.com> --- test-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-common.c b/test-common.c index adc3cd4..cd63d1d 100644 --- a/test-common.c +++ b/test-common.c @@ -10

[ethtool PATCH v3 03/12] ethtool.c: fix dump_regs heap corruption

2016-03-04 Thread David Decotigny
From: David Decotigny <de...@googlers.com> The 'regs' pointer is owned by do_gregs(), but updated internally inside dump_regs() without propagating it back to do_gregs(): later free(regs) in do_gregs() reclaims the wrong area. This commit moves the realloc() inside do_gregs(). Sign

[ethtool PATCH v3 01/12] internal.h: change to new sane powerpc64 kernel headers

2016-03-04 Thread David Decotigny
or=format=] ctx->devname, ring_count->data); ^ Signed-off-by: Maciej Żenczykowski <m...@google.com> Signed-off-by: David Decotigny <de...@googlers.com> --- internal.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/internal.h b/internal.h in

[ethtool PATCH v3 00/12] add support for new ETHTOOL_xLINKSETTINGS ioctls

2016-03-04 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This adds support for the new ETHTOOL_xLINKSETTINGS ioctls. This also fixes a few compilation warnings as well as a heap corruption bug. History: v3 TRUE/FALSE obvious-ification v2 added do_seeprom patch added netdev@ as recipien

[ethtool PATCH v2 07/12] test-features.c: add braces around array initialization

2016-03-03 Thread David Decotigny
From: Maciej Żenczykowski <m...@google.com> This fixes: test-features.c:21:1: error: missing braces around initializer [-Werror=missing-braces] cmd_gssetinfo = { { ETHTOOL_GSSET_INFO, 0, 1ULL << ETH_SS_FEATURES }, 34 }; ^ Signed-off-by: David Decotigny <de...@googlers

[ethtool PATCH v2 03/12] ethtool.c: fix dump_regs heap corruption

2016-03-03 Thread David Decotigny
From: David Decotigny <de...@googlers.com> The 'regs' pointer is owned by do_gregs(), but updated internally inside dump_regs() without propagating it back to do_gregs(): later free(regs) in do_gregs() reclaims the wrong area. This commit moves the realloc() inside do_gregs(). Sign

[ethtool PATCH v2 08/12] ethtool-copy.h: sync with net-next

2016-03-03 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This cover changes up to: commit 3f1ac7a700d039c61d8d8b99f28d605d489a60cf Author: David Decotigny <de...@googlers.com> Date: Wed Feb 24 10:57:59 2016 -0800 net: ethtool: add new ETHTOOL_xLINKSETTINGS API Signed-off-by: Dav

[ethtool PATCH v2 10/12] internal.h: TRUE/FALSE macros

2016-03-03 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- internal.h | 8 1 file changed, 8 insertions(+) diff --git a/internal.h b/internal.h index 5df8124..5fd87f1 100644 --- a/internal.h +++ b/internal.h @@ -42,6 +42,14 @@ typ

[ethtool PATCH v2 11/12] ethtool.c: add support for ETHTOOL_xLINKSETTINGS ioctls

2016-03-03 Thread David Decotigny
From: David Decotigny <de...@googlers.com> More info with kernel SHA1: 8d3f2806f8fbd9b22 "Merge branch 'ethtool-ksettings'". Signed-off-by: David Decotigny <de...@googlers.com> --- ethtool.c | 682 +++-- internal.h

[ethtool PATCH v2 04/12] ethtool.c: do_seeprom checks for params & stdin sanity

2016-03-03 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Tested: On qemu e1000: $ dd if=/dev/zero bs=2 count=5 | /mnt/ethtool -E eth0 length 9 too much data from stdin $ dd if=/dev/zero bs=2 count=5 | /mnt/ethtool -E eth0 length 11 not enough data from stdin $ dd if=/dev/zero bs=2 count=5

[ethtool PATCH v2 05/12] marvell.c: fix strict alias warnings

2016-03-03 Thread David Decotigny
rules [-Werror=strict-aliasing] marvell.c:428:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] Note: code appears endian-dependent, not fixed by this commit. Signed-off-by: David Decotigny <de...@googlers.com> --- ma

[ethtool PATCH v2 09/12] internal.h: fix build for latest ethtool-copy.h

2016-03-03 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- internal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal.h b/internal.h index 5f8504d..5df8124 100644 --- a/internal.h +++ b/internal.h @@ -13,6 +13,

[ethtool PATCH v2 02/12] ethtool.c: don't ignore fread() return value

2016-03-03 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This addresses: ethtool.c:1116:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: David Decotigny <de...@googlers.com> --- ethtool.c | 5 - 1 file changed,

[ethtool PATCH v2 12/12] ethtool.c: use v6 socket when v4 is not available

2016-03-03 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- ethtool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ethtool.c b/ethtool.c index e1acf09..4daf538 100644 --- a/ethtool.c +++ b/ethtool.c @@ -4618,6 +4618,9

[ethtool PATCH v2 06/12] test-common.c: fix test_realloc(NULL, ...)

2016-03-03 Thread David Decotigny
ed-off-by: David Decotigny <de...@googlers.com> --- test-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-common.c b/test-common.c index adc3cd4..cd63d1d 100644 --- a/test-common.c +++ b/test-common.c @@ -100,7 +100,7 @@ void test_free(void *ptr) void *test_reall

[ethtool PATCH v2 01/12] internal.h: change to new sane powerpc64 kernel headers

2016-03-03 Thread David Decotigny
or=format=] ctx->devname, ring_count->data); ^ Signed-off-by: David Decotigny <de...@googlers.com> --- internal.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/internal.h b/internal.h index b5ef646..5f8504d 100644 --- a/internal.h +++ b/internal.h @@ -

[ethtool PATCH v2 00/12] add support for new ETHTOOL_xLINKSETTINGS ioctls

2016-03-03 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This adds support for the new ETHTOOL_xLINKSETTINGS ioctls. This also fixes a few compilation warnings as well as a heap corruption bug. History: v2 added do_seeprom patch added netdev@ as recipient v1 initial subm

[PATCH net-next v9 03/16] net: ethtool: add new ETHTOOL_xLINKSETTINGS API

2016-02-24 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This patch defines a new ETHTOOL_GLINKSETTINGS/SLINKSETTINGS API, handled by the new get_link_ksettings/set_link_ksettings callbacks. This API provides support for most legacy ethtool_cmd fields, adds support for larger link mode masks (up to 406

[PATCH net-next v9 06/16] net: bonding: use __ethtool_get_ksettings

2016-02-24 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- drivers/net/bonding/bond_main.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c i

[PATCH net-next v9 07/16] net: ipvlan: use __ethtool_get_ksettings

2016-02-24 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- drivers/net/ipvlan/ipvlan_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c i

[PATCH net-next v9 02/16] net: usnic: use __ethtool_get_settings

2016-02-24 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infinib

[PATCH net-next v9 05/16] net: usnic: use __ethtool_get_ksettings

2016-02-24 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infinib

[PATCH net-next v9 08/16] net: macvlan: use __ethtool_get_ksettings

2016-02-24 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- drivers/net/macvlan.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 426a2cc..6e953e3 100644 --- a

[PATCH net-next v9 04/16] tx4939: use __ethtool_get_ksettings

2016-02-24 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- arch/mips/txx9/generic/setup_tx4939.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/mips/txx9/generic/setup_tx4939.c b/arch/mips/txx9/generic/setup_tx

[PATCH net-next v9 00/16] new ETHTOOL_GLINKSETTINGS/SLINKSETTINGS API

2016-02-24 Thread David Decotigny
From: David Decotigny <de...@googlers.com> History: v9 - add 'link' in macro, struct and function names - rename ethtool_link_ksettings::parent -> ::base - remove un-needed mlx4 en_dbg_enabled() companion patch - note: bitmap u32[] API patches were merged separately by Kan

[PATCH net-next v9 01/16] net: usnic: remove unused call to ethtool_ops::get_settings

2016-02-24 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_v

[PATCH net-next v9 10/16] net: fcoe: use __ethtool_get_ksettings

2016-02-24 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- drivers/scsi/fcoe/fcoe_transport.c | 36 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drive

[PATCH net-next v9 11/16] net: rdma: use __ethtool_get_ksettings

2016-02-24 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- include/rdma/ib_addr.h | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h index c34c900..931a47b 100644 -

[PATCH net-next v9 13/16] net: bridge: use __ethtool_get_ksettings

2016-02-24 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- net/bridge/br_if.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index c367b3e..b37a1cc 100644 --- a/net/bridge/br_if

  1   2   3   >