[net-next PATCH 1/3] device: bus_type: Introduce num_vf callback

2017-01-18 Thread Phil Sutter
This allows for bus types to implement their own method of retrieving the number of virtual functions a NIC on that type of bus supports. Signed-off-by: Phil Sutter <p...@nwl.cc> --- include/linux/device.h | 4 1 file changed, 4 insertions(+) diff --git a/include/linux/device.h b/i

[net-next PATCH 3/3] device: Implement a bus agnostic dev_num_vf routine

2017-01-18 Thread Phil Sutter
Now that pci_bus_type has num_vf callback set, dev_num_vf can be implemented in a bus type independent way and the check for whether a PCI device is being handled in rtnetlink can be dropped. Signed-off-by: Phil Sutter <p...@nwl.cc> --- include/linux/device.h | 7 +++ include/linux

[net-next PATCH 2/3] PCI: implement num_vf bus type callback

2017-01-18 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- drivers/pci/pci-driver.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 1ccce1cd6aca4..63d8e18fb6b14 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -

Re: [net-next PATCH v6 0/3] net: dummy: Introduce dummy virtual functions

2017-01-13 Thread Phil Sutter
On Wed, Jan 11, 2017 at 02:38:57PM +0100, Phil Sutter wrote: > On Fri, Jan 06, 2017 at 08:38:04PM -0500, David Miller wrote: > > From: Phil Sutter <p...@nwl.cc> > > Date: Thu, 5 Jan 2017 20:09:10 +0100 > > > > > This series adds VF support to dummy device dri

[iproute PATCH] tc: m_xt: Drop needless parentheses from #if checks

2017-01-13 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- tc/m_xt.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tc/m_xt.c b/tc/m_xt.c index 57ed40d7aa3a8..e59df8e10afef 100644 --- a/tc/m_xt.c +++ b/tc/m_xt.c @@ -77,7 +77,7 @@ static struct xtables_globals tcipt_g

Re: [iproute PATCH] tc: m_xt: Fix segfault with iptables-1.6.0

2017-01-12 Thread Phil Sutter
On Thu, Jan 12, 2017 at 11:34:49AM -0800, Stephen Hemminger wrote: > On Thu, 12 Jan 2017 15:22:49 +0100 > Phil Sutter <p...@nwl.cc> wrote: > > > Said iptables version introduced struct xtables_globals field > > 'compat_rev', a function pointer. Initializing it is mandat

[iproute PATCH] tc: m_xt: Fix segfault with iptables-1.6.0

2017-01-12 Thread Phil Sutter
\ | action xt -j MARK --set-mark 20 Signed-off-by: Phil Sutter <p...@nwl.cc> --- tc/m_xt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tc/m_xt.c b/tc/m_xt.c index dbb54981462ee..57ed40d7aa3a8 100644 --- a/tc/m_xt.c +++ b/tc/m_xt.c @@ -77,6 +77,9 @@ static struct xtables_g

Re: [net-next PATCH v6 0/3] net: dummy: Introduce dummy virtual functions

2017-01-11 Thread Phil Sutter
Hi David, On Fri, Jan 06, 2017 at 08:38:04PM -0500, David Miller wrote: > From: Phil Sutter <p...@nwl.cc> > Date: Thu, 5 Jan 2017 20:09:10 +0100 > > > This series adds VF support to dummy device driver after adding the > > necessary infrastructure changes: > &

[net-next PATCH v6 0/3] net: dummy: Introduce dummy virtual functions

2017-01-05 Thread Phil Sutter
to the old behaviour. Patch 3 then implements VF support in dummy, without the fake PCI parent device hack from v5. Phil Sutter (3): net: net_device_ops: Introduce ndo_get_vf_count net: rtnetlink: Use a local dev_num_vf() implementation net: dummy: Introduce dummy virtual functions drivers/net

[net-next PATCH v6 2/3] net: rtnetlink: Use a local dev_num_vf() implementation

2017-01-05 Thread Phil Sutter
to it and have it check for parent existence only in the fallback case. This in turn allows to eliminate parent existence checks in callers. Signed-off-by: Phil Sutter <p...@nwl.cc> --- Changes since v5: - Introduced this patch. --- include/linux/pci.h | 2 -- net/core/rtnetlink.

[net-next PATCH v6 1/3] net: net_device_ops: Introduce ndo_get_vf_count

2017-01-05 Thread Phil Sutter
The idea is to allow drivers to implement this callback in order to provide a custom way to return the number of virtual functions present on the device. Signed-off-by: Phil Sutter <p...@nwl.cc> --- Changes since v5: - Introduced this patch. --- include/linux/netdevice.h | 5 +

[net-next PATCH v6 3/3] net: dummy: Introduce dummy virtual functions

2017-01-05 Thread Phil Sutter
for testing the user-kernel interface, this patch allows to turn dummy into a PF with a configurable amount of VFs. Signed-off-by: Phil Sutter <p...@nwl.cc> --- Changes since v5: - Got rid of fake PCI parent hack altogether, implement ndo_get_vf_count instead. Changes since v4: - Init

Re: [RESEND net-next PATCH v5] net: dummy: Introduce dummy virtual functions

2017-01-04 Thread Phil Sutter
On Wed, Jan 04, 2017 at 02:09:14PM -0500, David Miller wrote: > From: Phil Sutter <p...@nwl.cc> > Date: Wed, 4 Jan 2017 14:44:06 +0100 > > > The idea for this was born when testing VF support in iproute2 which was > > impeded by hardware requirements. In fact, no

[RESEND net-next PATCH v5] net: dummy: Introduce dummy virtual functions

2017-01-04 Thread Phil Sutter
-off-by: Sabrina Dubroca <s...@queasysnail.net> Signed-off-by: Phil Sutter <p...@nwl.cc> --- Changes since v4: - Initialize pci_pdev.sriov at runtime - older gcc versions don't allow initializing fields of anonymous unions at declaration time. - Rebased onto current net-next/master. C

Re: [PATCH v5] net: dummy: Introduce dummy virtual functions

2016-12-21 Thread Phil Sutter
On Wed, Dec 21, 2016 at 01:32:00PM -0500, David Miller wrote: > From: Phil Sutter <p...@nwl.cc> > Date: Tue, 20 Dec 2016 23:26:21 +0100 > > > The idea for this was born when testing VF support in iproute2 which was > > impeded by hardware requirements. In fact, no

[PATCH v5] net: dummy: Introduce dummy virtual functions

2016-12-20 Thread Phil Sutter
-off-by: Sabrina Dubroca <s...@queasysnail.net> Signed-off-by: Phil Sutter <p...@nwl.cc> --- Changes since v4: - Initialize pci_pdev.sriov at runtime - older gcc versions don't allow initializing fields of anonymous unions at declaration time. - Rebased onto current net-next/master. C

Re: [PATCH] ip: vfinfo: remove code duplication for IFLA_VF_RSS_QUERY_EN

2016-12-16 Thread Phil Sutter
ke Git messed up during a rebase and the obviously wrong result was overlooked. Acked-by: Phil Sutter <p...@nwl.cc>

Re: [iproute PATCH v2 08/18] ss: Turn generic_proc_open() wrappers into macros

2016-12-05 Thread Phil Sutter
On Mon, Dec 05, 2016 at 05:02:20PM +, David Laight wrote: > From: Phil Sutter > > Sent: 02 December 2016 10:40 > > Signed-off-by: Phil Sutter <p...@nwl.cc> > > --- > > misc/ss.c | 89 > > ++- &g

Re: [PATCH iproute2 1/1] tc: updated man page to reflect handle-id use in filter GET command.

2016-12-05 Thread Phil Sutter
On Fri, Dec 02, 2016 at 02:06:22PM -0800, Stephen Hemminger wrote: > On Thu, 1 Dec 2016 15:20:44 -0500 > Roman Mashak wrote: > > > Signed-off-by: Roman Mashak > > --- > > man/man8/tc.8 | 6 -- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > >

[iproute PATCH v2 10/18] ss: Make user_ent_hash_build_init local to user_ent_hash_build()

2016-12-02 Thread Phil Sutter
By having it statically defined, there is no need for it to be global. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 97fcfd4a85548..44386c82c7578 100644 --- a/misc/ss.c +++ b/mis

[iproute PATCH v2 16/18] ss: Make sstate_name local to sock_state_print()

2016-12-02 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index e82c416b5fa72..8439f473d7f7b 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -655,21 +655,6 @@ static unsigned lon

[iproute PATCH v2 00/18] ss: Minor code review

2016-12-02 Thread Phil Sutter
This is a series of misc changes to ss code which happened as fall-out when working on a unified output formatter (still unfinished). Changes since v1: - Rebased onto current upstream, resolved conflicts in patch 4 generated by previously added SCTP socket support. Phil Sutter (18): ss: Mark

[iproute PATCH v2 14/18] ss: Get rid of single-fielded struct snmpstat

2016-12-02 Thread Phil Sutter
A struct with only a single field does not make much sense. Besides that, it was used by print_summary() only. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index ec71c21

[iproute PATCH v2 17/18] ss: Make sstate_namel local to scan_state()

2016-12-02 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 8439f473d7f7b..c72aba7e65ad3 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -666,21 +666,6 @@ static cons

[iproute PATCH v2 05/18] ss: introduce proc_ctx_print()

2016-12-02 Thread Phil Sutter
This consolidates identical code in three places. While the function name is not quite perfect as there is different proc_ctx printing code in netlink_show_one() as well, I sadly didn't find a more suitable one. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.

[iproute PATCH v2 01/18] ss: Mark fall through in arg parsing switch()

2016-12-02 Thread Phil Sutter
As there is a certain chance of overlooking this, better add a comment to draw readers' attention. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/ss.c b/misc/ss.c index 07dcd8c209c04..469721fd9aee3 100644 --- a/misc/ss.c +++

[iproute PATCH v2 02/18] ss: Drop empty lines in UDP output

2016-12-02 Thread Phil Sutter
When dumping UDP sockets and show_tcpinfo (-i) is active but not show_mem (-m), print_tcpinfo() does not output anything leading to an empty line being printed after every socket. Fix this by skipping the call to print_tcpinfo() and the previous newline printing in that case. Signed-off-by: Phil

[iproute PATCH v2 18/18] ss: unix_show: No need to initialize members of calloc'ed structs

2016-12-02 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index c72aba7e65ad3..f23aa6be33174 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -3066,8 +3066,6 @@ static int unix_show(struct filter *f) i

[iproute PATCH v2 13/18] ss: Get rid of useless goto in handle_follow_request()

2016-12-02 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index c498478421190..ec71c21ce6a4a 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -3632,7 +3632,7 @@ static int generic_show_sock(const

[iproute PATCH v2 11/18] ss: Make some variables function-local

2016-12-02 Thread Phil Sutter
addrp_width and screen_width are used in main() only, so no need to have them globally available. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 44386c82c7578..3662f5f4861c7

[iproute PATCH v2 07/18] ss: Eliminate unix_use_proc()

2016-12-02 Thread Phil Sutter
This function is used only at a single place anymore, so replace the call to it by it's content, which makes that specific part of unix_show() consistent with e.g. tcp_show(). Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 8 ++-- 1 file changed, 2 insertions(+), 6 del

[iproute PATCH v2 12/18] ss: Make slabstat_ids local to get_slabstat()

2016-12-02 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 3662f5f4861c7..c498478421190 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -601,21 +601,19 @@ struct slabstat { static

[iproute PATCH v2 15/18] ss: Make unix_state_map local to unix_show()

2016-12-02 Thread Phil Sutter
Also make it const, since there won't be any write access happening. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index c7818eadf9e75..e82c416b5fa72 100644 --- a/misc/ss.c +++ b/mis

[iproute PATCH v2 08/18] ss: Turn generic_proc_open() wrappers into macros

2016-12-02 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 89 ++- 1 file changed, 19 insertions(+), 70 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index ad38eb97b0055..71040a82ca6b1 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -

[iproute PATCH v2 06/18] ss: Drop list traversal from unix_stats_print()

2016-12-02 Thread Phil Sutter
in the same function. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 137 +- 1 file changed, 64 insertions(+), 73 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index fcbaecbe25a2f..0de336200142f 100644 --- a/misc/ss.c

[iproute PATCH v2 04/18] ss: Use sockstat->type in all socket types

2016-12-02 Thread Phil Sutter
Unix sockets used that field already to hold info about the socket type. By replicating this approach in all other socket types, we can get rid of protocol parameter in inet_stats_print() and have sock_state_print() figure things out by itself. Signed-off-by: Phil Sutter <p...@nwl.cc> ---

[iproute PATCH v2 09/18] ss: Make tmr_name local to tcp_timer_print()

2016-12-02 Thread Phil Sutter
It's used only there, so no need to have it globally defined. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 71040a82ca6b1..97fcfd4a85548 100644 --- a/misc/ss.c +++

[iproute PATCH v2 03/18] ss: Add missing tab when printing UNIX details

2016-12-02 Thread Phil Sutter
When dumping UNIX sockets and show_details is active but not show_mem (ss -xne), the socket details are printed without being prefixed by tab. Fix this by printing the tab character when either one of '-e' or '-m' has been specified. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss

Re: iproute2 public git outdated?

2016-12-01 Thread Phil Sutter
On Thu, Dec 01, 2016 at 10:39:10PM +0200, Rami Rosen wrote: > I suggest that you will try again now, it seems that the iproute2 git > repo was updated in the last 2-4 hours, and "git log" in master shows > now a patch from 30 of November (actually it is your "Add notes about > dropped IPv4 route

iproute2 public git outdated?

2016-12-01 Thread Phil Sutter
Hi, I am using iproute2's public git repo at this URL: git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git To my surprise, neither master nor net-next branches have received new commits since end of October. Did the repo location change or was it just not updated for a while?

[iproute PATCH] man: ip-route.8: Add notes about dropped IPv4 route cache

2016-11-30 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/ip-route.8.in | 6 ++ 1 file changed, 6 insertions(+) diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in index d4fae3cc783ba..c0acaa0020ef7 100644 --- a/man/man8/ip-route.8.in +++ b/man/man8/ip-route.8.in @@ -924,6 +

Re: ip manpage comments

2016-11-28 Thread Phil Sutter
Hi, On Sat, Nov 26, 2016 at 09:49:32PM -0500, Jon LaBadie wrote: > Though not new to *nix, I am new to using the ip(8) command. > Thus some of my historical assumptions about ip may be wrong. > > It seems that an inclusive manpage for the ip command was > broken up into a shorter ip(8) manpage

[net-next PATCH v4] net: dummy: Introduce dummy virtual functions

2016-11-23 Thread Phil Sutter
-off-by: Sabrina Dubroca <s...@queasysnail.net> Signed-off-by: Phil Sutter <p...@nwl.cc> --- Changes since v3: - Changed type of vf_mac field from unsigned char to u8. - Column-aligned structs' field names. Changes since v2: - Fixed oops on reboot (need to initialize parent device mutex

Re: [net-next PATCH v3] net: dummy: Introduce dummy virtual functions

2016-11-23 Thread Phil Sutter
On Wed, Nov 23, 2016 at 05:26:28AM -0800, Eric Dumazet wrote: > On Wed, 2016-11-23 at 13:41 +0100, Phil Sutter wrote: > > > +struct vf_data_storage { > > + unsigned char vf_mac[ETH_ALEN]; > > + u16 pf_vlan; /* When set, guest VLAN config not allowed. */ > >

[net-next PATCH v3] net: dummy: Introduce dummy virtual functions

2016-11-23 Thread Phil Sutter
-off-by: Sabrina Dubroca <s...@queasysnail.net> Signed-off-by: Phil Sutter <p...@nwl.cc> --- Changes since v2: - Fixed oops on reboot (need to initialize parent device mutex). - Got rid of potential mem leak noticed by Eric Dumazet. - Dropped stray newline insertion. Changes since v1: -

Re: [net-next PATCH v2] net: dummy: Introduce dummy virtual functions

2016-11-18 Thread Phil Sutter
Hi, On Fri, Nov 18, 2016 at 12:04:14AM +0200, Or Gerlitz wrote: > On Mon, Nov 14, 2016 at 3:02 PM, Phil Sutter <p...@nwl.cc> wrote: > > > Due to the assumption that all PFs are PCI devices, this implementation > > is not completely straightforward: In order to allow

[net-next PATCH v2] net: dummy: Introduce dummy virtual functions

2016-11-14 Thread Phil Sutter
-off-by: Sabrina Dubroca <s...@queasysnail.net> Signed-off-by: Phil Sutter <p...@nwl.cc> --- Changes since v1: - Fixed issues reported by kbuild test robot: - pci_dev->sriov is only present if CONFIG_PCI_ATS is active. - pci_bus_type does not exist if CONFIG_PCI is not defined. -

[net-next PATCH] net: dummy: Introduce dummy virtual functions

2016-11-11 Thread Phil Sutter
-off-by: Sabrina Dubroca <s...@queasysnail.net> Signed-off-by: Phil Sutter <p...@nwl.cc> --- drivers/net/dummy.c | 195 +++- 1 file changed, 193 insertions(+), 2 deletions(-) diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c index 6

[iproute PATCH 10/18] ss: Make user_ent_hash_build_init local to user_ent_hash_build()

2016-11-11 Thread Phil Sutter
By having it statically defined, there is no need for it to be global. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 477910a842726..3e5c93bb7c6f9 100644 --- a/misc/ss.c +++ b/mis

[iproute PATCH 17/18] ss: Make sstate_namel local to scan_state()

2016-11-11 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 14492da256c61..6e669f7b0593c 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -634,21 +634,6 @@ static unsigned lon

[iproute PATCH 14/18] ss: Get rid of single-fielded struct snmpstat

2016-11-11 Thread Phil Sutter
A struct with only a single field does not make much sense. Besides that, it was used by print_summary() only. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index b06b9e6

[iproute PATCH 02/18] ss: Drop empty lines in UDP output

2016-11-11 Thread Phil Sutter
When dumping UDP sockets and show_tcpinfo (-i) is active but not show_mem (-m), print_tcpinfo() does not output anything leading to an empty line being printed after every socket. Fix this by skipping the call to print_tcpinfo() and the previous newline printing in that case. Signed-off-by: Phil

[iproute PATCH 07/18] ss: Eliminate unix_use_proc()

2016-11-11 Thread Phil Sutter
This function is used only at a single place anymore, so replace the call to it by it's content, which makes that specific part of unix_show() consistent with e.g. tcp_show(). Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 8 ++-- 1 file changed, 2 insertions(+), 6 del

[iproute PATCH 13/18] ss: Get rid of useless goto in handle_follow_request()

2016-11-11 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index c3a5148e05013..b06b9e6fa9884 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -3443,7 +3443,7 @@ static int generic_show_sock(const

[iproute PATCH 03/18] ss: Add missing tab when printing UNIX details

2016-11-11 Thread Phil Sutter
When dumping UNIX sockets and show_details is active but not show_mem (ss -xne), the socket details are printed without being prefixed by tab. Fix this by printing the tab character when either one of '-e' or '-m' has been specified. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss

[iproute PATCH 06/18] ss: Drop list traversal from unix_stats_print()

2016-11-11 Thread Phil Sutter
in the same function. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 137 +- 1 file changed, 64 insertions(+), 73 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index b3475cc96ae7b..36b18ff2ce3cb 100644 --- a/misc/ss.c

[iproute PATCH 18/18] ss: unix_show: No need to initialize members of calloc'ed structs

2016-11-11 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 6e669f7b0593c..1e3ccf28c4e84 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -2877,8 +2877,6 @@ static int unix_show(struct filter *f) i

[iproute PATCH 15/18] ss: Make unix_state_map local to unix_show()

2016-11-11 Thread Phil Sutter
Also make it const, since there won't be any write access happening. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 85fc6096a986f..cf4187310816e 100644 --- a/misc/ss.c +++ b/mis

[iproute PATCH 16/18] ss: Make sstate_name local to sock_state_print()

2016-11-11 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index cf4187310816e..14492da256c61 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -634,21 +634,6 @@ static unsigned lon

[iproute PATCH 11/18] ss: Make some variables function-local

2016-11-11 Thread Phil Sutter
addrp_width and screen_width are used in main() only, so no need to have them globally available. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 3e5c93bb7c6f9..d546a00eb2c24

[iproute PATCH 08/18] ss: Turn generic_proc_open() wrappers into macros

2016-11-11 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 89 ++- 1 file changed, 19 insertions(+), 70 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 8e021731cf71c..e9fecd39a8493 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -

[iproute PATCH 01/18] ss: Mark fall through in arg parsing switch()

2016-11-11 Thread Phil Sutter
As there is a certain chance of overlooking this, better add a comment to draw readers' attention. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/ss.c b/misc/ss.c index dd77b8153b6da..c20bfbdb01c62 100644 --- a/misc/ss.c +++

[iproute PATCH 00/18] ss: Minor code review

2016-11-11 Thread Phil Sutter
This is a series of misc changes to ss code which happened as fall-out when working on a unified output formatter (still unfinished). Phil Sutter (18): ss: Mark fall through in arg parsing switch() ss: Drop empty lines in UDP output ss: Add missing tab when printing UNIX details ss: Use

[iproute PATCH 09/18] ss: Make tmr_name local to tcp_timer_print()

2016-11-11 Thread Phil Sutter
It's used only there, so no need to have it globally defined. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index e9fecd39a8493..477910a842726 100644 --- a/misc/ss.c +++

[iproute PATCH 05/18] ss: introduce proc_ctx_print()

2016-11-11 Thread Phil Sutter
This consolidates identical code in three places. While the function name is not quite perfect as there is different proc_ctx printing code in netlink_show_one() as well, I sadly didn't find a more suitable one. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.

[iproute PATCH 04/18] ss: Use sockstat->type in all socket types

2016-11-11 Thread Phil Sutter
Unix sockets used that field already to hold info about the socket type. By replicating this approach in all other socket types, we can get rid of protocol parameter in inet_stats_print() and have sock_state_print() figure things out by itself. Signed-off-by: Phil Sutter <p...@nwl.cc> ---

[iproute PATCH 12/18] ss: Make slabstat_ids local to get_slabstat()

2016-11-11 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index d546a00eb2c24..c3a5148e05013 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -580,21 +580,19 @@ struct slabstat { static

[iproute PATCH v2 0/2] ss: Implement sctp_diag support

2016-11-09 Thread Phil Sutter
description updated accordingly. - Patch 2 also adds the new flag to ss man page. Phil Sutter (2): include: Add linux/sctp.h ss: Add support for SCTP protocol include/linux/sctp.h | 1005 ++ man/man8/ss.8|3 + misc/ss.c| 212

[iproute PATCH v2 2/2] ss: Add support for SCTP protocol

2016-11-09 Thread Phil Sutter
This makes use of the sctp_diag interface recently added to the kernel. Joint work with Xin Long who provided the PoC implementation which I merely polished up a bit. Signed-off-by: Phil Sutter <p...@nwl.cc> --- Changes since v1: - Added missing bits to ss man page. --- man/man8/ss.8

[iproute PATCH v2 1/2] include: Add linux/sctp.h

2016-11-09 Thread Phil Sutter
Add sanitized UAPI linux/sctp.h header file. Signed-off-by: Phil Sutter <p...@nwl.cc> --- Changes since v1: - File properly extracted from upstream kernel headers. - Description updated. --- include/linux/sctp.h | 1005 ++ 1 file changed

[iproute PATCH 1/2] ipaddress: Simplify vf_info parsing

2016-11-08 Thread Phil Sutter
F_SPOOFCHK or not. Signed-off-by: Phil Sutter <p...@nwl.cc> --- ip/ipaddress.c | 44 ++-- 1 file changed, 10 insertions(+), 34 deletions(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 7f05258f43453..df0f1b9c94c58 100644 --- a/ip/ipaddress.c +++

[iproute PATCH 2/2] ipaddress: Print IFLA_VF_QUERY_RSS_EN setting

2016-11-08 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- ip/ipaddress.c | 8 1 file changed, 8 insertions(+) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index df0f1b9c94c58..c9f769fb748e4 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -405,6 +405,14 @@ static void print_vfinfo(FI

[iproute PATCH 0/2] Resend: Simplify and enhance vf_info parsing

2016-11-08 Thread Phil Sutter
This patch series got lost in a discussion about whether the code the first patch removes is necessary or not - static analysis as well as my tests showed it is not. Therefore resending this with updated description of patch 1 to contain the discussion's gist. Phil Sutter (2): ipaddress

Re: [net-next PATCH 3/3] qdisc: catch misconfig of attaching qdisc to tx_queue_len zero device

2016-11-04 Thread Phil Sutter
On Fri, Nov 04, 2016 at 11:10:42AM +0100, Jesper Dangaard Brouer wrote: > > On Fri, 4 Nov 2016 10:35:26 +0100 Phil Sutter <p...@nwl.cc> wrote: > > > Hi, > > > > On Thu, Nov 03, 2016 at 02:56:11PM +0100, Jesper Dangaard Brouer wrote: > > [...] > > &

Re: [net-next PATCH 3/3] qdisc: catch misconfig of attaching qdisc to tx_queue_len zero device

2016-11-04 Thread Phil Sutter
Hi, On Thu, Nov 03, 2016 at 02:56:11PM +0100, Jesper Dangaard Brouer wrote: [...] > diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c > index 206dc24add3a..f337f1bdd1d4 100644 > --- a/net/sched/sch_api.c > +++ b/net/sched/sch_api.c > @@ -960,6 +960,17 @@ static struct Qdisc

Re: [PATCHv2 iproute2 net-next] tc: m_mirred: Fix parsing of 'index' optional argument

2016-10-27 Thread Phil Sutter
On Thu, Oct 27, 2016 at 05:22:39PM +0300, Shmulik Ladkani wrote: > Hi Phil, > > On Thu, 27 Oct 2016 11:46:33 +0200, p...@nwl.cc wrote: > > According to the action's help text (and the man page which is based > > upon that), this behaviour is perfectly fine: > > > > | Usage: mirred [index

Re: [PATCHv2 iproute2 net-next] tc: m_mirred: Fix parsing of 'index' optional argument

2016-10-27 Thread Phil Sutter
Hi, On Thu, Oct 27, 2016 at 10:36:06AM +0300, Shmulik Ladkani wrote: > Code in parse_mirred() suggests "index" argument can be placed either > after the egress/ingress clause, or as the first argument (after > "action mirred"). > > However, parse_direction() fails to correctly parse "index" if

Re: concurrent rhashtable test failure

2016-10-26 Thread Phil Sutter
Hi Geert, On Mon, Oct 24, 2016 at 02:11:32PM +0200, Geert Uytterhoeven wrote: > On m68k/ARAnyM, test_rhashtable fails with: > > Test failed: thread 0 returned: -4 > > (-4 = -EINTR) How reproducible is this? I wonder why out of the ten threads only the first one fails. > I traced this back

Re: [PATCH iproute2] devlink: Convert conditional in dl_argv_handle_port() to switch()

2016-10-09 Thread Phil Sutter
On Sun, Oct 09, 2016 at 10:14:18AM +0800, Hangbin Liu wrote: > Discovered by Phil's covscan. The final return statement is never reached. > This is not inherently clear from looking at the code, so change the > conditional to a switch() statement which should clarify this. > > CC:

Re: [PATCHv2 iproute2 0/2] ip rule: merger iprule_flush and add selector support

2016-09-23 Thread Phil Sutter
ule: merge ip rule flush and list, save together > ip rule: add selector support > > ip/iprule.c| 295 > + > man/man8/ip-rule.8 | 6 +- > 2 files changed, 231 insertions(+), 70 deletions(-) Acked-by: Phil Sutter <p...@nwl.cc>

Re: [PATCH iproute2] misc/ss: tcp cwnd should be unsigned

2016-09-22 Thread Phil Sutter
On Thu, Sep 22, 2016 at 04:40:28PM +0800, Hangbin Liu wrote: > tcp->snd_cwd is a u32, but ss treats it like a signed int. This may > results in negative bandwidth calculations. > > Signed-off-by: Hangbin Liu <liuhang...@gmail.com> Acked-by: Phil Sutter <p...@nwl.cc>

Re: [PATCH iproute2 2/2] ip rule: add selector support

2016-09-22 Thread Phil Sutter
On Thu, Sep 22, 2016 at 02:28:49PM +0800, Hangbin Liu wrote: [...] > diff --git a/man/man8/ip-rule.8 b/man/man8/ip-rule.8 > index 3508d80..ec0e31d 100644 > --- a/man/man8/ip-rule.8 > +++ b/man/man8/ip-rule.8 > @@ -15,7 +15,8 @@ ip-rule \- routing policy database management > > .ti -8 > .B ip

Re: [iproute PATCH] tc: don't accept qdisc 'handle' greater than ffff

2016-09-18 Thread Phil Sutter
by: Davide Caratti <dcara...@redhat.com> Acked-by: Phil Sutter <p...@nwl.cc>

Re: [iproute PATCH] macsec: fix input range of 'icvlen' parameter

2016-09-09 Thread Phil Sutter
Davide Caratti <dcara...@redhat.com> Acked-by: Phil Sutter <p...@nwl.cc>

Re: [PATCH bug-fix] iproute: fix documentation for ip rule scan order

2016-09-08 Thread Phil Sutter
On Thu, Sep 08, 2016 at 01:48:08PM +0200, Michal Kubecek wrote: > On Thu, Sep 08, 2016 at 12:33:03PM +0200, Phil Sutter wrote: > > On Thu, Sep 08, 2016 at 11:59:55AM +0200, Michal Kubecek wrote: > > > > > > I'm sorry I didn't notice before but this just reverts the

Re: [PATCH bug-fix] iproute: fix documentation for ip rule scan order

2016-09-08 Thread Phil Sutter
Hi, On Thu, Sep 08, 2016 at 11:59:55AM +0200, Michal Kubecek wrote: > On Thu, Sep 01, 2016 at 09:04:54AM -0700, Stephen Hemminger wrote: > > On Tue, 30 Aug 2016 17:32:52 -0700 > > Iskren Chernev wrote: > > > > > From 416f45b62f33017d19a9b14e7b0179807c993cbe Mon Sep 17 00:00:00

Re: [PATCH iproute2] ip route: check ftell, fseek return value

2016-09-06 Thread Phil Sutter
On Tue, Sep 06, 2016 at 02:39:50PM +0800, Hangbin Liu wrote: > ftell() may return -1 in error case, which is not handled and therefore pass a > negative offset to fseek(). The return code of fseek() is also not checked. > > Reported-by: Phil Sutter <p...@nwl.cc> > Signe

Re: [PATCH iproute2 0/2] vxlan: add configuration check

2016-09-05 Thread Phil Sutter
v6 address comparison > vxlan: group address requires net device > > ip/ip6tunnel.c | 8 > ip/iplink_geneve.c | 6 +++--- > ip/iplink_vxlan.c | 19 --- > 3 files changed, 19 insertions(+), 14 deletions(-) Series: Acked-by: Phil Sutter <p...@nwl.cc>

Re: [PATCH iproute2 net-next] nstat: add sctp snmp support

2016-09-02 Thread Phil Sutter
On Fri, Sep 02, 2016 at 03:12:38PM +0800, Hangbin Liu wrote: > SCTP module was not load by default. But this should be OK since we will not > load table if fdopen() failed. > > Signed-off-by: Hangbin Liu > --- > misc/nstat.c | 17 + > 1 file changed, 17

[net-next PATCH] net: rtnetlink: Don't export empty RTAX_FEATURES

2016-08-23 Thread Phil Sutter
Since the features bit field has bits for internal only use as well, it may happen that the kernel exports RTAX_FEATURES attribute with zero value which is pointless. Fix this by making sure the attribute is added only if the exported value is non-zero. Signed-off-by: Phil Sutter <p...@nwl

[iproute PATCH] ip-route: Prevent some double spaces in output

2016-08-23 Thread Phil Sutter
The code is a bit messy, as it starts with space after text and at some point switches to space before text. But either way, printing space before *and* after text almost certainly leads to printing more whitespace than necessary. Signed-off-by: Phil Sutter <p...@nwl.cc> --- ip/iproute.

Re: [PATCH iproute2 0/4] improve initialization of genl handle

2016-08-23 Thread Phil Sutter
-- > ip/ipmacsec.c | 20 +++- > ip/tcp_metrics.c | 14 +++--- > lib/libgenl.c | 17 +++++ > 7 files changed, 39 insertions(+), 65 deletions(-) Series: Acked-by: Phil Sutter <p...@nwl.cc>

Re: [iproute PATCH 1/2] ipaddress: Simplify vf_info parsing

2016-08-17 Thread Phil Sutter
On Wed, Jun 01, 2016 at 10:03:49PM +0200, Phil Sutter wrote: > Not sure whether I misinterpret commit 7b8179c780a1a, but it looks > overly complicated. Instead rely upon parse_rtattr_nested() to assign > the relevant pointer if requested rtattr fields are present. In order to validate co

[iproute PATCH] ip-link: add missing {min,max}_tx_rate to help text

2016-08-16 Thread Phil Sutter
These vf options are described in man page already, they're just missing in help output. Signed-off-by: Phil Sutter <p...@nwl.cc> --- ip/iplink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ip/iplink.c b/ip/iplink.c index f9a7e0909747c..6b1db18a6135d 100644 --- a/ip/iplink.c ++

Re: [iproute PATCH] ip-route: Pretty-print expired routes

2016-08-12 Thread Phil Sutter
On Fri, Aug 12, 2016 at 12:58:15PM -0700, Stephen Hemminger wrote: > On Thu, 11 Aug 2016 15:54:50 +0200 > Phil Sutter <p...@nwl.cc> wrote: > > > On Thu, Aug 11, 2016 at 02:46:26PM +0100, Edward Cree wrote: > > > On 10/08/16 12:14, Phil Sutter wrote: > > >

Re: [PATCH iproute2] ip route: restore_handler should check tb[RTA_PREFSRC] for local networks

2016-08-12 Thread Phil Sutter
gned-off-by: Xin Long <lucien@gmail.com> Tested-by: Phil Sutter <p...@nwl.cc>

[iproute PATCH] man: ip-link.8: Document missing geneve options

2016-08-11 Thread Phil Sutter
This adds missing documentation of geneve type options: - dstport - external - udpcsum - udp6zerocsumtx - udp6zerocsumrx The bits for the last three was just copy and pasted from vxlan section. Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/ip-link.8.i

Re: [iproute PATCH] ip-route: Pretty-print expired routes

2016-08-11 Thread Phil Sutter
On Thu, Aug 11, 2016 at 02:46:26PM +0100, Edward Cree wrote: > On 10/08/16 12:14, Phil Sutter wrote: > > Instead of printing 'expires -23sec' for expired (but not yet garbage > > collected) routes, print 'expired 23sec' instead. > > > > Signed-off-by: Phil Sutter &l

[iproute PATCH] ip-route: Pretty-print expired routes

2016-08-10 Thread Phil Sutter
Instead of printing 'expires -23sec' for expired (but not yet garbage collected) routes, print 'expired 23sec' instead. Signed-off-by: Phil Sutter <p...@nwl.cc> --- ip/iproute.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ip/iproute.c b/ip/iproute.c

[PATCH] tc/m_gact: Fix action_a2n() return code check

2016-08-07 Thread Phil Sutter
The function returns zero on success. Reported-by: Mark Bloch <ma...@mellanox.com> Fixes: 69f5aff63c770b ("tc: use action_a2n() everywhere") Signed-off-by: Phil Sutter <p...@nwl.cc> --- tc/m_gact.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/

<    1   2   3   4   5   6   7   8   9   10   >