[PATCH net-next v7 18/19] net: mlx4: convenience predicate for debug messages

2016-02-07 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ether

[PATCH net-next v7 17/19] net: ethtool: remove unused __ethtool_get_settings

2016-02-07 Thread David Decotigny
From: David Decotigny <de...@googlers.com> replaced by __ethtool_get_ksettings. Signed-off-by: David Decotigny <de...@googlers.com> --- include/linux/ethtool.h | 4 net/core/ethtool.c | 45 ++--- 2 files changed, 14 insertions(+),

[PATCH net-next v7 16/19] net: core: use __ethtool_get_ksettings

2016-02-07 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- net/core/net-sysfs.c | 15 +-- net/packet/af_packet.c | 11 +-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/net/core/net-sysfs.c b/net/core

[PATCH net-next v7 05/19] net: ethtool: add new ETHTOOL_GSETTINGS/SSETTINGS API

2016-02-07 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This patch defines a new ETHTOOL_GSETTINGS/SSETTINGS API, handled by the new get_ksettings/set_ksettings callbacks. This API provides support for most legacy ethtool_cmd fields, adds support for larger link mode masks (up to 4064 bits, variable

[PATCH net-next v7 08/19] net: bonding: use __ethtool_get_ksettings

2016-02-07 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 v7 01/19] lib/bitmap.c: conversion routines to/from u32 array

2016-02-07 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Aimed at transferring bitmaps to/from user-space in a 32/64-bit agnostic way. Tested: unit tests (next patch) on qemu i386, x86_64, ppc, ppc64 BE and LE, ARM. Signed-off-by: David Decotigny <de...@googlers.com> --- include/linux/b

[PATCH net-next v7 04/19] net: usnic: use __ethtool_get_settings

2016-02-07 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 v7 03/19] net: usnic: remove unused call to ethtool_ops::get_settings

2016-02-07 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 v7 02/19] test_bitmap: unit tests for lib/bitmap.c

2016-02-07 Thread David Decotigny
From: David Decotigny <de...@googlers.com> This is mainly testing bitmap construction and conversion to/from u32[] for now. Tested: qemu i386, x86_64, ppc, ppc64 BE and LE, ARM. Signed-off-by: David Decotigny <de...@googlers.com> --- lib/Kconfig.debug

[PATCH net-next v7 00/19] new ETHTOOL_GSETTINGS/SSETTINGS API

2016-02-07 Thread David Decotigny
From: David Decotigny <de...@googlers.com> History: v7 - module_exit in test_bitmap v6 - fix copy_from_user in user/kernel handshake v5 note: please see v4 bullets for a question regarding bitmap.c - minor fix to make allyesconfig/allmodconfig v4 - removed typedef for link mode b

[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

[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 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 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 09/16] net: team: 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/team/team.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 00558e1..2769835 100644 --- a

[PATCH net-next v9 14/16] net: core: 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/core/net-sysfs.c | 15 +-- net/packet/af_packet.c | 11 +-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/net/core/net-sysfs.c b/net/core

[PATCH net-next v9 15/16] net: ethtool: remove unused __ethtool_get_settings

2016-02-24 Thread David Decotigny
From: David Decotigny <de...@googlers.com> replaced by __ethtool_get_link_ksettings. Signed-off-by: David Decotigny <de...@googlers.com> --- include/linux/ethtool.h | 4 net/core/ethtool.c | 45 ++--- 2 files changed, 14 inser

[PATCH net-next v9 16/16] net: mlx4: use new ETHTOOL_G/SSETTINGS API

2016-02-24 Thread David Decotigny
From: David Decotigny <de...@googlers.com> Signed-off-by: David Decotigny <de...@googlers.com> --- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 357 +--- drivers/net/ethernet/mellanox/mlx4/en_main.c| 1 + drivers/net/ethernet/mellanox/mlx4/mlx4_en.h

[PATCH net-next v9 12/16] net: 8021q: 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/8021q/vlan_dev.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 055f0e9..e416a40 100644 --- a/net/8021

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

Re: [PATCH net-next v8 05/19] net: ethtool: add new ETHTOOL_GSETTINGS/SSETTINGS API

2016-02-18 Thread David Decotigny
016-02-09 at 16:29 -0800, David Decotigny wrote: >> From: David Decotigny <de...@googlers.com> >> >> This patch defines a new ETHTOOL_GSETTINGS/SSETTINGS API, handled by >> the new get_ksettings/set_ksettings callbacks. This API provides >> support for most legac

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_

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. >

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

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

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

[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

[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

[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

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

[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

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

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

<    1   2   3   >