[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 --- misc/ss.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 3e5c93bb7c6f9..d546a00eb2c24 100644 --- a/misc/ss.c +++ b

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

2016-11-11 Thread Phil Sutter
Signed-off-by: Phil Sutter --- 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 @@ -306,76 +306,25

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

2016-11-11 Thread Phil Sutter
code in the same function. Signed-off-by: Phil Sutter --- 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 +++ b/misc

[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 --- 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) if (!(u = calloc(1, sizeof

[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 --- 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 +++ b/misc

[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 --- 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 +++ b/misc

[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 --- misc/ss.c

[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 --- misc/ss.c | 124

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

2016-11-11 Thread Phil Sutter
Signed-off-by: Phil Sutter --- 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 struct slabstat slabstat

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

2016-11-09 Thread Phil Sutter
at), patch 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

[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 --- Changes since v1: - Added missing bits to ss man page. --- man/man8/ss.8 | 3 + misc/ss.c

[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 --- Changes since v1: - File properly extracted from upstream kernel headers. - Description updated. --- include/linux/sctp.h | 1005 ++ 1 file changed, 1005 insertions

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

2016-11-08 Thread Phil Sutter
CHK or not. Signed-off-by: Phil Sutter --- 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 +++ b/ip/ipaddress.c @@ -322

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

2016-11-08 Thread Phil Sutter
Signed-off-by: Phil Sutter --- 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(FILE *fp, struct rtattr

[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): ipad

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 wrote: > > > Hi, > > > > On Thu, Nov 03, 2016 at 02:56:11PM +0100, Jesper Dangaard Brouer wrote: > > [...] > > > diff --git a

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 *qdisc_create(stru

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

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

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

2016-09-22 Thread Phil Sutter
gt; ip rule: 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

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 Acked-by: Phil Sutter

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 r

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

2016-09-18 Thread Phil Sutter
d-off-by: Davide Caratti Acked-by: Phil Sutter

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

2016-09-09 Thread Phil Sutter
ed-off-by: Davide Caratti Acked-by: Phil Sutter

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 re

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 2001 > > > From: I

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 > Signed-off-by: Hangbin Liu

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

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 insertions(+) > > diff --

[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 --- net/core

[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 --- ip/iproute.c | 14

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

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 --- 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 +++ b/ip/ipl

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 wrote: > > > On Thu, Aug 11, 2016 at 02:46:26PM +0100, Edward Cree wrote: > > > On 10/08/16 12:14, Phil Sutter wrote: > > > > Instead of p

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

2016-08-12 Thread Phil Sutter
ks, > rtattr_cmp would return a success if it was NULL, this route entry would > be restored again as a local network. > > This patch is to add tb[RTA_PREFSRC] check when restoring local networks. > > Fixes: 74af8dd9620e ("ip route: restore route entries in correct order&

[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 --- man/man8/ip-link.8.in | 36 1

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-

[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 --- 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 Fixes: 69f5aff63c770b ("tc: use action_a2n() everywhere") Signed-off-by: Phil Sutter --- tc/m_gact.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/m_gact.c b/tc/m_gact.c index c0a938c716b6a..2bf

Re: [PATCH v3 1/3] sctp: Export struct sctp_info to userspace

2016-08-04 Thread Phil Sutter
On Thu, Aug 04, 2016 at 09:33:29AM -0400, Neil Horman wrote: > On Thu, Aug 04, 2016 at 12:11:55PM +0200, Phil Sutter wrote: > > This is required to correctly interpret INET_DIAG_INFO messages exported > > by sctp_diag module. > > > > Signed-off-by: Phil Sutter > &

[PATCH] rhashtable-test: Fix max_size parameter description

2016-08-04 Thread Phil Sutter
Looks like a simple copy'n'paste error. Fixes: 1aa661f5c3df1 ("rhashtable-test: Measure time to insert, remove & traverse entries") Signed-off-by: Phil Sutter --- lib/test_rhashtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib

[PATCH v3 3/3] sctp_diag: Respect ss adding TCPF_CLOSE to idiag_states

2016-08-04 Thread Phil Sutter
Since 'ss' always adds TCPF_CLOSE to idiag_states flags, sctp_diag can't rely upon TCPF_LISTEN flag solely being present when listening sockets are requested. Signed-off-by: Phil Sutter --- net/sctp/sctp_diag.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -

[PATCH v3 2/3] sctp_diag: Fix T3_rtx timer export

2016-08-04 Thread Phil Sutter
. Signed-off-by: Phil Sutter --- Changes since v1: - Introduce local variable to shorten long lines. - Use timer_pending() to decide whether to export the timer value. - Export the primary path's value instead of garbage. - If not exporting, zero fields to not confuse userspace. Changes s

[PATCH v3 1/3] sctp: Export struct sctp_info to userspace

2016-08-04 Thread Phil Sutter
This is required to correctly interpret INET_DIAG_INFO messages exported by sctp_diag module. Signed-off-by: Phil Sutter --- include/linux/sctp.h | 64 --- include/uapi/linux/sctp.h | 64 +++ 2 files

[PATCH v3 0/3] sctp_diag: A bunch of fixes for upcoming 'ss' support

2016-08-04 Thread Phil Sutter
The following series contains a number of fixes necessary to make my yet unpublished 'ss' support patch functional. Changes since v1: - Fixed patch 2/3 - Rebased whole series onto current net-next/master Changes since v2: - Improved description of patch 2/3 Phil Sutter (3): sc

Re: [PATCH v2 1/3] sctp: Export struct sctp_info to userspace

2016-08-04 Thread Phil Sutter
On Thu, Aug 04, 2016 at 09:13:03AM +, David Laight wrote: > From: Phil Sutter > > Sent: 03 August 2016 22:23 > > This is required to correctly interpret INET_DIAG_INFO messages exported > > by sctp_diag module. > ... > > diff --git a/include/linux/sctp.h b/

Re: [PATCH v2 2/3] sctp_diag: export timer value only if it is active

2016-08-03 Thread Phil Sutter
On Wed, Aug 03, 2016 at 06:51:15PM -0300, Marcelo Ricardo Leitner wrote: > On Wed, Aug 03, 2016 at 11:23:12PM +0200, Phil Sutter wrote: > > Since it is exported as unsigned value, userspace has no way detecting > > whether it is negative or just very large. Therefore do this in k

[PATCH v2 2/3] sctp_diag: export timer value only if it is active

2016-08-03 Thread Phil Sutter
Since it is exported as unsigned value, userspace has no way detecting whether it is negative or just very large. Therefore do this in kernel space where it is a simple comparison. Signed-off-by: Phil Sutter --- Changes since v1: - Introduce local variable to shorten long lines. - Use

[PATCH v2 0/3] sctp_diag: A bunch of fixes for upcoming 'ss' support

2016-08-03 Thread Phil Sutter
The following series contains a number of fixes necessary to make my yet unpublished 'ss' support patch functional. Changes since v1: - Fixed patch 2/3 - Rebased whole series onto current net-next/master Phil Sutter (3): sctp: Export struct sctp_info to userspace sctp_diag: ex

[PATCH v2 3/3] sctp_diag: Respect ss adding TCPF_CLOSE to idiag_states

2016-08-03 Thread Phil Sutter
Since 'ss' always adds TCPF_CLOSE to idiag_states flags, sctp_diag can't rely upon TCPF_LISTEN flag solely being present when listening sockets are requested. Signed-off-by: Phil Sutter --- net/sctp/sctp_diag.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -

[PATCH v2 1/3] sctp: Export struct sctp_info to userspace

2016-08-03 Thread Phil Sutter
This is required to correctly interpret INET_DIAG_INFO messages exported by sctp_diag module. Signed-off-by: Phil Sutter --- include/linux/sctp.h | 64 --- include/uapi/linux/sctp.h | 64 +++ 2 files

Re: [PATCH 2/3] sctp_diag: export timer value only if it is active

2016-08-03 Thread Phil Sutter
On Wed, Aug 03, 2016 at 04:46:52PM -0300, Marcelo Ricardo Leitner wrote: > On Wed, Aug 03, 2016 at 09:28:13PM +0200, Phil Sutter wrote: > > Hi, > > > > On Sat, Jul 30, 2016 at 09:25:42PM +0800, Xin Long wrote: > > [...] > > > Now for the transport's i

Re: [PATCH 2/3] sctp_diag: export timer value only if it is active

2016-08-03 Thread Phil Sutter
Hi, On Sat, Jul 30, 2016 at 09:25:42PM +0800, Xin Long wrote: [...] > Now for the transport's info, we only choose primary_path to dump. > It means we should fix this by getting the left time to expire from > primary transport t->T3_rtx_timer. like: > > r->idiag_expires = jiffies_to_msec

[iproute PATCH] tc: Fix for missing estimator initialization

2016-08-03 Thread Phil Sutter
. Fixes: d17b136f7d7dd ("Use C99 style initializers everywhere") Reported-by: Stas Nichiporovich Signed-off-by: Phil Sutter --- tc/tc_qdisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c index bc87aab110e48..93c9a4c1daa28 10064

Re: [PATCH 1/3] sctp: Export struct sctp_info to userspace

2016-08-01 Thread Phil Sutter
Hi Stephen, On Sun, Jul 31, 2016 at 02:18:24PM -0700, Stephen Hemminger wrote: > On Fri, 29 Jul 2016 18:59:38 +0200 > Phil Sutter wrote: > > > This is required to correctly interpret INET_DIAG_INFO messages exported > > by sctp_diag module. > > > > Signed-off-

Re: [PATCH 2/3] sctp_diag: export timer value only if it is active

2016-07-30 Thread Phil Sutter
On Sat, Jul 30, 2016 at 10:33:48AM -0300, Marcelo Ricardo Leitner wrote: > > > Em 30-07-2016 10:25, Xin Long escreveu: > >>> diff --git a/net/sctp/sctp_diag.c b/net/sctp/sctp_diag.c > >>> index f69edcf219e51..0ad6033a7330c 100644 > >>> --- a/net/sctp/sctp_diag.c > >>> +++ b/net/sctp/sctp_diag.c >

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

2016-07-29 Thread Phil Sutter
This header does not exist in this form upstream yet, as it contains struct sctp_info which is required for SCTP support in 'ss' and hasn't been exported yet. Signed-off-by: Phil Sutter --- include/linux/sctp.h | 1005 ++ 1 fil

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

2016-07-29 Thread Phil Sutter
So please don't consider this series as the final word, but rather a base for early review/testing and feedback. Phil Sutter (2): include: Add linux/sctp.h ss: Add support for SCTP protocol include/linux/sctp.h | 1005 ++ misc/ss.c

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

2016-07-29 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 --- misc/ss.c | 212 +++--- 1 file changed

[PATCH 1/3] sctp: Export struct sctp_info to userspace

2016-07-29 Thread Phil Sutter
This is required to correctly interpret INET_DIAG_INFO messages exported by sctp_diag module. Signed-off-by: Phil Sutter --- include/linux/sctp.h | 64 --- include/uapi/linux/sctp.h | 64 +++ 2 files

[PATCH 3/3] sctp_diag: Respect ss adding TCPF_CLOSE to idiag_states

2016-07-29 Thread Phil Sutter
Since 'ss' always adds TCPF_CLOSE to idiag_states flags, sctp_diag can't rely upon TCPF_LISTEN flag solely being present when listening sockets are requested. Signed-off-by: Phil Sutter --- net/sctp/sctp_diag.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -

[PATCH 0/3] sctp_diag: A bunch of fixes for upcoming 'ss' support

2016-07-29 Thread Phil Sutter
The following series contains a number of fixes necessary to make my yet unpublished 'ss' support patch functional. Phil Sutter (3): sctp: Export struct sctp_info to userspace sctp_diag: export timer value only if it is active sctp_diag: Respect ss adding TCPF_CLOSE to id

[PATCH 2/3] sctp_diag: export timer value only if it is active

2016-07-29 Thread Phil Sutter
Since it is exported as unsigned value, userspace has no way detecting whether it is negative or just very large. Therefore do this in kernel space where it is a simple comparison. Signed-off-by: Phil Sutter --- net/sctp/sctp_diag.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions

[iproute PATCH 4/4] tc: util: No need for action_n2a() to be reentrant

2016-07-23 Thread Phil Sutter
This allows to remove some buffers here and there. While at it, make it return a const value. Signed-off-by: Phil Sutter --- tc/m_bpf.c| 5 + tc/m_csum.c | 4 +--- tc/m_gact.c | 7 +++ tc/m_ife.c| 3 +-- tc/m_mirred.c | 5 ++--- tc/m_nat.c| 3 +-- tc/m_pedit.c

[iproute PATCH 1/4] tc: Reformat tc_util.h

2016-07-23 Thread Phil Sutter
* Drop 'extern' keyword before function declarations. * Add parameter names where they were missing for matters of consistency. * Drop fancy indenting (e.g. tab between type and name). * Break long lines to not exceed 80 columns. Signed-off-by: Phil Sutter --- tc/tc_ut

[iproute PATCH 2/4] tc: util: bore up action_a2n()

2016-07-23 Thread Phil Sutter
It's a pitty this function is used nowhere, so let's polish it for use: * Loop over branch names, makes it clear that every former conditional was exactly identical. * Support 'pipe' branch name, too. * Make number parsing optional. Signed-off-by: Phil Sutter --

[iproute PATCH 0/4] tc: Minor action utility improvements

2016-07-23 Thread Phil Sutter
When asked by Jamal to unify the various code duplications he had to adjust in commit 43726b750a398 ("tc: don't ignore ok as an action branch") I created patches 2 and 3, the rest is fallout. Phil Sutter (4): tc: Reformat tc_util.h tc: util: bore up action_a2n() tc:

[iproute PATCH 3/4] tc: use action_a2n() everywhere

2016-07-23 Thread Phil Sutter
Signed-off-by: Phil Sutter --- tc/m_bpf.c | 22 ++ tc/m_connmark.c | 27 ++- tc/m_csum.c | 27 ++- tc/m_gact.c | 17 - tc/m_ife.c | 27 ++- tc/m_mirred.c | 25

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

2016-07-20 Thread Phil Sutter
On Wed, Jun 01, 2016 at 03:36:09PM -0700, Greg Rose wrote: > On Wed, Jun 1, 2016 at 3:07 PM, Phil Sutter wrote: > > On Wed, Jun 01, 2016 at 03:00:08PM -0700, Greg Rose wrote: > >> On Wed, Jun 1, 2016 at 1:03 PM, Phil Sutter wrote: > >> > Not sure whether I misinter

[iproute PATCH v5 4/5] No need to initialize rtattr fields before parsing

2016-07-18 Thread Phil Sutter
Since parse_rtattr_flags() calls memset already, there is no need for callers to do so themselves. Signed-off-by: Phil Sutter --- ip/ipaddress.c | 2 +- tc/tc_class.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index cfcebe76af399

[iproute PATCH v5 5/5] Makefile: Allow to override CC

2016-07-18 Thread Phil Sutter
This makes it easier to build iproute2 with a custom compiler. While at it, make HOSTCC default to the value of CC if not explicitly set elsewhere. Signed-off-by: Phil Sutter --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index

[iproute PATCH v5 2/5] Use C99 style initializers everywhere

2016-07-18 Thread Phil Sutter
ter fields for parse_rtattr*() were just dropped since they are not needed. The changes here allowed the compiler to discover some unused variables, so get rid of them, too. Signed-off-by: Phil Sutter --- Changes since v4: - Rebased to current origin/master, minor context conflict in ip/iplin

[iproute PATCH v5 3/5] Replace malloc && memset by calloc

2016-07-18 Thread Phil Sutter
This only replaces occurrences where the newly allocated memory is cleared completely afterwards, as in other cases it is a theoretical performance hit although code would be cleaner this way. Signed-off-by: Phil Sutter --- Changes since v2: - Fix checkpatch errors. --- genl/genl.c| 3

[iproute PATCH v5 0/5] Big C99 style initializer rework

2016-07-18 Thread Phil Sutter
atibility testing, I made a few more changes which make sense to have: - New patch 5 allows to conveniently override the compiler via command line. - New patch 6 eliminates a warning with old gcc but looks valid in general. - A warning made me look at ip/tcp_metrics.c and I found a minor c

[iproute PATCH v5 1/5] tc: m_action: Improve conversion to C99 style initializers

2016-07-18 Thread Phil Sutter
t the same time. Fixes: a0a73b298a579 ("tc: m_action: Use C99 style initializers for struct req") Signed-off-by: Phil Sutter --- Changes since v2: - Don't drop the "superfluous" comma. - Flatten initializers. Changes since v1: - Created this patch. --- tc/m_action.c | 23 +

Re: [iproute PATCH v4 2/5] Use C99 style initializers everywhere

2016-07-15 Thread Phil Sutter
On Fri, Jul 15, 2016 at 09:33:24AM -0600, David Ahern wrote: > On 7/13/16 12:47 PM, Phil Sutter wrote: > > This big patch was compiled by vimgrepping for memset calls and changing > > to C99 initializer if applicable. One notable exception is the > > initialization of union bp

[iproute PATCH] tc: ematch: Ignore all-zero mask value when printing filters

2016-07-14 Thread Phil Sutter
strictly means to eliminate all bits from the value, but the opposite is the case. Cc: Thomas Graf Signed-off-by: Phil Sutter --- tc/em_meta.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tc/em_meta.c b/tc/em_meta.c index 9ce5a78a628ac..ce98386082b86 100644 --- a/tc

[iproute PATCH v4 4/5] No need to initialize rtattr fields before parsing

2016-07-13 Thread Phil Sutter
Since parse_rtattr_flags() calls memset already, there is no need for callers to do so themselves. Signed-off-by: Phil Sutter --- ip/ipaddress.c | 2 +- tc/tc_class.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index cfcebe76af399

[iproute PATCH v4 2/5] Use C99 style initializers everywhere

2016-07-13 Thread Phil Sutter
ter fields for parse_rtattr*() were just dropped since they are not needed. The changes here allowed the compiler to discover some unused variables, so get rid of them, too. Signed-off-by: Phil Sutter --- Changes since v3: - Use empty instead of zero initializer. Changes since v2: - Flatten initializ

[iproute PATCH v4 1/5] tc: m_action: Improve conversion to C99 style initializers

2016-07-13 Thread Phil Sutter
t the same time. Fixes: a0a73b298a579 ("tc: m_action: Use C99 style initializers for struct req") Signed-off-by: Phil Sutter --- Changes since v2: - Don't drop the "superfluous" comma. - Flatten initializers. Changes since v1: - Created this patch. --- tc/m_action.c | 23 +

[iproute PATCH v4 5/5] Makefile: Allow to override CC

2016-07-13 Thread Phil Sutter
This makes it easier to build iproute2 with a custom compiler. While at it, make HOSTCC default to the value of CC if not explicitly set elsewhere. Signed-off-by: Phil Sutter --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index

[iproute PATCH v4 3/5] Replace malloc && memset by calloc

2016-07-13 Thread Phil Sutter
This only replaces occurrences where the newly allocated memory is cleared completely afterwards, as in other cases it is a theoretical performance hit although code would be cleaner this way. Signed-off-by: Phil Sutter --- Changes since v2: - Fix checkpatch errors. --- genl/genl.c| 3

[iproute PATCH v4 0/5] Big C99 style initializer rework

2016-07-13 Thread Phil Sutter
er via command line. - New patch 6 eliminates a warning with old gcc but looks valid in general. - A warning made me look at ip/tcp_metrics.c and I found a minor code simplification (patch 7). Phil Sutter (5): tc: m_action: Improve conversion to C99 style initializers Use C99 style ini

Re: [PATCH iproute2] ip route: restore route entries in correct order

2016-07-12 Thread Phil Sutter
y. > 1. !gw && (!fib_prefsrc || fib_prefsrc == cfg->fc_dst) > 2. !gw && (fib_prefsrc != cfg->fc_dst) > 3. gw > > Signed-off-by: Xin Long Acked-by: Phil Sutter

[iproute PATCH v2] ip-address.8: Document autojoin flag

2016-07-12 Thread Phil Sutter
Description copied from related kernel support commit message with a little tailoring to fit. While at it, fix font of non-terminal CONFFLAG-LIST in synopsis. Signed-off-by: Phil Sutter --- Changes since v1: - Set commands/flags in bold font instead of quotes. - Make capitalization consistent

[iproute PATCH] ip-address.8: Document autojoin flag

2016-07-09 Thread Phil Sutter
Description copied from related kernel support commit message with a little tailoring to fit. While at it, fix font of non-terminal CONFFLAG-LIST in synopsis. Signed-off-by: Phil Sutter --- man/man8/ip-address.8.in | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions

[iproute PATCH 0/6] iplink: Improve documentation

2016-07-09 Thread Phil Sutter
This series improves documentation around the feature of 'ip link set' to configure device type specific parameters. While doing so, I reviewed used fonts in ip-link.8 and fixed a few bugs/inconsistencies. Phil Sutter (6): iplink: List valid 'type' argument in ip lin

[iproute PATCH 4/6] ip-link.8: Place 'ip link set' warning more prominently

2016-07-09 Thread Phil Sutter
This moves the warning to the beginning of the section about 'ip link set' which makes it still stand out after adding more text to it's end. Signed-off-by: Phil Sutter --- man/man8/ip-link.8.in | 24 1 file changed, 12 insertions(+), 12 deletions(-) d

[iproute PATCH 3/6] ip-link.8: Extend type list in synopsis

2016-07-09 Thread Phil Sutter
'ip link set' supports passing a type to set type-specific parameters. Add this missing piece of information to the synopsis section. Signed-off-by: Phil Sutter --- man/man8/ip-link.8.in | 71 +-- 1 file changed, 40 insertions(+), 31

[iproute PATCH 1/6] iplink: List valid 'type' argument in ip link help text

2016-07-09 Thread Phil Sutter
Signed-off-by: Phil Sutter --- ip/iplink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ip/iplink.c b/ip/iplink.c index f2a2e13cf0c5b..0e3cee6af8b6f 100644 --- a/ip/iplink.c +++ b/ip/iplink.c @@ -55,7 +55,9 @@ void iplink_usage(void) fprintf(stderr

[iproute PATCH 2/6] iplink: bond_slave: Add missing help functions

2016-07-09 Thread Phil Sutter
Signed-off-by: Phil Sutter --- ip/iplink_bond_slave.c | 24 1 file changed, 24 insertions(+) diff --git a/ip/iplink_bond_slave.c b/ip/iplink_bond_slave.c index d67793237edfc..9c60dea8a2757 100644 --- a/ip/iplink_bond_slave.c +++ b/ip/iplink_bond_slave.c @@ -17,6 +17,16

[iproute PATCH 6/6] ip-link.8: Fix font choices

2016-07-09 Thread Phil Sutter
Signed-off-by: Phil Sutter --- man/man8/ip-link.8.in | 92 ++- 1 file changed, 47 insertions(+), 45 deletions(-) diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in index ada20fe210793..1644af0ef9f9f 100644 --- a/man/man8/ip-link.8.in +++ b

[iproute PATCH 5/6] ip-link.8: Add slave type option descriptions

2016-07-09 Thread Phil Sutter
Signed-off-by: Phil Sutter --- man/man8/ip-link.8.in | 129 ++ 1 file changed, 129 insertions(+) diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in index 2678d37df7478..ada20fe210793 100644 --- a/man/man8/ip-link.8.in +++ b/man/man8/ip

Re: [iproute PATCH 0/2] Netns performance improvements

2016-07-07 Thread Phil Sutter
On Thu, Jul 07, 2016 at 02:59:48PM +0200, Nicolas Dichtel wrote: > Le 07/07/2016 13:17, Phil Sutter a écrit : > [snip] > > The issue came up during OpenStack Neutron testing, see this ticket for > > reference: > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1310

Re: [iproute PATCH 0/2] Netns performance improvements

2016-07-07 Thread Phil Sutter
Hi, On Wed, Jul 06, 2016 at 11:58:54PM -0500, Eric W. Biederman wrote: > Phil Sutter writes: > > > Hi Eric, > > > > Thanks for your quick and insightful reply rightfully pointing out the > > lack of rationale behind this change. So let me try to catch up: > &

Re: [iproute PATCH 0/2] Netns performance improvements

2016-07-05 Thread Phil Sutter
Hi Eric, Thanks for your quick and insightful reply rightfully pointing out the lack of rationale behind this change. So let me try to catch up: On Tue, Jul 05, 2016 at 09:44:00AM -0500, Eric W. Biederman wrote: > Phil Sutter writes: > > > Stress-testing OpenStack Neutron r

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