Re: rename the command ip

2021-03-01 Thread Phil Sutter
On Mon, Mar 01, 2021 at 08:20:33AM +0200, Leon Romanovsky wrote: > On Sun, Feb 28, 2021 at 10:39:14PM +0100, Phil Sutter wrote: > > William, > > > > [Cc'ing netdev list as that's the place to discuss iproute2 > > development.] > > <...> > &g

Re: rename the command ip

2021-02-28 Thread Phil Sutter
William, [Cc'ing netdev list as that's the place to discuss iproute2 development.] On Fri, Feb 26, 2021 at 12:04:12PM -0600, William Chen wrote: > I see your excellent contributions to iproute2. I hope that you are well. Thanks! > But I have to say the command name "ip" is not good. It renders

[PATCH] selftests: tc-testing: u32: Add tests covering sample option

2021-02-08 Thread Phil Sutter
Kernel's key folding basically consists of shifting away least significant zero bits in mask and masking the resulting value with (divisor - 1). Test for u32's 'sample' option to behave identical. Suggested-by: Jamal Hadi Salim Signed-off-by: Phil Sutter --- These tests

Re: [iproute PATCH] tc: u32: Fix key folding in sample option

2021-02-04 Thread Phil Sutter
On Thu, Feb 04, 2021 at 10:28:26AM -0500, Jamal Hadi Salim wrote: > On 2021-02-04 9:50 a.m., Phil Sutter wrote: > > On Thu, Feb 04, 2021 at 09:34:01AM -0500, Jamal Hadi Salim wrote: > >> On 2021-02-04 9:04 a.m., Phil Sutter wrote: > >>> Jamal, > >>> >

Re: [iproute PATCH] tc: u32: Fix key folding in sample option

2021-02-04 Thread Phil Sutter
On Thu, Feb 04, 2021 at 09:34:01AM -0500, Jamal Hadi Salim wrote: > On 2021-02-04 9:04 a.m., Phil Sutter wrote: > > Jamal, > > > > On Thu, Feb 04, 2021 at 08:19:55AM -0500, Jamal Hadi Salim wrote: > >> I couldnt tell by inspection if what used to work before contin

Re: [iproute PATCH] tc: u32: Fix key folding in sample option

2021-02-04 Thread Phil Sutter
Jamal, On Thu, Feb 04, 2021 at 08:19:55AM -0500, Jamal Hadi Salim wrote: > I couldnt tell by inspection if what used to work before continues to. > In particular the kernel version does consider the divisor when folding. That's correct. And so does tc. What's the matter? > Two examples that curr

[iproute PATCH] tc: u32: Fix key folding in sample option

2021-02-02 Thread Phil Sutter
alone was not sufficient - additional byteorder fixes were needed. While being at it, make use of ffs() and thereby align the code with how kernel determines the shift width. Fixes: 267480f55383c ("Backout the 2.4 utsname hash patch.") Signed-off-by: Phil Sutter --- Initially I considere

Re: tc: u32: Wrong sample hash calculation

2021-01-22 Thread Phil Sutter
Jamal, On Fri, Jan 22, 2021 at 06:25:22AM -0500, Jamal Hadi Salim wrote: [...] > My gut feel is user space is the right/easier spot to fix this > as long as it doesnt break the working setup of 8b. One last attempt at clarifying the situation: Back in 2004, your commit 4e54c4816bf ("[NET]: Add t

Re: tc: u32: Wrong sample hash calculation

2021-01-22 Thread Phil Sutter
Hi Jamal, On Fri, Jan 22, 2021 at 06:25:22AM -0500, Jamal Hadi Salim wrote: [...] > Is this always true though for all scenarios of key > 8b? Key size reduction algorithms simply differ, and before applying the divisor the key is reduced to an eight bit value. If the higher bytes are zero, the re

Re: tc: u32: Wrong sample hash calculation

2021-01-20 Thread Phil Sutter
Hi Jamal, On Wed, Jan 20, 2021 at 08:55:11AM -0500, Jamal Hadi Salim wrote: > On 2021-01-18 6:29 a.m., Phil Sutter wrote: > > Hi! > > > > Playing with u32 filter's hash table I noticed it is not possible to use > > 'sample' option with keys larger t

tc: u32: Wrong sample hash calculation

2021-01-18 Thread Phil Sutter
Hi! Playing with u32 filter's hash table I noticed it is not possible to use 'sample' option with keys larger than 8bits to calculate the hash bucket. Turns out key hashing in kernel and iproute2 differ: * net/sched/cls_u32.c (kernel) basically does: hash = ntohl(key & mask); hash >>= ffs(ntohl(

[ANNOUNCE] iptables 1.8.7 release

2021-01-15 Thread Phil Sutter
lling! Florian Westphal (4): xtables-monitor: fix rule printing xtables-monitor: fix packet family protocol xtables-monitor: print packet first xtables-monitor: 'LL=0x304' is not very convenient, print LOOPBACK instead. Pablo Neira Ayuso (1): tests: shell: update format of registers

Re: [PATCH iproute2 2/2] lib/fs: Fix single return points for get_cgroup2_*

2020-12-18 Thread Phil Sutter
On Fri, Dec 18, 2020 at 08:09:23PM +0100, Andrea Claudi wrote: > Functions get_cgroup2_id() and get_cgroup2_path() uncorrectly performs > cleanup on the single return point. Both of them may get to use close() > with a negative argument, if open() fails. > > Fix this adding proper labels and gotos

Re: [PATCH iproute2 1/2] lib/fs: avoid double call to mkdir on make_path()

2020-12-18 Thread Phil Sutter
ix and simplify make_path()") > Signed-off-by: Andrea Claudi Acked-by: Phil Sutter Thanks, Phil

Re: [PATCH v2] xfrm: interface: Don't hide plain packets from netfilter

2020-12-10 Thread Phil Sutter
Hi Nicolas, On Thu, Dec 10, 2020 at 02:18:45PM +0100, Nicolas Dichtel wrote: > Le 10/12/2020 à 12:48, Eyal Birger a écrit : > > On Thu, Dec 10, 2020 at 1:10 PM Nicolas Dichtel > > wrote: > [snip] > > I also think they should be consistent. But it'd still be confusing to me > > to get an OUTPUT ho

Re: [PATCH v2] xfrm: interface: Don't hide plain packets from netfilter

2020-12-08 Thread Phil Sutter
Hi Eyal, On Tue, Dec 08, 2020 at 04:47:02PM +0200, Eyal Birger wrote: > On Mon, Dec 7, 2020 at 4:07 PM Phil Sutter wrote: > > > > With an IPsec tunnel without dedicated interface, netfilter sees locally > > generated packets twice as they exit the physical interface: O

Re: [PATCH v2] xfrm: interface: Don't hide plain packets from netfilter

2020-12-08 Thread Phil Sutter
Hi Nicolas, On Tue, Dec 08, 2020 at 10:02:16AM +0100, Nicolas Dichtel wrote: > Le 07/12/2020 à 14:43, Phil Sutter a écrit : [...] > > diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c > > index aa4cdcf69d471..24af61c95b4d4 100644 > > --- a/net/xfrm/xfrm_inte

[PATCH v2] xfrm: interface: Don't hide plain packets from netfilter

2020-12-07 Thread Phil Sutter
again from netfilter's point of view. Fixes: f203b76d78092 ("xfrm: Add virtual xfrm interfaces") Signed-off-by: Phil Sutter --- Changes since v1: - Extend recipients list, no code changes. --- net/xfrm/xfrm_interface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ne

[ANNOUNCE] iptables 1.8.6 release

2020-10-31 Thread Phil Sutter
t danger of applying REJECT to INVALID CTs build: resolve iptables-apply not getting installed Maciej Żenczykowski (1): libxtables: compiler warning fixes for NO_SHARED_LIBS Pablo Neira Ayuso (3): extensions: libxt_conntrack: provide translation for DNAT and SNAT --ctstate iptables: replace l

[iproute PATCH] ip link: Fix indenting in help text

2020-08-29 Thread Phil Sutter
laced by values, not put literally. Fixes: 8589eb4efdf2a ("treewide: refactor help messages") Fixes: 5a3ec4ba64783 ("iplink: Update usage in help message") Signed-off-by: Phil Sutter --- ip/iplink.c | 40 1 file changed, 20 inserti

Re: netfilter: does the API break or something else ?

2020-05-14 Thread Phil Sutter
Hi, On Wed, May 13, 2020 at 11:20:35PM +0800, Xiubo Li wrote: > Recently I hit one netfilter issue, it seems the API breaks or something > else. Just for the record, this was caused by a misconfigured kernel. Cheers, Phil

Re: [net-next PATCH] net: rtnetlink: Enslave device before bringing it up

2019-06-02 Thread Phil Sutter
Hi David, On Fri, May 31, 2019 at 02:26:15PM -0700, David Miller wrote: > From: Phil Sutter > Date: Wed, 29 May 2019 15:51:20 +0200 > > > Unlike with bridges, one can't add an interface to a bond and set it up > > at the same time: > > > > | # ip link set

Re: [net-next PATCH] net: rtnetlink: Enslave device before bringing it up

2019-05-29 Thread Phil Sutter
On Wed, May 29, 2019 at 09:41:07AM -0600, David Ahern wrote: > On 5/29/19 7:51 AM, Phil Sutter wrote: > > Unlike with bridges, one can't add an interface to a bond and set it up > > at the same time: > > > > | # ip link set dummy0 down > > | # ip link

[net-next PATCH] net: rtnetlink: Enslave device before bringing it up

2019-05-29 Thread Phil Sutter
, vrf cycles the interface (i.e., sets it down and immediately up again) and the others just don't care. Support the common notion of setting the interface up after enslaving it by sorting the operations accordingly. Signed-off-by: Phil Sutter --- net/core/rtnetlink.c | 14 +++-

Re: [PATCH iproute2 net-next] ip: add a new parameter -Numeric

2019-05-20 Thread Phil Sutter
e_tests.sh in kernel self-tests. > Suggested-by: Phil Sutter > Signed-off-by: Hangbin Liu Acked-by: Phil Sutter Thanks for doing this, Hangbin! Phil

[iproute PATCH v2] ip-xfrm: Respect family in deleteall and list commands

2019-05-06 Thread Phil Sutter
be set if family is not AF_UNSPEC. Signed-off-by: Phil Sutter --- Changes since v1: - Fix code indenting in first chunk. --- ip/xfrm_policy.c | 6 +- ip/xfrm_state.c| 6 +- man/man8/ip-xfrm.8 | 6 +++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ip/xfrm_pol

[iproute PATCH] ip-xfrm: Respect family in deleteall and list commands

2019-04-29 Thread Phil Sutter
be set if family is not AF_UNSPEC. Signed-off-by: Phil Sutter --- ip/xfrm_policy.c | 6 +- ip/xfrm_state.c| 6 +- man/man8/ip-xfrm.8 | 6 +++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ip/xfrm_policy.c b/ip/xfrm_policy.c index 4a63e9ab602d7..c6dfe836c5374 10

[iproute PATCH] ip-address: Use correct max attribute value in print_vf_stats64()

2019-02-21 Thread Phil Sutter
IFLA_VF_MAX is larger than the highest valid index in vf array. Fixes: a1b99717c7cd7 ("Add displaying VF traffic statistics") Signed-off-by: Phil Sutter --- ip/ipaddress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index bc3

Re: [PATCH iproute2] lib/libnetlink: ensure a minimum of 32KB for the buffer used in rtnl_recvmsg()

2019-02-14 Thread Phil Sutter
On Thu, Feb 14, 2019 at 10:34:06AM -0700, David Ahern wrote: > On 2/14/19 6:49 AM, Michal Kubecek wrote: > > On Tue, Feb 12, 2019 at 07:04:17PM -0700, David Ahern wrote: > >> > >> Do we know of any single message sizes > 32k? 2d34851cd341 cites > >> increasing VF's but at some point there is a limi

Re: [PATCH iproute2 net-next v2 3/4] ss: Buffer raw fields first, then render them as a table

2019-02-13 Thread Phil Sutter
Hi Stephen, On Wed, Feb 13, 2019 at 01:55:34PM -0800, Stephen Hemminger wrote: > On Wed, 13 Feb 2019 22:17:16 +0100 > Stefano Brivio wrote: > > > On Wed, 13 Feb 2019 09:31:03 -0800 > > Eric Dumazet wrote: > > > > > On 02/13/2019 12:37 AM, Stefano Brivio wrote: > > > > On Tue, 12 Feb 2019 16:

Re: [PATCH iproute2] lib/libnetlink: ensure a minimum of 32KB for the buffer used in rtnl_recvmsg()

2019-02-13 Thread Phil Sutter
Hi Eric, On Tue, Feb 12, 2019 at 05:58:41PM -0800, Eric Dumazet wrote: > In the past, we tried to increase the buffer size up to 32 KB in order > to reduce number of syscalls per dump. > > Commit 2d34851cd341 ("lib/libnetlink: re malloc buff if size is not enough") > brought the size back to 4KB

Re: [iproute PATCH] man: ip-link: Describe promisc mode

2019-02-12 Thread Phil Sutter
Hi, On Mon, Feb 11, 2019 at 11:36:10AM -0800, Stephen Hemminger wrote: > On Mon, 11 Feb 2019 10:17:06 +0100 > Phil Sutter wrote: [...] > > diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in > > index 73d37c190fffa..5c327f01b6b45 100644 > > --- a/man/man8/ip-link

[iproute PATCH] man: ip-link: Describe promisc mode

2019-02-11 Thread Phil Sutter
Briefly explain what it is and where it's typically used. Signed-off-by: Phil Sutter --- man/man8/ip-link.8.in | 8 1 file changed, 8 insertions(+) diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in index 73d37c190fffa..5c327f01b6b45 100644 --- a/man/man8/ip-link.8.in

Re: How to set promiscuous mode

2019-02-11 Thread Phil Sutter
Hi, On Sat, Feb 09, 2019 at 03:22:33PM -0500, William Flanagan wrote: > Working with iproute2 for a task with Wireshark.  I don't see the > command in 'ip' to put an Ethernet port into promiscuous mode.  A reply > from the openSuse forum (below) tells me how. > > I'm wondering if this should be

Re: [iproute PATCH] ip-link: Fix listing of alias interfaces

2019-02-08 Thread Phil Sutter
Hi Stephen, On Fri, Feb 08, 2019 at 09:56:47AM -0800, Stephen Hemminger wrote: > On Thu, 7 Feb 2019 14:05:27 +0100 > Phil Sutter wrote: > > > Commit 50b9950dd9011 ("link dump filter") accidentally broke listing of > > links in the old alias interface notation: &

Re: [iproute PATCH] ip-link: Fix listing of alias interfaces

2019-02-08 Thread Phil Sutter
On Thu, Feb 07, 2019 at 04:24:36PM -0800, Stephen Hemminger wrote: > On Thu, 7 Feb 2019 14:05:27 +0100 > Phil Sutter wrote: > > > Commit 50b9950dd9011 ("link dump filter") accidentally broke listing of > > links in the old alias interface notation: &

Re: [net-next PATCH] net: rtnetlink: Support alias interfaces with RTM_GETLINK

2019-02-07 Thread Phil Sutter
On Thu, Feb 07, 2019 at 02:21:56PM +0100, Michal Kubecek wrote: > On Thu, Feb 07, 2019 at 02:02:15PM +0100, Phil Sutter wrote: > > On Thu, Feb 07, 2019 at 01:39:39PM +0100, Michal Kubecek wrote: > > > > > But I still don't think it would be a good idea. It'

[iproute PATCH] ip-link: Fix listing of alias interfaces

2019-02-07 Thread Phil Sutter
on-suffix prior to sending the RTM_GETLINK request. Fixes: 50b9950dd9011 ("link dump filter") Signed-off-by: Phil Sutter --- ip/ipaddress.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 2bc33f3a3b3f2..bc30d326ca0a3 100644 --- a/ip/ipaddre

Re: [net-next PATCH] net: rtnetlink: Support alias interfaces with RTM_GETLINK

2019-02-07 Thread Phil Sutter
Hi, On Thu, Feb 07, 2019 at 01:39:39PM +0100, Michal Kubecek wrote: > On Thu, Feb 07, 2019 at 01:27:28PM +0100, Phil Sutter wrote: > > On Thu, Feb 07, 2019 at 11:24:38AM +0100, Phil Sutter wrote: > > > Align interface name handling regarding alias interfaces in > > > rt

Re: [net-next PATCH] net: rtnetlink: Support alias interfaces with RTM_GETLINK

2019-02-07 Thread Phil Sutter
On Thu, Feb 07, 2019 at 11:24:38AM +0100, Phil Sutter wrote: > Align interface name handling regarding alias interfaces in > rtnl_getlink() with dev_ioctl() treating SIOCGIFINDEX ioctl calls. The > latter function strips any colon suffix before doing the interface > lookup, do

[net-next PATCH] net: rtnetlink: Support alias interfaces with RTM_GETLINK

2019-02-07 Thread Phil Sutter
Align interface name handling regarding alias interfaces in rtnl_getlink() with dev_ioctl() treating SIOCGIFINDEX ioctl calls. The latter function strips any colon suffix before doing the interface lookup, do the same for RTM_GETLINK requests. Signed-off-by: Phil Sutter --- net/core/rtnetlink.c

Re: [PATCH] test_rhashtable: remove semaphore usage

2018-12-10 Thread Phil Sutter
s is part of a longer, untested, series to remove semaphores > > from the kernel, please review as such before applying. > > --- > > lib/test_rhashtable.c | 28 > > 1 file changed, 16 insertions(+), 12 deletions(-) > > This was created

Re: [PATCH RFC 15/15] net: replace **** with a hug

2018-12-03 Thread Phil Sutter
On Fri, Nov 30, 2018 at 11:27:24AM -0800, Jarkko Sakkinen wrote: > In order to comply with the CoC, replace with a hug. This is incorrect: The patch doesn't replace '', but 'fuck' instead. > - /* Fuck, we are miserable poor guys... */ > + /* Hug, w

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
Eric Dumazet Fixes: 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 --

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

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

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

2018-11-15 Thread Phil Sutter
ow 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 ac

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 > @@ -1212

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

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

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

2018-11-13 Thread Phil Sutter
ow 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/i

[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

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 deli

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
onify htb 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 @@ stat

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

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

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

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

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

2018-10-18 Thread Phil Sutter
urce tracking information") 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

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

[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
x27;s 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 inde

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

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 NLA_U8

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

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 change

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

2018-09-27 Thread Phil Sutter
se > "ttl 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, e.g

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
ue to parser 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

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
ue to parser 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 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(

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

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

[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

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

  1   2   3   4   5   6   7   8   9   10   >