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

2017-12-30 Thread David Decotigny
Signed-off-by: David Decotigny On Fri, Dec 29, 2017 at 10:02 AM, Stephen Hemminger wrote: > From: Stephen Hemminger > > In kernel log ths message appears on every boot: > "warning: `NetworkChangeNo' uses legacy ethtool link settings API, > link modes are only par

[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 @@ s

[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 (n->nl

[PATCH v1] mlx4: remove unused fields

2016-09-28 Thread David Decotigny
From: David Decotigny 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.656853] shift exponent 64 is

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

2016-08-23 Thread David Decotigny
On Tue, Aug 23, 2016 at 6:30 AM, Vidya Sagar Ravipati wrote: > From: Vidya Sagar Ravipati > > Enhancing link mode bits to support 25G/50G/100G > for supported and advertised speed mode bits > > Signed-off-by: Vidya Sagar Ravipati > Acked-By: David Decotigny &g

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

2016-06-27 Thread David Decotigny
"10baseKR4/Full" }, > + { 0, ETHTOOL_LINK_MODE_10baseSR4_Full_BIT, > + "10baseSR4/Full" }, > + { 0, 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

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

2016-06-23 Thread David Decotigny
On Thu, Jun 23, 2016 at 7:02 AM, Saeed Mahameed wrote: > From: Gal Pressman > > Add ETHTOOL_LINK_MODE_5baseSR2_Full_BIT bit. > > Signed-off-by: Gal Pressman > Signed-off-by: Saeed Mahameed > Cc: Ben Hutchings > Cc: David Decotigny > --- > include/uapi/lin

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

2016-06-22 Thread David Decotigny
maybe split this into 2 separate patches? On Wed, Jun 22, 2016 at 9:33 AM, Saeed Mahameed wrote: > From: Gal Pressman > > Add ETHTOOL_LINK_MODE_5baseSR2_Full_BIT and MLX5E_50GBASE_SR2 > bits. > > Signed-off-by: Gal Pressman > CC: Ben Hutchings > CC: David Decotigny

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

2016-06-09 Thread David Decotigny
From: David Decotigny [ 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 rebased main patch, removed last

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

2016-06-09 Thread David Decotigny
From: David Decotigny To benefit from this, kernel commit 025c68186e07 ("netlink: add support for NIC driver ioctls") is needed. Signed-off-by: David Decotigny --- configure.ac | 2 +- ethtool.c| 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/conf

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

2016-06-09 Thread David Decotigny
From: David Decotigny 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 nwords").

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

2016-05-09 Thread David Decotigny
id phy_ethtool_get_wol(struct phy_device *phydev, > struct ethtool_wolinfo *wol); > +int phy_ethtool_get_link_ksettings(struct net_device *ndev, > + struct ethtool_link_ksettings *cmd); > +int phy_ethtool_set_link_ksettings(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

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

2016-05-09 Thread David Decotigny
From: David Decotigny [ 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 rebased main patch, removed last

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

2016-05-09 Thread David Decotigny
From: David Decotigny 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 nwords").

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

2016-05-09 Thread David Decotigny
From: David Decotigny To benefit from this, kernel commit 025c68186e07 ("netlink: add support for NIC driver ioctls") is needed. Signed-off-by: David Decotigny --- configure.ac | 2 +- ethtool.c| 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/conf

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 callbacks {get|

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

2016-05-02 Thread David Decotigny
From: David Decotigny To benefit from this, kernel commit 025c68186e07 ("netlink: add support for NIC driver ioctls") is needed. Signed-off-by: David Decotigny --- configure.ac | 2 +- ethtool.c| 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/conf

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

2016-05-02 Thread David Decotigny
From: David Decotigny 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 nwords").

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

2016-05-02 Thread David Decotigny
From: David Decotigny [ 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 rebased main patch, removed last

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

2016-04-22 Thread David Decotigny
From: David Decotigny [ 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 patch, removed last patch

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

2016-04-22 Thread David Decotigny
From: David Decotigny 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 nwords").

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

2016-04-22 Thread David Decotigny
From: David Decotigny To benefit from this, kernel commit 025c68186e07 ("netlink: add support for NIC driver ioctls") is needed. Signed-off-by: David Decotigny --- configure.ac | 2 +- ethtool.c| 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/conf

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

2016-03-25 Thread David Decotigny
From: David Decotigny 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 when AF_INET not available" v4

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

2016-03-25 Thread David Decotigny
From: David Decotigny To benefit from this, kernel commit 025c68186e07 ("netlink: add support for NIC driver ioctls") is needed. Signed-off-by: David Decotigny --- configure.ac | 2 +- ethtool.c| 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/conf

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

2016-03-25 Thread David Decotigny
From: David Decotigny 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 nwords").

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

2016-03-21 Thread David Decotigny
, 2016 at 10:31 AM, David Miller wrote: > From: David Decotigny > 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 net

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

2016-03-21 Thread David Decotigny
From: David Decotigny 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 nwords").

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

2016-03-21 Thread David Decotigny
From: David Decotigny Signed-off-by: David Decotigny --- 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/configure.ac +++ b/configure.ac @@ -15,7 +15,7

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

2016-03-21 Thread David Decotigny
From: David Decotigny History: v6 re-added last patch, to use AF_NETLINK when AF_INET not available v5 rebased main patch, removed last patch "use AF_LOCAL when AF_INET not available" v4 review Ben Hutchings: using AF_UNIX instead of INET6 in the absence of

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

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

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

2016-03-21 Thread David Decotigny
From: David Decotigny Updates: commit 793cf87de9d1 ("ethtool: Set cmd field in ETHTOOL_GLINKSETTINGS response to wrong nwords") Signed-off-by: David Decotigny --- include/uapi/linux/ethtool.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/

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

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

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

2016-03-19 Thread David Decotigny
From: David Decotigny 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 --- net/netlink/af_netlink.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff

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

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

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

2016-03-19 Thread David Decotigny
From: David Decotigny Updates: commit 793cf87de9d1 ("ethtool: Set cmd field in ETHTOOL_GLINKSETTINGS response to wrong nwords") Signed-off-by: David Decotigny --- include/uapi/linux/ethtool.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/

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 wrote: > Just sent v5 of the series: now only this patch left. Applied all your > suggestions. > > Many thanks f

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

2016-03-15 Thread David Decotigny
: > 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_ROUND_UP(nbits, 32); &

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

2016-03-15 Thread David Decotigny
From: David Decotigny More info with kernel commit 8d3f2806f8fb ("Merge branch 'ethtool-ksettings'"). Signed-off-by: David Decotigny --- ethtool.c | 681 - internal.h | 67 ++ test-cmdline.c | 13 ++

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 wrote: > On Fri, 2016-03-11 at 09:58 -0800, David Decotigny wrote: >> From: David Decotigny >> >> >> Signed-off-by: David Decotign

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 w

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

2016-03-11 Thread David Decotigny
From: David Decotigny 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 | /mnt/ethtool -E eth0 length

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

2016-03-11 Thread David Decotigny
From: David Decotigny 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 --- ethtool.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ethtool.c b

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

2016-03-11 Thread David Decotigny
From: David Decotigny More info with kernel SHA1: 8d3f2806f8fbd9b22 "Merge branch 'ethtool-ksettings'". Signed-off-by: David Decotigny --- ethtool.c | 682 +++-- internal.h | 67 ++ test-cmdline.c | 12 +

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

2016-03-11 Thread David Decotigny
From: David Decotigny This cover changes up to: commit 14e2037902d65213842b4e40305ff54a64abbcb6 Author: Nicolas Dichtel Date: Fri Mar 4 11:52:19 2016 +0100 ethtool.h: define INT_MAX for userland Signed-off-by: David Decotigny --- ethtool-copy.h | 478

[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 This is required for recent version of ethtool.h . This covers kernel.h up to: commit b5d3755a22e0cc4c369c0985aef0c52c2477c1e7 Author: Nicolas Dichtel Date: Fri Mar 4 11:52:16 2016 +0100 uapi: define DIV_ROUND_UP for userland Signed-off-by: David

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

2016-03-11 Thread David Decotigny
From: David Decotigny Signed-off-by: David Decotigny --- 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 @@ opt_found: /* Open control socket

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

2016-03-11 Thread David Decotigny
From: David Decotigny 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(). Signed-off-by: David

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

2016-03-11 Thread David Decotigny
Maciej Żenczykowski Signed-off-by: David Decotigny --- 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 *te

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

2016-03-11 Thread David Decotigny
-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 Signed-off-by: David Decotigny --- marvell.c | 21

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

2016-03-11 Thread David Decotigny
From: Maciej Żenczykowski 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: Maciej Żenczykowski Signed-off-by: David Decotigny ---

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

2016-03-11 Thread David Decotigny
From: David Decotigny 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 use stdbool.h

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

2016-03-11 Thread David Decotigny
of type 'long long unsigned int', but argument 3 has type '__u64' [-Werror=format=] ctx->devname, ring_count->data); ^ Signed-off-by: Maciej Żenczykowski Signed-off-by: David Decotigny --- internal.h | 6 ++ 1 file changed, 6 insertions(+) diff

[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 This is required for recent version of ethtool.h . This covers kernel.h up to: commit b5d3755a22e0cc4c369c0985aef0c52c2477c1e7 Author: Nicolas Dichtel Date: Fri Mar 4 11:52:16 2016 +0100 uapi: define DIV_ROUND_UP for userland Signed-off-by: David

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

2016-03-07 Thread David Decotigny
From: David Decotigny 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(). Signed-off-by: David

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

2016-03-07 Thread David Decotigny
-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 Signed-off-by: David Decotigny --- marvell.c | 21

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

2016-03-07 Thread David Decotigny
Maciej Żenczykowski Signed-off-by: David Decotigny --- 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 *te

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

2016-03-07 Thread David Decotigny
From: David Decotigny This cover changes up to: commit 14e2037902d65213842b4e40305ff54a64abbcb6 Author: Nicolas Dichtel Date: Fri Mar 4 11:52:19 2016 +0100 ethtool.h: define INT_MAX for userland Signed-off-by: David Decotigny --- ethtool-copy.h | 478

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

2016-03-07 Thread David Decotigny
From: David Decotigny More info with kernel SHA1: 8d3f2806f8fbd9b22 "Merge branch 'ethtool-ksettings'". Signed-off-by: David Decotigny --- ethtool.c | 682 +++-- internal.h | 67 ++ test-cmdline.c | 12 +

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

2016-03-07 Thread David Decotigny
From: Maciej Żenczykowski 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: Maciej Żenczykowski Signed-off-by: David Decotigny ---

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

2016-03-07 Thread David Decotigny
From: David Decotigny 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 | /mnt/ethtool -E eth0 length

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

2016-03-07 Thread David Decotigny
From: David Decotigny Signed-off-by: David Decotigny --- 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 @@ opt_found: /* Open control socket

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

2016-03-07 Thread David Decotigny
From: David Decotigny 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 --- ethtool.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ethtool.c b

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

2016-03-07 Thread David Decotigny
From: David Decotigny 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 use stdbool.h

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

2016-03-07 Thread David Decotigny
of type 'long long unsigned int', but argument 3 has type '__u64' [-Werror=format=] ctx->devname, ring_count->data); ^ Signed-off-by: Maciej Żenczykowski Signed-off-by: David Decotigny --- internal.h | 6 ++ 1 file changed, 6 insertions(+) diff

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

2016-03-04 Thread David Decotigny
From: David Decotigny 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 --- ethtool.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ethtool.c b

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

2016-03-04 Thread David Decotigny
From: David Decotigny This cover changes up to: commit 3f1ac7a700d039c61d8d8b99f28d605d489a60cf Author: David Decotigny Date: Wed Feb 24 10:57:59 2016 -0800 net: ethtool: add new ETHTOOL_xLINKSETTINGS API Signed-off-by: David Decotigny --- ethtool-copy.h | 485

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

2016-03-04 Thread David Decotigny
From: David Decotigny Signed-off-by: David Decotigny --- 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,7 @@ #ifdef HAVE_CONFIG_H #include "et

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

2016-03-04 Thread David Decotigny
From: David Decotigny Signed-off-by: David Decotigny --- 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 @@ typedef int32_t s32; #include "ethtool-copy.h"

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

2016-03-04 Thread David Decotigny
From: David Decotigny More info with kernel SHA1: 8d3f2806f8fbd9b22 "Merge branch 'ethtool-ksettings'". Signed-off-by: David Decotigny --- ethtool.c | 682 +++-- internal.h | 66 ++ test-cmdline.c | 12 +

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

2016-03-04 Thread David Decotigny
-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 Signed-off-by: David Decotigny --- marvell.c | 21

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

2016-03-04 Thread David Decotigny
From: Maciej Żenczykowski 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: Maciej Żenczykowski Signed-off-by: David Decotigny ---

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

2016-03-04 Thread David Decotigny
From: David Decotigny Signed-off-by: David Decotigny --- 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 @@ opt_found: /* Open control socket

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

2016-03-04 Thread David Decotigny
From: David Decotigny 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 | /mnt/ethtool -E eth0 length

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

2016-03-04 Thread David Decotigny
Maciej Żenczykowski Signed-off-by: David Decotigny --- 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 *te

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

2016-03-04 Thread David Decotigny
From: David Decotigny 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(). Signed-off-by: David

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

2016-03-04 Thread David Decotigny
ng long unsigned int', but argument 3 has type '__u64' [-Werror=format=] ctx->devname, ring_count->data); ^ Signed-off-by: Maciej Żenczykowski Signed-off-by: David Decotigny --- internal.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/inte

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

2016-03-04 Thread David Decotigny
From: David Decotigny 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 recipient v1 initial

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

2016-03-03 Thread David Decotigny
From: David Decotigny 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(). Signed-off-by: David

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

2016-03-03 Thread David Decotigny
From: David Decotigny This cover changes up to: commit 3f1ac7a700d039c61d8d8b99f28d605d489a60cf Author: David Decotigny Date: Wed Feb 24 10:57:59 2016 -0800 net: ethtool: add new ETHTOOL_xLINKSETTINGS API Signed-off-by: David Decotigny --- ethtool-copy.h | 485

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

2016-03-03 Thread David Decotigny
From: David Decotigny Signed-off-by: David Decotigny --- 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 @@ typedef int32_t s32; #include "ethtool-copy.h"

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

2016-03-03 Thread David Decotigny
From: David Decotigny More info with kernel SHA1: 8d3f2806f8fbd9b22 "Merge branch 'ethtool-ksettings'". Signed-off-by: David Decotigny --- ethtool.c | 682 +++-- internal.h | 66 ++ test-cmdline.c | 12 +

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

2016-03-03 Thread David Decotigny
From: Maciej Żenczykowski 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 --- test-features.c | 2 +- 1 file chan

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

2016-03-03 Thread David Decotigny
From: David Decotigny 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 | /mnt/ethtool -E eth0 length

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

2016-03-03 Thread David Decotigny
-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 --- marvell.c | 21 +++-- 1 file changed, 11 insertions

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

2016-03-03 Thread David Decotigny
From: David Decotigny Signed-off-by: David Decotigny --- 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,7 @@ #ifdef HAVE_CONFIG_H #include "et

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

2016-03-03 Thread David Decotigny
From: David Decotigny 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 --- ethtool.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ethtool.c b

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

2016-03-03 Thread David Decotigny
From: David Decotigny Signed-off-by: David Decotigny --- 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 @@ opt_found: /* Open control socket

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

2016-03-03 Thread David Decotigny
From: Maciej Żenczykowski This fixes: test-common.c: In function 'test_realloc': test-common.c:109:8: error: 'block' may be used uninitialized in this function [-Werror=maybe-uninitialized] block = realloc(block, sizeof(*block) + size); ^ Signed-off

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

2016-03-03 Thread David Decotigny
ng long unsigned int', but argument 3 has type '__u64' [-Werror=format=] ctx->devname, ring_count->data); ^ Signed-off-by: David Decotigny --- internal.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/internal.h b/internal.h index b5ef

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

2016-03-03 Thread David Decotigny
From: David Decotigny 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 submission

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

2016-02-24 Thread David Decotigny
From: David Decotigny 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 4064 bits, variable length

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

2016-02-24 Thread David Decotigny
From: David Decotigny Signed-off-by: David Decotigny --- 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 index a6527d5..b6236ff 100644 --- a/drivers/net/bonding

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

2016-02-24 Thread David Decotigny
From: David Decotigny Signed-off-by: David Decotigny --- 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 index a7ca1c5..5802b90 100644 --- a/drivers/net/ipvlan

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

2016-02-24 Thread David Decotigny
From: David Decotigny Signed-off-by: David Decotigny --- 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/infiniband/hw/usnic/usnic_ib_verbs.c index ea003ec..1cf19a3 100644

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

2016-02-24 Thread David Decotigny
From: David Decotigny Signed-off-by: David Decotigny --- 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/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c

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

2016-02-24 Thread David Decotigny
From: David Decotigny Signed-off-by: David Decotigny --- 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/infiniband/hw/usnic/usnic_ib_verbs.c index 1cf19a3..a5bfbba

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

2016-02-24 Thread David Decotigny
From: David Decotigny Signed-off-by: David Decotigny --- 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_tx4939.c index e3733cd..402ac2e 100644 --- a/arch/mips

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

2016-02-24 Thread David Decotigny
From: David Decotigny 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 Liang v8 - bitmap u3

[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 Signed-off-by: David Decotigny --- 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_verbs.c index 6cdb4d2..ea003ec 100644 --- a/drivers

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

2016-02-24 Thread David Decotigny
From: David Decotigny Signed-off-by: David Decotigny --- drivers/scsi/fcoe/fcoe_transport.c | 36 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c index d7597c0..641c60e

  1   2   3   >