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
are not the intended > recipient, please notify the sender immediately and do not disclose the > contents to any other person, use it for any purpose, or store or copy the > information in any medium. Thank you. Luckily I'm the intended recipient so I may choose to disclose the content (e.g. to a mailing list). Cheers, Phil

[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
alues before and after (your changes) are consistent. > > If also you will do us a kindness and add maybe a testcase in tdc? > This way next person wanting to fix it can run the tests first before > posting a patch. What is "tdc"? Cheers, Phil

[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
fix_u32_bug'. In that same commit, I don't see a related #define though. Do you remember why this was changed? Seems like the old code was problematic somehow. Cheers, Phil [1] https://github.com/laijs/linux-kernel-ancient-history/commit/4e54c4816bfe51c145382d272b19c2ae41e9e36f#

Re: tc: u32: Wrong sample hash calculation

2021-01-22 Thread Phil Sutter
#x27;t point out any implications with changing u32's key folding in kernel space, I'll just give it a try. Thanks, Phil

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
old code would work if key and mask weren't in network byteorder. I guess that also changed since then. I would simply send a patch to fix iproute2, but I don't like the kernel's hash "folding" as it ignores any bits beyond the first eight. So I would prefer to "fix" the kernel instead but would like to hear your opinions as that change has a much larger scope than just iproute2's 'sample' option. Thanks, Phil

[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
= 0) | close(fd); Cheers, Phil

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
ng to me > > to get an OUTPUT hook on the inner packet in the forwarding case. > I re-read the whole thread and I agree with you. There is no reason to pass > the > inner packet through the OUTPUT hook (my comment about the consistency with ip > tunnels is still valid ;-)). >

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

Re: Testing of r8169 workaround removal

2019-04-28 Thread Phil Reid
n't properly start a renegotiation when soft-reset. -* Explicitly requesting a renegotiation fixes this. -*/ - if (tp->phydev->autoneg == AUTONEG_ENABLE) - phy_restart_aneg(tp->phydev); } static void rtl_rar_set(struct rtl8169_private *tp,

Re: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-21 Thread Phil Reid
that unless the BCMR_RESET bit is written, then m88e1121_config_aneg_rgmii_delays() has no effect, does that sound like what you are observing? Does the following work for you (Phil and yourself)? Thank you, Florian. But that didn't work for me either. I think the key question is as what H

Re: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-20 Thread Phil Reid
On 20/03/2019 2:39 pm, Heiner Kallweit wrote: On 20.03.2019 06:16, Phil Reid wrote: On 20/03/2019 11:37 am, Florian Fainelli wrote: On 3/19/2019 7:34 PM, liweihang wrote: Hi all, I've met a similar issue and sent an email to discuss about it before: Question about setting speed and d

Re: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-19 Thread Phil Reid
m the fact that unless the BCMR_RESET bit is written, then m88e1121_config_aneg_rgmii_delays() has no effect, does that sound like what you are observing? Does the following work for you (Phil and yourself)? diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 3ccba37bd6dd..6a1ea4c

Re: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-19 Thread Phil Reid
On 20/03/2019 12:53 am, Florian Fainelli wrote: On 3/18/19 6:32 PM, Phil Reid wrote: On 19/03/2019 1:09 am, Florian Fainelli wrote: On 3/17/19 7:11 PM, Phil Reid wrote: On 16/03/2019 5:58 am, Florian Fainelli wrote: On 3/15/19 1:52 AM, Phil Reid wrote: G'day All, I've just u

Re: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-18 Thread Phil Reid
On 19/03/2019 1:09 am, Florian Fainelli wrote: On 3/17/19 7:11 PM, Phil Reid wrote: On 16/03/2019 5:58 am, Florian Fainelli wrote: On 3/15/19 1:52 AM, Phil Reid wrote: G'day All, I've just update from kernel 4.19 to 5.0 on a custom board that has a marvell dsa mv88e6085 and the

Re: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-17 Thread Phil Reid
On 16/03/2019 5:58 am, Florian Fainelli wrote: On 3/15/19 1:52 AM, Phil Reid wrote: G'day All, I've just update from kernel 4.19 to 5.0 on a custom board that has a marvell dsa mv88e6085 and the phy on the mv88e6085 will only connect at 10Mb/s with the above mentioned patch applied.

regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-15 Thread Phil Reid
ell: Avoid unnecessary soft reset) Revert the patch, and the associated build fix 4b1bd6976945417 (net: phy: marvell: Fix build.) restores connections to 1Gb/s. Anyone have any thoughts as to the correct fix? -- Regards Phil

[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
nt declares support), even 32 KB would be more than enough. > > That's what I was asking, thanks. So 32kB today is sufficient, 64kB has > future buffer. So this whole PEEK and allocate the message size is > overkill. It could just as easily been bumped from 32kB to 64kB in the > original patch and been good for a while. Yes, I think the real problem is how VF-related messages are structured currently. Cheers, Phil

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
ference). Adding JSON output support everywhere is a nice feature when it comes to scripting, but it won't help console users. Unless you expect CLI frontends to come turning that JSON into human-readable output. IMHO, JSON output wouldn't even help in this case - unless Eric indeed prefers to write/use a JSON parser for his analysis instead of something along 'ss | grep'. > The buffering patch (in iproute2-next) can/will be reverted. It's not fair to claim that despite Stefano's commitment to fix the reported issues. His ss output rewrite is there since v4.15.0 and according to git history it needed only two fixes so far. I've had one-liners which required more follow-ups than that! Also, we're still discovering issues introduced by all the jsonify patches. Allowing for people to get things right not the first time but after a few tries is important. If you want to revert something, start with features which have a fundamental design issue in the exact situation they tried to improve, like the MSG_PEEK | MSG_TRUNC thing Hangbin and me wrote. Thanks, Phil

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

2019-02-13 Thread Phil Sutter
n is not quite what one expects after reading recvmsg(2). Cheers, Phil

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
; I'm wondering if this should be in the 'MAN ip' page. Please have a look at ip-link(8), its synopsis section at least lists 'promisc' option for 'ip link set' command. I'll follow-up with a patch adding a little description, though. Cheers, Phil

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
soon find out. A more constructive approach to replacing "fuck this and that" than simply applying 's/fuck/whatever/' would be to provide details what exactly is so bad about this and that. Of course that's not possible without considerable effort, unlike your approach which doesn't alter what is written but merely which words are used for it. Cheers, Phil

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
#x27;t follow all includes so the above is not necessarily what exactly happens. But either way, ip/xfrm_policy.c doesn't get IPPROTO_MH define from include/uapi/linux/in6.h. Cheers, Phil

[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
uot;dynamic") == 0) { > - filter.flags &= ~IFA_F_PERMANENT; > - filter.flagmask |= IFA_F_PERMANENT; > + arg = "-permanent"; I like this idea, also because it's much easier to get how 'dynamic' and 'primary' are special. I'll respin then. Thanks, Phil

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
x27;test_on' calls grep with '-E')? E.g. this instead of the above: | test_on "ESTAB *0 *0 *10.0.0.1:36266 *10.0.0.1:22" Note that I didn't test this change, just made sure 'grep -E' recognizes ' *' as expected. Cheers, Phil

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
r, we should also be able to set/unset ttl inherit. > > Phil, what do you think? All fine with me. I'm not familiar with either of VXLAN or Geneve, you're the experts here. I was just the random guy wondering why things are done one way and not the other. :) Thanks for your diligent efforts at clearing up the mysteries! Cheers, Phil

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
dev d0 protocol ip parent : flower skip_sw ip_flags nofirstfrag action drop | RTNETLINK answers: Operation not supported | We have an error talking to the kernel, -1 | % echo $? | 2 Are you sure you tested the right binary? Cheers, Phil

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

2018-09-27 Thread Phil Sutter
k whether the attribute is there *and* non-zero. OK, looks like Geneve driver always exports IFLA_GENEVE_TTL_INHERIT. Oddly, I can't find where VXLAN driver in kernel does export the IFLA_VXLAN_TTL_INHERIT attribute. Am I missing something? Do you know why handling of the attributes in both drivers differ? Cheers, Phil

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
uotes and parens, e.g.: | Fixes: deadbeef ("foo bar") Cheers, Phil

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
won't lead to output if JSON is active. For reference, check print_color_string() in lib/json_print.c and _IS_JSON_CONTEXT macro. Cheers, Phil

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

  1   2   3   4   5   6   7   8   9   10   >