Re: [iproute PATCH] man: ip-route.8: Fix ENCAP references in synopsis

2018-11-30 Thread Phil Sutter
Hi Simon, On Fri, Nov 30, 2018 at 03:39:05PM +0100, Simon Horman wrote: > On Wed, Nov 28, 2018 at 12:12:32PM +0100, Phil Sutter wrote: > > The different encapsulation types are described in ENCAP_* > > non-terminals, but ENCAP definition lists them without the ENCAP_

[iproute PATCH] ssfilter: Fix for inverted last expression

2018-11-29 Thread Phil Sutter
: b2038cc0b2403 ("ssfilter: Eliminate shift/reduce conflicts") Signed-off-by: Phil Sutter --- misc/ssfilter.y | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/ssfilter.y b/misc/ssfilter.y index 0413dddaa7584..a901ae753a284 100644 --- a/misc/ssfilter.y

[iproute PATCH] man: ip-route.8: Fix ENCAP references in synopsis

2018-11-28 Thread Phil Sutter
The different encapsulation types are described in ENCAP_* non-terminals, but ENCAP definition lists them without the ENCAP_ prefix. Fix this for consistency. Signed-off-by: Phil Sutter --- man/man8/ip-route.8.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man/man8/ip

Re: iproute2 compile and linking errors on Fedora 19

2018-11-27 Thread Phil Sutter
Hi, On Mon, Nov 26, 2018 at 04:06:27PM -0800, Stephen Hemminger wrote: > On Tue, 31 Oct 2017 16:28:20 -0700 > Cong Wang wrote: > > > On Tue, Oct 31, 2017 at 2:10 PM, Stephen Hemminger > > wrote: > > > > > > IPPROTO_MH comes from include/uapi/linux/in6.h > > > Maybe it is trying to use old

[iproute PATCH] man: rdma: Add reference to rdma-resource.8

2018-11-26 Thread Phil Sutter
All rdma-related man pages list each other in SEE ALSO section, only rdma-resource.8 is missing. Add it for the sake of consistency. Signed-off-by: Phil Sutter --- man/man8/rdma-dev.8 | 1 + man/man8/rdma-link.8 | 1 + man/man8/rdma.8 | 1 + 3 files changed, 3 insertions(+) diff --git

[iproute PATCH v2] ip-address: Fix filtering by negated address flags

2018-11-15 Thread Phil Sutter
for the "special cases" to be inverted, too. Fixes: f73ac674d0abf ("ip: change flag names to an array") Signed-off-by: Phil Sutter --- Changes since v1: - Improve "special cases" handling per Stephen's suggestion. - Update man page accordingly. ---

Re: [iproute PATCH] ip-address: Fix filtering by negated address flags

2018-11-15 Thread Phil Sutter
Hi Stephen, On Wed, Nov 14, 2018 at 11:29:03AM -0800, Stephen Hemminger wrote: [...] > I was thinking something like this which simplifies the logic. > > diff --git a/ip/ipaddress.c b/ip/ipaddress.c > index cd8cc76a3473..3f1510383071 100644 > --- a/ip/ipaddress.c > +++ b/ip/ipaddress.c > @@

Re: [iproute PATCH] ip-address: Fix filtering by negated address flags

2018-11-14 Thread Phil Sutter
Hi Stephen, On Tue, Nov 13, 2018 at 02:47:59PM -0800, Stephen Hemminger wrote: > On Tue, 13 Nov 2018 16:12:01 +0100 > Phil Sutter wrote: > > > + if (arg[0] == '-') { > > + inv = true; > > + arg++; > > + } > The inverse logic need

[iproute PATCH v2] man: ip-route.8: Document nexthop limit

2018-11-13 Thread Phil Sutter
Add a note to 'nexthop' description stating the maximum number of nexthops per command and pointing at 'append' command as a workaround. Signed-off-by: Phil Sutter --- Changes since v1: - Reviewed text. - 'route append' trick works with IPv6 only. --- man/man8/ip-route.8.in | 9 + 1

[iproute PATCH] ip-address: Fix filtering by negated address flags

2018-11-13 Thread Phil Sutter
for the "special cases" to be inverted, too. Fixes: f73ac674d0abf ("ip: change flag names to an array") Signed-off-by: Phil Sutter --- ip/ipaddress.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c

[iproute PATCH] ip-route: Fix nexthop encap parsing

2018-11-13 Thread Phil Sutter
for configuring identifier and hook types") Fixes: b15f440e78373 ("lwt: BPF support for LWT") Signed-off-by: Phil Sutter --- ip/iproute_lwtunnel.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ip/iproute_lwtunnel.c b/ip/iproute_lwtunnel.c

Re: [iproute PATCH] man: ip-route.8: Document nexthop limit

2018-11-13 Thread Phil Sutter
Hi David, On Mon, Nov 12, 2018 at 04:37:48PM -0800, David Ahern wrote: > On 11/12/18 2:21 PM, Phil Sutter wrote: > > diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in > > index a33ce1f0f4006..383178c11331e 100644 > > --- a/man/man8/ip-route.8.in > >

[iproute PATCH] man: ip-route.8: Document nexthop limit

2018-11-12 Thread Phil Sutter
Add a note to 'nexthop' description stating the maximum number of nexthops per command and pointing at 'append' command as a workaround. Signed-off-by: Phil Sutter --- man/man8/ip-route.8.in | 7 +++ 1 file changed, 7 insertions(+) diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8

Re: [PATCH iproute2] testsuite: ss: Fix spacing in expected output for ssfilter.t

2018-11-11 Thread Phil Sutter
Hi Stefano, On Sun, Nov 11, 2018 at 12:50:39PM +0100, Stefano Brivio wrote: > On Sat, 10 Nov 2018 22:48:44 +0100 > Phil Sutter wrote: > > > On Sat, Nov 10, 2018 at 10:21:59AM +0100, Stefano Brivio wrote: > > > > > @@ -12,37 +12,37 @@ export TCPDIAG_FILE="$(

Re: [PATCH iproute2] testsuite: ss: Fix spacing in expected output for ssfilter.t

2018-11-10 Thread Phil Sutter
Hi Stefano, On Sat, Nov 10, 2018 at 10:21:59AM +0100, Stefano Brivio wrote: > Since commit 00240899ec0b ("ss: Actually print left delimiter for > columns") changes spacing in ss output, we also need to adjust for that in > the ss filter test. > > Fixes: 00240899ec0b ("ss: Actually print left

Re: [PATCH iproute2] bridge: fdb: remove redundant dev string in show output

2018-11-08 Thread Phil Sutter
39:00:6a:82 dev dev bridge vlan 1 master bridge permanent" > > this patch removes the redundant print. > > Fixes: 4abb8c723a64 ("bridge: fdb: Fix for missing keywords in non-JSON > output") Oh, stupid mistake. :( Thanks for the fix! > CC: Phil Sutter > Signed-off-by: Roopa Prabhu Acked-by: Phil Sutter

[iproute PATCH v2] tc: htb: Print default value in hex

2018-10-23 Thread Phil Sutter
qdisc") Signed-off-by: Phil Sutter --- Changes since v1: - Use print_0xhex(). --- tc/q_htb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/q_htb.c b/tc/q_htb.c index c8b2941d945b7..5fb11d28c5c3a 100644 --- a/tc/q_htb.c +++ b/tc/q_htb.c @@ -332,7 +332,7 @@ static int htb

Re: [iproute PATCH] tc: htb: Print default value in hex

2018-10-22 Thread Phil Sutter
On Mon, Oct 22, 2018 at 09:56:23AM -0700, Stephen Hemminger wrote: > On Fri, 19 Oct 2018 17:42:55 +0200 > Phil Sutter wrote: > > > Value of 'default' is assumed to be hexadecimal when parsing, so > > consequently it should be printed in hex as well. This is a regressio

[iproute PATCH] tc: htb: Print default value in hex

2018-10-19 Thread Phil Sutter
Value of 'default' is assumed to be hexadecimal when parsing, so consequently it should be printed in hex as well. This is a regression introduced when adding JSON output. Fixes: f354fa6aa5ff0 ("tc: jsonify htb qdisc") Signed-off-by: Phil Sutter --- tc/q_htb.c | 2 +- 1 file

Re: [iproute PATCH] rdma: Fix for ineffective check in add_filter()

2018-10-18 Thread Phil Sutter
Hi, On Thu, Oct 18, 2018 at 09:27:47AM -0600, David Ahern wrote: > On 10/18/18 5:41 AM, Phil Sutter wrote: > > With 'name' field defined as array in struct filters, it will always > > contain a value irrespective of whether a name was assigned or not. > > > > Fi

[iproute PATCH] tc: Remove pointless assignments in batch()

2018-10-18 Thread Phil Sutter
All these assignments are later overwritten without reading in between, so just drop them. Fixes: 485d0c6001c4a ("tc: Add batchsize feature for filter and actions") Signed-off-by: Phil Sutter --- tc/tc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tc/tc.c

[iproute PATCH] tipc: Drop unused variable 'genl'

2018-10-18 Thread Phil Sutter
Although initialized by call to libmnl, the variable is used only in a call to sizeof(). Drop it and call sizeof with its type instead. Fixes: f043759dd4928 ("tipc: add new TIPC configuration tool") Signed-off-by: Phil Sutter --- tipc/node.c | 9 +++-- 1 file changed, 3 insert

[iproute PATCH] ip-route: Fix parse_encap_seg6() srh parsing

2018-10-18 Thread Phil Sutter
In case caller did not specify 'segs' parameter, parse_srh() would read garbage while iterating over 'segbuf'. Avoid this by initializing 'segbuf' to an empty string. Fixes: e8493916a8ede ("iproute: add support for SR-IPv6 lwtunnel encapsulation") Signed-off-by: Phil Sutte

[iproute PATCH] rdma: Don't pass garbage to rd_check_is_filtered()

2018-10-18 Thread Phil Sutter
ation") Signed-off-by: Phil Sutter --- rdma/res.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/rdma/res.c b/rdma/res.c index 074b9929a38b2..0d8c1c388c4ca 100644 --- a/rdma/res.c +++ b/rdma/res.c @@ -621,6 +621,8 @@ static int res_cm_id_parse_cb(const struct nlm

[iproute PATCH] ip-route: Fix for memleak in error path

2018-10-18 Thread Phil Sutter
If call to rta_addattr_l() failed, parse_encap_seg6() would leak memory. Fix this by making sure calls to free() are not skipped. Fixes: bd59e5b1517b0 ("ip-route: Fix segfault with many nexthops") Signed-off-by: Phil Sutter --- ip/iproute_lwtunnel.c | 16 ++-- 1 file c

[iproute PATCH] rdma: Fix for ineffective check in add_filter()

2018-10-18 Thread Phil Sutter
With 'name' field defined as array in struct filters, it will always contain a value irrespective of whether a name was assigned or not. Fix this by turning the field into a const char pointer. Fixes: 8cd644095842a ("devlink: Add support for devlink resource abstraction") Signed-of

[iproute PATCH] devlink: Fix error reporting in cmd_resource_set()

2018-10-18 Thread Phil Sutter
resource_path_parse() returns either zero or a negative error code, hence the negated value must be passed to strerror(). Fixes: 8cd644095842a ("devlink: Add support for devlink resource abstraction") Signed-off-by: Phil Sutter --- devlink/devlink.c | 2 +- 1 file changed, 1 inser

[net PATCH] net: sched: Fix for duplicate class dump

2018-10-18 Thread Phil Sutter
classes were already dumped a few lines above. Fixes: cb395b2010879 ("net: sched: optimize class dumps") Signed-off-by: Phil Sutter --- net/sched/sch_api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 668

[iproute PATCH] ip-addrlabel: Fix printing of label value

2018-10-15 Thread Phil Sutter
Passing the return value of RTA_DATA() to rta_getattr_u32() is wrong since that function will call RTA_DATA() by itself already. Fixes: a7ad1c8a6845d ("ipaddrlabel: add json support") Signed-off-by: Phil Sutter --- ip/ipaddrlabel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[iproute PATCH] bridge: fdb: Fix for missing keywords in non-JSON output

2018-10-09 Thread Phil Sutter
While migrating to JSON print library, some keywords were dropped from standard output by accident. Add them back to unbreak output parsers. Fixes: c7c1a1ef51aea ("bridge: colorize output and use JSON print library") Signed-off-by: Phil Sutter --- bridge/fdb.c | 6 +++--- 1 file

Re: re iproute2 - don't return error on success fix

2018-10-08 Thread Phil Sutter
Hi Or, On Tue, Oct 02, 2018 at 03:21:18PM +0300, Or Gerlitz wrote: > On Thu, Sep 27, 2018 at 3:53 PM Phil Sutter wrote: [...] > > Hmm, I can't reproduce this. My HEAD is at the commit you mentioned: > > > > | % sudo ./tc/tc filter add dev d0 protocol ip parent : flower

Re: [PATCH net-next] geneve: fix ttl inherit type

2018-10-01 Thread Phil Sutter
Hangbin, On Sat, Sep 29, 2018 at 05:16:05PM +0800, Hangbin Liu wrote: [...] > > Is it desirable to switch to a flag? If I read geneve_changelink() and > > geneve_nl2info() correctly, it allows you to set the ttl_inherit flag > > for an existing device but doesn't allow you to clear it. With

Re: [PATCH net-next] geneve: fix ttl inherit type

2018-09-28 Thread Phil Sutter
On Fri, Sep 28, 2018 at 09:09:58AM +0800, Hangbin Liu wrote: > Phil pointed out that there is a mismatch between vxlan and geneve ttl > inherit. We should define it as a flag and use nla_put_flag to export this > opiton. Same typo here. :) Apart from that, LGTM! Thanks, Phil

Re: [PATCH net] vxlan: use nla_put_flag for ttl inherit

2018-09-28 Thread Phil Sutter
On Fri, Sep 28, 2018 at 09:08:26AM +0800, Hangbin Liu wrote: > Phil pointed out that there is a mismatch between vxlan and geneve ttl > inherit. > We should define it as a flag and use nla_put_flag to export this opiton. s/opiton/option/ Apart from that, LGTM! Thanks, Phil

Re: [PATCH iproute2] vxlan: show correct ttl inherit info

2018-09-27 Thread Phil Sutter
Hi Hangbin, On Thu, Sep 27, 2018 at 10:07:51PM +0800, Hangbin Liu wrote: > On Thu, Sep 27, 2018 at 11:27:45AM +0200, Phil Sutter wrote: > > On Thu, Sep 27, 2018 at 03:28:36PM +0800, Hangbin Liu wrote: > > > We should only show ttl inherit when IFLA_VXLAN_TTL_INHERIT supplied. &g

Re: re iproute2 - don't return error on success fix

2018-09-27 Thread Phil Sutter
Hi, On Thu, Sep 27, 2018 at 03:22:41PM +0300, Or Gerlitz wrote: > Something is still broken also after commit b45e300 "libnetlink: don't > return error on success" - when error is returned, the error code is > success.. > > $ tc filter add dev enp33s0f0 protocol ip parent : flower skip_sw >

Re: [PATCH iproute2] vxlan: show correct ttl inherit info

2018-09-27 Thread Phil Sutter
Hi Hangbin, On Thu, Sep 27, 2018 at 03:28:36PM +0800, Hangbin Liu wrote: > We should only show ttl inherit when IFLA_VXLAN_TTL_INHERIT supplied. > Otherwise show the ttl number, or auto when it is 0. > > Signed-off-by: Hangbin Liu > --- > ip/iplink_vxlan.c | 16 ++-- > 1 file

Re: [PATCH iproute2-next] geneve: fix ttl inherit behavior

2018-09-27 Thread Phil Sutter
tl auto" to means "use whatever default value", the same behavior with > ttl == 0. > > Reported-by: Jianlin Shi > Signed-off-by: Hangbin Liu Acked-by: Phil Sutter

Re: [PATCH iproute2 v2 0/3] testsuite: make alltests fixes

2018-09-20 Thread Phil Sutter
Hi Petr, On Thu, Sep 20, 2018 at 01:36:21AM +0200, Petr Vorel wrote: > here are simply fixes to restore 'make alltests'. > Currently it does not run. Yeah, that testsuite definitely deserves some love. Just one nit: The one-line summary in Fixes: tags should be enclosed in quotes and parens,

Re: [PATCH iproute2-next] iplink: add ipvtap support

2018-09-19 Thread Phil Sutter
On Wed, Sep 19, 2018 at 11:03:29AM +0800, Hangbin Liu wrote: > IPVLAN and IPVTAP are using the same functions and parameters. So we can > just add a new link_util with id ipvtap. Others are the same. > > Signed-off-by: Hangbin Liu Acked-by: Phil Sutter

Re: [PATCHv2 iproute2] bridge/mdb: fix missing new line when show bridge mdb

2018-09-11 Thread Phil Sutter
Hi Hangbin, On Tue, Sep 11, 2018 at 09:26:35AM +0800, Hangbin Liu wrote: [...] > + if (!is_json_context() && !show_stats) > + print_string(PRINT_FP, NULL, "\n", NULL); There is no need to check for !is_json_context() here. You give a type of PRINT_FP which won't lead to output if

[iproute PATCH v2] ip-route: Fix segfault with many nexthops

2018-09-06 Thread Phil Sutter
er looping forever. While being at it, increase message buffer sizes to 4k. This allows for at most 144 nexthops. Signed-off-by: Phil Sutter --- Changes since v1: - Remove accidentally added 'return 0' line from parse_nexthops(). - Increase buffer sizes. --- ip/iproute.c | 43 ++-

Re: [iproute PATCH] ip-route: Fix segfault with many nexthops

2018-09-06 Thread Phil Sutter
Hi, On Tue, Sep 04, 2018 at 07:15:44PM +0200, Phil Sutter wrote: [...] > diff --git a/ip/iproute.c b/ip/iproute.c > index 30833414a3f7f..9e5ae48c0715c 100644 > --- a/ip/iproute.c > +++ b/ip/iproute.c [...] > @@ -1036,15 +1044,18 @@ static int parse_nexthops(struct nlmsghdr *n, str

[iproute PATCH] ip-route: Fix segfault with many nexthops

2018-09-04 Thread Phil Sutter
er looping forever. Note that it is still not possible to add a route with more than 36 nexthops due to stack buffer sizes, this patch merely fixes error path. Signed-off-by: Phil Sutter --- ip/iproute.c | 41 ++-- ip/iproute_lwtunnel.c | 108 +--

[iproute PATCH] iprule: Fix for incorrect space between dst and prefix

2018-08-29 Thread Phil Sutter
This was added by accident when introducing JSON support. Fixes: 0dd4ccc56c0e3 ("iprule: add json support") Signed-off-by: Phil Sutter --- ip/iprule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iprule.c b/ip/iprule.c index 8b9421431c26a..744d6d88e3433 10064

[iproute PATCH v5 1/2] Make colored output configurable

2018-08-17 Thread Phil Sutter
Allow for -color={never,auto,always} to have colored output disabled, enabled only if stdout is a terminal or enabled regardless of stdout state. Signed-off-by: Phil Sutter --- Changes since v1: - Allow to override isatty() check by specifying '-color' flag more than once. - Document new

[iproute PATCH 2/2] lib: Make check_enable_color() return boolean

2018-08-17 Thread Phil Sutter
As suggested, turn return code into true/false although it's not checked anywhere yet. Fixes: 4d829626a ("Merge common code for conditionally colored output") Signed-off-by: Phil Sutter --- include/color.h | 2 +- lib/color.c | 8 2 files changed, 5 insertions(+), 5

Re: [iproute PATCH 07/10] ip: Add missing -M flag to help text

2018-08-17 Thread Phil Sutter
Hi Stephen, On Thu, Aug 16, 2018 at 12:27:59PM +0200, Phil Sutter wrote: > Signed-off-by: Phil Sutter > --- > ip/ip.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Seems like this patch wasn't applied. Did you perhaps drop it by accident? Cheers, Phil

Re: [iproute PATCH v4] Make colored output configurable

2018-08-16 Thread Phil Sutter
On Thu, Aug 16, 2018 at 07:06:07AM -0600, David Ahern wrote: > On 8/16/18 3:37 AM, Phil Sutter wrote: > > Allow for -color={never,auto,always} to have colored output disabled, > > enabled only if stdout is a terminal or enabled regardless of stdout > > state. > > >

[iproute PATCH 04/10] man: devlink.8: Document -verbose option

2018-08-16 Thread Phil Sutter
This was the only bit missing in comparison to devlink help text. Signed-off-by: Phil Sutter --- man/man8/devlink.8 | 4 1 file changed, 4 insertions(+) diff --git a/man/man8/devlink.8 b/man/man8/devlink.8 index ac61b6add7fba..360031f77c165 100644 --- a/man/man8/devlink.8 +++ b/man/man8

[iproute PATCH 00/10] Review help texts and man pages

2018-08-16 Thread Phil Sutter
This series fixes a number of issues identified by an automated scan over man pages and help texts. Phil Sutter (10): man: bridge.8: Document -oneline option bridge: trivial: Make help text consistent devlink: trivial: Make help text consistent man: devlink.8: Document -verbose option

[iproute PATCH 02/10] bridge: trivial: Make help text consistent

2018-08-16 Thread Phil Sutter
Change curly braces into brackets for -json option in help text to be consistent with the rest. Signed-off-by: Phil Sutter --- bridge/bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge/bridge.c b/bridge/bridge.c index e35e5bdf7fb30..04d84163e68c4 100644

[iproute PATCH 05/10] genl: Fix help text

2018-08-16 Thread Phil Sutter
The '| help' part was misleading: In fact, 'genl help' does not work but 'genl help' does. Fix the help text to make that clear. In addition to that, list -Version and -help flags as well. Signed-off-by: Phil Sutter --- genl/genl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[iproute PATCH 10/10] man: ss.8: Describe --events option

2018-08-16 Thread Phil Sutter
Signed-off-by: Phil Sutter --- man/man8/ss.8 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/man/man8/ss.8 b/man/man8/ss.8 index 28033d8f01dda..7a6572b173648 100644 --- a/man/man8/ss.8 +++ b/man/man8/ss.8 @@ -242,6 +242,9 @@ Print summary statistics. This option does not parse socket

[iproute PATCH 09/10] rtmon: List options in help text

2018-08-16 Thread Phil Sutter
Signed-off-by: Phil Sutter --- ip/rtmon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ip/rtmon.c b/ip/rtmon.c index acc11df49b423..0e795f740e627 100644 --- a/ip/rtmon.c +++ b/ip/rtmon.c @@ -63,7 +63,9 @@ static int dump_msg2(const struct sockaddr_nl *who, static

[iproute PATCH 03/10] devlink: trivial: Make help text consistent

2018-08-16 Thread Phil Sutter
Typically the part of the flag in brackets completes the leading part instead of repeating it. Signed-off-by: Phil Sutter --- devlink/devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlink/devlink.c b/devlink/devlink.c index 784bb84bf7ad6..519ee2577cc4c 100644

[iproute PATCH 07/10] ip: Add missing -M flag to help text

2018-08-16 Thread Phil Sutter
Signed-off-by: Phil Sutter --- ip/ip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/ip.c b/ip/ip.c index 893c3c43ef99a..93382d671f467 100644 --- a/ip/ip.c +++ b/ip/ip.c @@ -55,7 +55,7 @@ static void usage(void) " OPTIONS := { -V[ersion] | -s[tatistics]

[iproute PATCH 01/10] man: bridge.8: Document -oneline option

2018-08-16 Thread Phil Sutter
Copied the description from ip.8. Signed-off-by: Phil Sutter --- man/man8/bridge.8 | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/man/man8/bridge.8 b/man/man8/bridge.8 index 6dfd4178a19cc..53cd3d0a3d933 100644 --- a/man/man8/bridge.8 +++ b/man/man8/bridge.8

[iproute PATCH 06/10] man: ifstat.8: Document --json and --pretty options

2018-08-16 Thread Phil Sutter
Signed-off-by: Phil Sutter --- man/man8/ifstat.8 | 8 1 file changed, 8 insertions(+) diff --git a/man/man8/ifstat.8 b/man/man8/ifstat.8 index 3ba0088d8940a..8cd164dda6d72 100644 --- a/man/man8/ifstat.8 +++ b/man/man8/ifstat.8 @@ -48,6 +48,14 @@ Report average over the last SECS

[iproute PATCH 08/10] man: rtacct.8: Fix nstat options

2018-08-16 Thread Phil Sutter
Add missing --pretty and --json options, correct --zero to --zeros and correct the mess around --scan/--interval including broken man page formatting. Signed-off-by: Phil Sutter --- man/man8/rtacct.8 | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/man/man8

[iproute PATCH v4] Make colored output configurable

2018-08-16 Thread Phil Sutter
Allow for -color={never,auto,always} to have colored output disabled, enabled only if stdout is a terminal or enabled regardless of stdout state. Signed-off-by: Phil Sutter --- Changes since v1: - Allow to override isatty() check by specifying '-color' flag more than once. - Document new

Re: [iproute PATCH v3] Make colored output configurable

2018-08-16 Thread Phil Sutter
On Thu, Aug 16, 2018 at 10:19:50AM +0200, Phil Sutter wrote: > Allow for -color={never,auto,always} to have colored output disabled, > enabled only if stdout is a terminal or enabled regardless of stdout > state. > > Signed-off-by: Phil Sutter Argh, please ignore this one -

[iproute PATCH v3] Make colored output configurable

2018-08-16 Thread Phil Sutter
Allow for -color={never,auto,always} to have colored output disabled, enabled only if stdout is a terminal or enabled regardless of stdout state. Signed-off-by: Phil Sutter --- Changes since v1: - Allow to override isatty() check by specifying '-color' flag more than once. - Document new

Re: [iproute PATCH v2 4/4] lib: Enable colored output only for TTYs

2018-08-15 Thread Phil Sutter
On Wed, Aug 15, 2018 at 10:57:13AM -0600, David Ahern wrote: > On 8/15/18 10:51 AM, Phil Sutter wrote: > > Should I respin the fixes or will you apply the series > > partially? > > Stephen has released 4.18 but not merged -next to master yet, so I > applied the first

Re: [iproute PATCH v2 4/4] lib: Enable colored output only for TTYs

2018-08-15 Thread Phil Sutter
On Wed, Aug 15, 2018 at 10:43:25AM -0600, David Ahern wrote: > On 8/15/18 10:39 AM, Phil Sutter wrote: > > On Wed, Aug 15, 2018 at 10:24:31AM -0600, David Ahern wrote: > >> On 8/15/18 10:21 AM, Phil Sutter wrote: > >>> Add an additional prerequisite to che

Re: [iproute PATCH v2 4/4] lib: Enable colored output only for TTYs

2018-08-15 Thread Phil Sutter
On Wed, Aug 15, 2018 at 10:24:31AM -0600, David Ahern wrote: > On 8/15/18 10:21 AM, Phil Sutter wrote: > > Add an additional prerequisite to check_enable_color() to make sure > > stdout actually points to an open TTY device. Otherwise calls like > > > >

[iproute PATCH v2 0/4] A bunch of fixes regarding colored output

2018-08-15 Thread Phil Sutter
patch according to feedback. Details given in changelog of that patch. Phil Sutter (4): tc: Fix typo in check for colored output bridge: Fix check for colored output Merge common code for conditionally colored output lib: Enable colored output only for TTYs bridge/bridge.c | 5

[iproute PATCH v2 4/4] lib: Enable colored output only for TTYs

2018-08-15 Thread Phil Sutter
off-by: Phil Sutter --- Changes since v1: - Allow to override isatty() check by specifying '-color' flag more than once. - Document new behaviour in man pages. --- lib/color.c | 6 +- man/man8/bridge.8 | 5 - man/man8/ip.8 | 5 - man/man8/tc.8 | 5 - 4 files changed,

[iproute PATCH 3/4] Merge common code for conditionally colored output

2018-08-15 Thread Phil Sutter
Instead of calling enable_color() conditionally with identical check in three places, introduce check_enable_color() which does it in one place. Signed-off-by: Phil Sutter --- bridge/bridge.c | 3 +-- include/color.h | 1 + ip/ip.c | 3 +-- lib/color.c | 9 + tc/tc.c

[iproute PATCH 2/4] bridge: Fix check for colored output

2018-08-15 Thread Phil Sutter
Signed-off-by: Phil Sutter --- bridge/bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge/bridge.c b/bridge/bridge.c index 7fcfe1116f6e5..289a157d37f03 100644 --- a/bridge/bridge.c +++ b/bridge/bridge.c @@ -174,7 +174,7 @@ main(int argc, c

[iproute PATCH 1/4] tc: Fix typo in check for colored output

2018-08-15 Thread Phil Sutter
The check used binary instead of boolean AND, which means colored output was enabled only if the number of specified '-color' flags was odd. Fixes: 2d165c0811058 ("tc: implement color output") Signed-off-by: Phil Sutter --- tc/tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[iproute PATCH] man: ip-route: Clarify referenced versions are Linux ones

2018-08-15 Thread Phil Sutter
Versioning scheme of Linux and iproute2 is similar, therefore the referenced kernel versions are likely to confuse readers. Clarify this by prefixing each kernel version by 'Linux' prefix. Signed-off-by: Phil Sutter --- man/man8/ip-route.8.in | 30 +++--- 1 file changed

[iproute PATCH 1/4] tc: Fix typo in check for colored output

2018-08-15 Thread Phil Sutter
The check used binary instead of boolean AND, which means colored output was enabled only if the number of specified '-color' flags was odd. Fixes: 2d165c0811058 ("tc: implement color output") Signed-off-by: Phil Sutter --- tc/tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[iproute PATCH 4/4] lib: Enable colored output only for TTYs

2018-08-15 Thread Phil Sutter
Add an additional prerequisite to check_enable_color() to make sure stdout actually points to an open TTY device. Otherwise calls like | ip -color a s >/tmp/foo will print color escape sequences into that file. Signed-off-by: Phil Sutter --- lib/color.c | 3 ++- 1 file changed, 2 inserti

[iproute PATCH 2/4] bridge: Fix check for colored output

2018-08-15 Thread Phil Sutter
Signed-off-by: Phil Sutter --- bridge/bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge/bridge.c b/bridge/bridge.c index 7fcfe1116f6e5..289a157d37f03 100644 --- a/bridge/bridge.c +++ b/bridge/bridge.c @@ -174,7 +174,7 @@ main(int argc, c

[iproute PATCH 0/4] A bunch of fixes regarding colored output

2018-08-15 Thread Phil Sutter
This series contains fixes for conditionally colored output in patches 1 and 2. Patch 3 merges the common conditionals from ip, tc and bridge tools. Patch 4 then adds a further restriction to colored output to prevent garbled output when redirecting into a file. Phil Sutter (4): tc: Fix typo

[iproute PATCH 3/4] Merge common code for conditionally colored output

2018-08-15 Thread Phil Sutter
Instead of calling enable_color() conditionally with identical check in three places, introduce check_enable_color() which does it in one place. Signed-off-by: Phil Sutter --- bridge/bridge.c | 3 +-- include/color.h | 1 + ip/ip.c | 3 +-- lib/color.c | 9 + tc/tc.c

[iproute PATCH 3/3] testsuite: Add a first ss test validating ssfilter

2018-08-14 Thread Phil Sutter
This tests a few ssfilter expressions by selecting sockets from a TCP dump file. The dump was created using the following command: | ss -ntaD testsuite/tests/ss/ss1.dump It is fed into ss via TCPDIAG_FILE environment variable. Signed-off-by: Phil Sutter --- testsuite/tests/ss/ss1.dump | Bin

[iproute PATCH 0/3] Fix and test ssfilter

2018-08-14 Thread Phil Sutter
This series contains a fix for ssfilter and introduces a testscript to verify correct functionality. Phil Sutter (3): ss: Review ssfilter testsuite: Prepare for ss tests testsuite: Add a first ss test validating ssfilter misc/ssfilter.y | 36

[iproute PATCH 1/3] ss: Review ssfilter

2018-08-14 Thread Phil Sutter
-by: Samuel Mannehed Fixes: b2038cc0b2403 ("ssfilter: Eliminate shift/reduce conflicts") Signed-off-by: Phil Sutter --- misc/ssfilter.y | 36 +--- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/misc/ssfilter.y b/misc/ssfilter.y index 88d

[iproute PATCH 2/3] testsuite: Prepare for ss tests

2018-08-14 Thread Phil Sutter
This merges the shared bits from ts_tc() and ts_ip() into a common function for being wrapped by the first ones and adds a third ts_ss() for testing ss commands. Signed-off-by: Phil Sutter --- testsuite/Makefile | 2 +- testsuite/lib/generic.sh | 37

Re: [RFC net-next] ipv4: Don't promote secondaries when flushing addresses

2018-06-07 Thread Phil Sutter
Hi Jakub, On Thu, Jun 07, 2018 at 02:17:50PM +0200, Jakub Sitnicki wrote: > On Thu, 7 Jun 2018 13:00:29 +0200 > Michal Kubecek wrote: > > > On Thu, Jun 07, 2018 at 12:13:01PM +0200, Jakub Sitnicki wrote: > > > Promoting secondary addresses on address removal makes flushing all > > > addresses

Re: [PATCH bpf-next v3 05/11] bpf: avoid retpoline for lookup/update/delete calls on maps

2018-06-04 Thread Phil Sutter
Hi! On Sun, Jun 03, 2018 at 07:08:55PM +0200, Jesper Dangaard Brouer wrote: [...] > Secondly I personally *hate* how the 'ip' does it's short options > parsing and especially order/precedence ambiguity. Phil Sutter > (Fedora/RHEL iproute2 maintainer) have a funny quiz ill

Re: [PATCH iproute2] iplink_vrf: Save device index from response for return code

2018-06-01 Thread Phil Sutter
eed. > > Fixes: 86bf43c7c2fdc ("lib/libnetlink: update rtnl_talk to support malloc > buff at run time") > Cc: Hangbin Liu > Cc: Phil Sutter > Signed-off-by: David Ahern Acked-by: Phil Sutter Thanks, Phil

[iproute PATCH v2 3/3] ss: Drop filter_default_dbs()

2018-03-27 Thread Phil Sutter
Instead call filter_db_parse(..., "all"). This eliminates the duplicate default DB definition. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 83e476a0407e

[iproute PATCH v2 0/3] ss: Allow excluding a socket table from being queried

2018-03-27 Thread Phil Sutter
errors in patch 2/3. Phil Sutter (3): ss: Allow excluding a socket table from being queried ss: Put filter DB parsing into a separate function ss: Drop filter_default_dbs() man/man8/ss.8 | 8 +++- misc/ss.c | 147 +++--- 2 files

[iproute PATCH v2 1/3] ss: Allow excluding a socket table from being queried

2018-03-27 Thread Phil Sutter
to '-A' parameter with an exclamation mark to inverse its meaning. Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/ss.8 | 8 - misc/ss.c | 108 -- 2 files changed, 66 insertions(+), 50 deletions(-) diff --git a/man/man8/

[iproute PATCH v2 2/3] ss: Put filter DB parsing into a separate function

2018-03-27 Thread Phil Sutter
length array, use this knowledge to make the inner array of fixed length. But since DB values start from zero, an explicit end entry needs to be present as well, so the inner array has to be MAX_DB + 1 in size. Signed-off-by: Phil Sutter <p...@nwl.cc> --- Changes since v1: - Fix checkpatch

Re: [iproute PATCH 2/3] ss: Put filter DB parsing into a separate function

2018-03-27 Thread Phil Sutter
On Tue, Mar 27, 2018 at 11:46:01AM -0700, Stephen Hemminger wrote: > On Sat, 24 Mar 2018 19:18:10 +0100 > Phil Sutter <p...@nwl.cc> wrote: > > > +#define ENTRY(name, ...) { #name, { __VA_ARGS__, MAX_DB }} > > > + ENTRY(all, U

[iproute PATCH 0/3] ss: Allow excluding a socket table from being queried

2018-03-24 Thread Phil Sutter
The first patch in this series adds the new functionality, the remaining two refactor the code a bit. Phil Sutter (3): ss: Allow excluding a socket table from being queried ss: Put filter DB parsing into a separate function ss: Drop filter_default_dbs() man/man8/ss.8 | 8 +++- misc/ss.c

[iproute PATCH 1/3] ss: Allow excluding a socket table from being queried

2018-03-24 Thread Phil Sutter
to '-A' parameter with an exclamation mark to inverse its meaning. Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/ss.8 | 8 - misc/ss.c | 108 -- 2 files changed, 66 insertions(+), 50 deletions(-) diff --git a/man/man8/

[iproute PATCH 3/3] ss: Drop filter_default_dbs()

2018-03-24 Thread Phil Sutter
Instead call filter_db_parse(..., "all"). This eliminates the duplicate default DB definition. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index e6511014ba3f

[iproute PATCH 2/3] ss: Put filter DB parsing into a separate function

2018-03-24 Thread Phil Sutter
length array, use this knowledge to make the inner array of fixed length. But since DB values start from zero, an explicit end entry needs to be present as well, so the inner array has to be MAX_DB + 1 in size. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ss.c

[iproute PATCH] ssfilter: Eliminate shift/reduce conflicts

2018-03-24 Thread Phil Sutter
The problematic bit was the 'expr: expr expr' rule. Fix this by making 'expr' token represent a single filter only and introduce a new token 'exprlist' to represent a combination of filters. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/ssfilter.

[iproute PATCH] man: tc-vlan.8: Fix for incorrect example

2018-03-23 Thread Phil Sutter
This has to be a second match statement to the same u32 filter, not a second one (which tc-filter doesn't support at all). Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/tc-vlan.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man8/tc-vlan.8 b/man/man8/tc-

[iproute PATCH] man: ip-route.8: ssthresh parameter is NUMBER

2018-03-22 Thread Phil Sutter
Synopsis section was inconsistent with regards to help text and later description of ssthresh parameter. Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/ip-route.8.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in

[iproute PATCH] ip-link: Fix use after free in nl_get_ll_addr_len()

2018-03-01 Thread Phil Sutter
_talk to support malloc buff at run time") Signed-off-by: Phil Sutter <p...@nwl.cc> --- ip/iplink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ip/iplink.c b/ip/iplink.c index 230f4c5377d9f..d401311bcad9f 100644 --- a/ip/iplink.c +++ b/ip/iplink.c @@ -276,8 +276

Re: [PATCH v2] sched: report if filter is too large to dump

2018-02-21 Thread Phil Sutter
Hi Roman, On Wed, Feb 21, 2018 at 09:38:52AM +0100, Roman Kapl wrote: > On 02/21/2018 08:45 AM, Phil Sutter wrote: > > On Mon, Feb 19, 2018 at 09:32:51PM +0100, Roman Kapl wrote: > >> So far, if the filter was too large to fit in the allocated skb, the > >> kern

Re: [PATCH v2] sched: report if filter is too large to dump

2018-02-20 Thread Phil Sutter
Hi Roman, On Mon, Feb 19, 2018 at 09:32:51PM +0100, Roman Kapl wrote: > So far, if the filter was too large to fit in the allocated skb, the > kernel did not return any error and stopped dumping. Modify the dumper > so that it returns -EMSGSIZE when a filter fails to dump and it is the > first

Re: [PATCH RFC 0/4] net: add bpfilter

2018-02-20 Thread Phil Sutter
Hi Michal, On Tue, Feb 20, 2018 at 10:35:41AM +0100, Michal Kubecek wrote: > On Mon, Feb 19, 2018 at 06:09:39PM +0100, Phil Sutter wrote: > > What puzzles me about your argumentation is that you seem to propose for > > the kernel to cover up flaws in userspace. Spinning this

  1   2   3   4   5   6   7   8   9   10   >