[iproute PATCH 1/3] tc: pedit: Fix layered op parsing

2016-03-02 Thread Phil Sutter
After lookup of the layered op submodule, pedit would pass argv and argc including the layered op identifier at first position which confused the submodule parser. Fix this by calling NEXT_ARG() before calling the parse_peopt() callback. Signed-off-by: Phil Sutter --- tc/m_pedit.c | 1 + 1 file

[iproute PATCH 2/3] tc: pedit: Fix parse_cmd()

2016-03-02 Thread Phil Sutter
efore calling any of the pack_key*() variants. Signed-off-by: Phil Sutter --- tc/m_pedit.c | 23 +++ 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/tc/m_pedit.c b/tc/m_pedit.c index 455e4ffd4b2bb..a314f482cd9c0 100644 --- a/tc/m_pedit.c +++ b/tc/m_pedit.c @@ -152,8

[iproute PATCH] iprule: Align help text with man page synopsis

2016-02-25 Thread Phil Sutter
The help text was misleading: One could think it is possible to list rules by selector, which would be nice but isn't. This change also clarifies that 'ip rule' defaults to 'list' if no further arguments are given. Signed-off-by: Phil Sutter --- ip/iprule.c | 5

[iproute PATCH 08/20] man: ip-address.8: Minor syntax fixes

2016-02-24 Thread Phil Sutter
nd 'preferred_lft' at the same time to 'ip address'. Signed-off-by: Phil Sutter --- man/man8/ip-address.8.in | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/man/man8/ip-address.8.in b/man/man8/ip-address.8.in index 159d9065f0c9b..ff3fe0b96b02a 100644

[iproute PATCH 12/20] man: ip-netns.8: Clarify synopsis a bit

2016-02-24 Thread Phil Sutter
Use brackets to show that 'ip netns' defaults to action 'list', drop superfluous curly braces around 'set' action keyword. Signed-off-by: Phil Sutter --- man/man8/ip-netns.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/man8/ip-netns

[iproute PATCH 00/20] Sync man pages and help texts

2016-02-24 Thread Phil Sutter
This patch series aims at improving consistency of builtin help texts and related man pages (synopsis section at least). It was created by comparing the two and fixing up whatever occurred to be broken. Phil Sutter (20): ip: align help text with manpage ipaddrlabel: Improve help text

[iproute PATCH 01/20] ip: align help text with manpage

2016-02-24 Thread Phil Sutter
Although the ip command accepts both "neighbor" and "neighbour" as subcommand, I assume it's sufficient to list it in help text as just "neigh" like ip.8 does. Signed-off-by: Phil Sutter --- ip/ip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

[iproute PATCH 15/20] man: ip-token.8: Review synopsis section

2016-02-24 Thread Phil Sutter
Drop unnecessary curly braces around single action keywords, point out that 'dev' parameter to 'ip token get' is optional and clarify that 'ip token' defaults to 'list' action. Signed-off-by: Phil Sutter --- man/man8/ip-token.8 | 12 ++-- 1 fi

[iproute PATCH 19/20] man: ip-l2tp.8: Fix BNF syntax

2016-02-24 Thread Phil Sutter
The 'ADDR' part of 'local' and 'remote' parameters is not optional, but may also consist of the word 'any'. While at it, add missing whitespace and fix fonts. Signed-off-by: Phil Sutter --- man/man8/ip-l2tp.8 | 24 +--- 1 file changed

[iproute PATCH 09/20] man: ip-link.8: minor font fix

2016-02-24 Thread Phil Sutter
We commonly use bold font for terminals and italic for non-terminals. Signed-off-by: Phil Sutter --- man/man8/ip-link.8.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in index 4d3234352004e..27c9a321c2af8 100644 --- a/man/man8

[iproute PATCH 04/20] ipneigh: add missing proxy keyword to help text

2016-02-24 Thread Phil Sutter
And while we're at it, add whitespace around braces and pipe symbol. Signed-off-by: Phil Sutter --- ip/ipneigh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/ipneigh.c b/ip/ipneigh.c index 92b7cd6f2a75b..9b1499b08b060 100644 --- a/ip/ipneigh.c +++ b/ip/ipne

[iproute PATCH 05/20] ipntable: Fix typo in help text

2016-02-24 Thread Phil Sutter
Signed-off-by: Phil Sutter --- ip/ipntable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/ipntable.c b/ip/ipntable.c index 6eb84e797b263..2763570ae34d7 100644 --- a/ip/ipntable.c +++ b/ip/ipntable.c @@ -52,7 +52,7 @@ static void usage(void) "

[iproute PATCH 02/20] ipaddrlabel: Improve help text precision

2016-02-24 Thread Phil Sutter
Neither 'list' nor 'flush' actions accept parameters, and with given prefix the action keyword is not optional anymore. Signed-off-by: Phil Sutter --- ip/ipaddrlabel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ip/ipaddrlabel.c b/ip/ipaddrlabel.c

[iproute PATCH 10/20] man: ip-link.8: Fix and improve synopsis

2016-02-24 Thread Phil Sutter
Reflect that it is possible to pass multiple parameters at the same time, also use the same trick the help text uses to emphasize vf specific parameters. Signed-off-by: Phil Sutter --- man/man8/ip-link.8.in | 97 --- 1 file changed, 53 insertions

[iproute PATCH 13/20] man: ip-ntable.8: Review synopsis section

2016-02-24 Thread Phil Sutter
The first line contained a c'n'p error, incorrectly listing 'ip address' syntax. Since PARAMS is used just once and there are not many other parameters to 'ip ntable change', state them inline and in addition to that clarify the possibility to pass multiple parameters

[iproute PATCH 14/20] man: ip-rule.8: Review synopsis section

2016-02-24 Thread Phil Sutter
Clarify that 'ip rule' defaults to action 'list', that 'flush' and 'save' actions don't accept additional parameters, add missing 'not' and 'goto' keywords and finally fix fonts used in 'fwmark' and &#x

[iproute PATCH 16/20] man: ip-tunnel.8: Document missing 6rd action

2016-02-24 Thread Phil Sutter
Also drop the non-terminal 'TIME' description as it is not referenced anywhere. Signed-off-by: Phil Sutter --- man/man8/ip-tunnel.8 | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/man/man8/ip-tunnel.8 b/man/man8/ip-tunnel.8 index 8b746cb0f52b8..493

[iproute PATCH 20/20] man: ip-*.8: drop any reference to generic ip options

2016-02-24 Thread Phil Sutter
Listing generic 'ip' options in subcommand man pages is redundant and error-prone, as they won't be kept in sync anyway. Since many other man pages don't list them either, drop references to them in the remaining ones. Signed-off-by: Phil Sutter --- man/man8

[iproute PATCH 17/20] man: ip-xfrm.8: Document missing parameters

2016-02-24 Thread Phil Sutter
Namely, 'extra-flag' of 'ip xfrm state' and 'flag' of 'ip xfrm policy'. Signed-off-by: Phil Sutter --- man/man8/ip-xfrm.8 | 11 +++ 1 file changed, 11 insertions(+) diff --git a/man/man8/ip-xfrm.8 b/man/man8/ip-xfrm.8 index dae0728811b2e..11f71

[iproute PATCH 07/20] iprule: add missing nat keyword to help text

2016-02-24 Thread Phil Sutter
Signed-off-by: Phil Sutter --- ip/iprule.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ip/iprule.c b/ip/iprule.c index 9923b8eb097d2..a7b53f43d4e17 100644 --- a/ip/iprule.c +++ b/ip/iprule.c @@ -38,6 +38,7 @@ static void usage(void) fprintf(stderr, "SELECTOR := [ not ] [

[iproute PATCH 11/20] man: ip-neighbour: Fix for missing NUD_STATE description

2016-02-24 Thread Phil Sutter
Signed-off-by: Phil Sutter --- man/man8/ip-neighbour.8 | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/man/man8/ip-neighbour.8 b/man/man8/ip-neighbour.8 index c9b0256e12207..19c6d9d8bf605 100644 --- a/man/man8/ip-neighbour.8 +++ b/man/man8/ip-neighbour.8 @@ -18,7

[iproute PATCH 06/20] iproute: TYPE keyword is not optional, fix help text accordingly

2016-02-24 Thread Phil Sutter
This is a bit pedantic, but brackets ([]) show optional values and since TYPE must not become empty, they're not suited to surround the type keyword choices. Use curly braces instead. Also add some missing whitespace to the parameter list above. Signed-off-by: Phil Sutter --- ip/iproute.

[iproute PATCH 18/20] man: ip.8: Add missing flags and token subcommand description

2016-02-24 Thread Phil Sutter
Signed-off-by: Phil Sutter --- man/man8/ip.8 | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/man/man8/ip.8 b/man/man8/ip.8 index b1f6907367275..aa2bc68c81ab6 100644 --- a/man/man8/ip.8 +++ b/man/man8/ip.8 @@ -21,7 +21,7 @@ ip \- show / manipulate

[iproute PATCH 03/20] iplink: fix help text syntax

2016-02-24 Thread Phil Sutter
Get rid of extraneous closing brackets and while here, merge the double netns parameter. Signed-off-by: Phil Sutter --- ip/iplink.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ip/iplink.c b/ip/iplink.c index 5ab9d613c4f99..5a220276f1f96 100644 --- a/ip/iplink.c

[iproute PATCH] ipl2tp: Print help even on systems without l2tp support

2016-02-24 Thread Phil Sutter
Signed-off-by: Phil Sutter --- ip/ipl2tp.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ip/ipl2tp.c b/ip/ipl2tp.c index f050880eef02a..3e3b21ddfb7fe 100644 --- a/ip/ipl2tp.c +++ b/ip/ipl2tp.c @@ -720,6 +720,9 @@ static int do_show(int argc, char **argv) int

[net PATCH] IFF_NO_QUEUE: Fix for drivers not calling ether_setup()

2016-02-17 Thread Phil Sutter
ial handling of tx_queue_len == 0") Tested-by: Mathieu Desnoyers Signed-off-by: Phil Sutter --- net/core/dev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index 3f4071a84a03f..75383f40e7ced 100644 --- a/net/core/dev.c +++ b/net/c

Re: [PATCH] Revert "net: sched: drop all special handling of tx_queue_len == 0"

2016-02-17 Thread Phil Sutter
On Wed, Feb 17, 2016 at 01:57:42PM +, Mathieu Desnoyers wrote: > - On Feb 17, 2016, at 7:47 AM, Phil Sutter p...@nwl.cc wrote: > > > Hi, > > > > On Tue, Feb 16, 2016 at 07:56:23PM -0500, Mathieu Desnoyers wrote: > >> This reverts commit 348e3435cbefa815

Re: [PATCH] Revert "net: sched: drop all special handling of tx_queue_len == 0"

2016-02-17 Thread Phil Sutter
Hi, On Tue, Feb 16, 2016 at 07:56:23PM -0500, Mathieu Desnoyers wrote: > This reverts commit 348e3435cbefa815bd56a5205c1412b5afe7b92e. > It breaks HTB classful qdiscs on the loopback interface. > > It has been broken since kernel v4.2. The offending commit has > been identified by bissection of t

[iproute PATCH] tc: m_connmark: Fix help text

2016-01-06 Thread Phil Sutter
When specifying a conntrack zone, the 'zone' keyword has to be used before the actual zone index. Signed-off-by: Phil Sutter --- tc/m_connmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/m_connmark.c b/tc/m_connmark.c index 41ca4b25d4e90..6974c9ba6d16b 10

[iproute PATCH] iptunnel: Fix compile error in ip/tunnel.c

2015-12-21 Thread Phil Sutter
I repeatedly failed to get this right, so now I have to clean up my mess afterwards. Fixes: 7d6aadcd0a1dc ("ip{,6}tunnel: have a shared stats parser/printer") Signed-off-by: Phil Sutter --- ip/tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/tunnel.c b/i

Re: [iproute PATCH v2] ip{,6}tunnel: have a shared stats parser/printer

2015-12-21 Thread Phil Sutter
On Mon, Dec 21, 2015 at 12:00:06PM +0100, Daniel Borkmann wrote: > On 12/18/2015 11:58 AM, Phil Sutter wrote: > > This has a slight side-effect of not aborting when /proc/net/dev is > > malformed, but OTOH stats are not parsed for uninteresting interfaces. > > > >

Re: [PATCH][iproute2] tc/q_htb.c: Fix the MPU value output in 'tc -d class show dev ' command

2015-12-18 Thread Phil Sutter
On Fri, Dec 18, 2015 at 07:39:25PM +0300, Dmitrii Shcherbakov wrote: > > Dmitrii, did iproute2 without your change even print the overhead as set > > by you before? Looking at the code, I'd assume not. > > Tried building iproute2 (as of tag 4.2) and using the upstream linux kernel > (also tag 4.2

Re: [PATCH 1/2] [iproute2] tc/q_htb.c: remove printing of a deprecated overhead value previously encoded as a part of mpu field

2015-12-18 Thread Phil Sutter
e ratespec structure has been > introduced. > > Signed-off-by: Dmitrii Shcherbakov Acked-by: Phil Sutter -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/2] [iproute2] tc/q_htb.c: rename b4 buffer to b3 to make its name more consistent

2015-12-18 Thread Phil Sutter
On Fri, Dec 18, 2015 at 04:16:39PM +0300, Dmitrii Shcherbakov wrote: > b3 buffer has been deleted previously so b2 is followed by b4 which is not > consistent > > Signed-off-by: Dmitrii Shcherbakov Acked-by: Phil Sutter -- To unsubscribe from this list: send the line "unsub

[iproute PATCH v2] ip{,6}tunnel: have a shared stats parser/printer

2015-12-18 Thread Phil Sutter
This has a slight side-effect of not aborting when /proc/net/dev is malformed, but OTOH stats are not parsed for uninteresting interfaces. Signed-off-by: Phil Sutter --- Changes since v1: - Fix conflict resolution (sscan from 'buf' instead of 'ptr'). ---

Re: [iproute PATCH] ip{,6}tunnel: have a shared stats parser/printer

2015-12-18 Thread Phil Sutter
On Thu, Dec 17, 2015 at 05:14:21PM -0800, Stephen Hemminger wrote: > I just fixed the sscanf formats and after that this patch caused build error. > tunnel.c: In function ‘tnl_print_stats’: > tunnel.c:211:13: error: ‘ptr’ undeclared (first use in this function) > if (sscanf(ptr, "%lu%lu%lu%lu%lu%

Re: [PATCH][iproute2] tc/q_htb.c: Fix the MPU value output in 'tc -d class show dev ' command

2015-12-17 Thread Phil Sutter
On Thu, Dec 17, 2015 at 12:45:33PM +0300, Dmitrii Shcherbakov wrote: > >I don't think your patch should contain this cleanup of "b4". > > It seems that b3 is only used for the legacy overhead part and if I remove > it, b3 is not going to be used. So I figured I remove b4 put b3 instead. No worri

Re: [PATCH][iproute2] tc/q_htb.c: Fix the MPU value output in 'tc -d class show dev ' command

2015-12-16 Thread Phil Sutter
On Wed, Dec 16, 2015 at 04:15:58PM +0100, Jesper Dangaard Brouer wrote: > When trying to understand this code, keep in mind that we are trying > to keep backward compatible with older kernels. Thus, this printing > might be have been left here to keep compat with older kernels, but I > think we ca

Re: [PATCH iproute2] ip, route: fix minor compile warning

2015-12-14 Thread Phil Sutter
On Mon, Dec 14, 2015 at 04:34:29PM +0100, Daniel Borkmann wrote: > Seems like gcc (4.8.3) doesn't catch this false positive, triggering > after 0f7543322c5f ("route: ignore RTAX_HOPLIMIT of value -1"): > > iproute.c: In function 'print_route': > iproute.c:301:12: warning: 'val' may be used uni

[iproute PATCH] route: Fix printing of locked entries

2015-12-12 Thread Phil Sutter
Commit 0f7543322c5fd ("route: ignore RTAX_HOPLIMIT of value -1") accidentally reordered fprintf statements. This patch restores the original ordering. Fixes: 0f7543322c5fd ("route: ignore RTAX_HOPLIMIT of value -1") Signed-off-by: Phil Sutter --- ip/iproute.c | 5 +++-

[iproute PATCH] ip{,6}tunnel: have a shared stats parser/printer

2015-12-11 Thread Phil Sutter
This has a slight side-effect of not aborting when /proc/net/dev is malformed, but OTOH stats are not parsed for uninteresting interfaces. Signed-off-by: Phil Sutter --- ip/ip6tunnel.c | 21 ++--- ip/iptunnel.c | 21 ++--- ip/tunnel.c| 28

[iproute PATCH] tc.8: Fix reference to tc-tcindex.8

2015-12-10 Thread Phil Sutter
Just a typo there, it's spelled correctly in SEE ALSO section.. Signed-off-by: Phil Sutter --- man/man8/tc.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man8/tc.8 b/man/man8/tc.8 index 6275c4b32b167..4e99dcad5b1da 100644 --- a/man/man8/tc.8 +++ b/man/man8

Re: rhashtable: Use __vmalloc with GFP_ATOMIC for table allocation

2015-12-04 Thread Phil Sutter
On Fri, Dec 04, 2015 at 09:45:20AM -0800, Eric Dumazet wrote: > On Fri, 2015-12-04 at 18:01 +0100, Phil Sutter wrote: > > On Fri, Dec 04, 2015 at 10:39:56PM +0800, Herbert Xu wrote: > > > On Thu, Dec 03, 2015 at 08:08:39AM -0800, Eric Dumazet wrote: > > > > > >

Re: rhashtable: Use __vmalloc with GFP_ATOMIC for table allocation

2015-12-04 Thread Phil Sutter
On Fri, Dec 04, 2015 at 10:39:56PM +0800, Herbert Xu wrote: > On Thu, Dec 03, 2015 at 08:08:39AM -0800, Eric Dumazet wrote: > > > > Anyway, __vmalloc() can be used with GFP_ATOMIC, have you tried this ? > > OK I've tried it and I no longer get any ENOMEM errors! I can't confirm this, sadly. Using

Re: rhashtable: Prevent spurious EBUSY errors on insertion

2015-12-03 Thread Phil Sutter
l give up our resize/rehash and simply retry the > insertion with the new table. > > Reported-by: Thomas Graf > Reported-by: Phil Sutter > Signed-off-by: Herbert Xu Tested-by: Phil Sutter -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[iproute PATCH] route: ignore RTAX_HOPLIMIT of value -1

2015-12-02 Thread Phil Sutter
like default on newer kernels (which is to not print anything). Signed-off-by: Phil Sutter --- ip/iproute.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/ip/iproute.c b/ip/iproute.c index aed1038e515b6..c42ea0b9ecb8e 100644 --- a/ip/iproute.c +++ b/ip

[net-next PATCH] net: ipv6: restrict hop_limit sysctl setting to range [1;255]

2015-12-01 Thread Phil Sutter
r outgoing packets on eth0. To avoid these kinds of confusion, reject zero. Signed-off-by: Phil Sutter --- net/ipv6/addrconf.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index d84742f003a9f..a5de1a616c12a 100644 ---

Re: [iproute PATCH RFC] libnetlink: introduce DECLARE_NLREQ

2015-11-30 Thread Phil Sutter
On Sun, Nov 29, 2015 at 12:07:52PM -0800, Stephen Hemminger wrote: > On Thu, 26 Nov 2015 14:26:05 +0100 > Phil Sutter wrote: > > > This macro aims to simplify most netlink users' pattern to prepare a > > request, which is to create an unnamed struct and initia

Re: [PATCH v2 0/4] improve fault-tolerance of rhashtable runtime-test

2015-11-30 Thread Phil Sutter
On Mon, Nov 30, 2015 at 05:37:55PM +0800, Herbert Xu wrote: > Phil Sutter wrote: > > The following series aims to improve lib/test_rhashtable in different > > situations: > > > > Patch 1 allows the kernel to reschedule so the test does not block too > >

Re: [iproute PATCH RFC] libnetlink: introduce DECLARE_NLREQ

2015-11-29 Thread Phil Sutter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, Nov 29, 2015 at 12:07:52PM -0800, Stephen Hemminger wrote: > On Thu, 26 Nov 2015 14:26:05 +0100 > Phil Sutter wrote: > > > This macro aims to simplify most netlink users' pattern to prepare a > > request, which is t

[iproute PATCH 0/5] warning-annoyance induced code-review

2015-11-27 Thread Phil Sutter
at a few spots. Note that the last patch is my first Coccinelle-generated change, which makes me especially proud. Many thanks again to Julia Lawall for her kind support via IRC at this point! Phil Sutter (5): lnstat: review lnstat_update() ss: reduce max indentation level in

[iproute PATCH 2/5] ss: reduce max indentation level in init_service_resolver()

2015-11-27 Thread Phil Sutter
Exit early or continue on error instead of putting conditional into conditional to make reading the code a bit easier. Also, the call to memcpy() can be skipped by initialising prog with the desired prefix. Signed-off-by: Phil Sutter --- misc/ss.c | 53

[iproute PATCH 5/5] get rid of unnecessary fgets() buffer size limitation

2015-11-27 Thread Phil Sutter
) + fgets(buf, sizeof(buf), fp) Signed-off-by: Phil Sutter --- misc/arpd.c | 2 +- misc/ss.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/misc/arpd.c b/misc/arpd.c index 7919eb8b36bb7..6bb9bd16bc46c 100644 --- a/misc/arpd.c +++ b/misc/arpd.c @@ -703,7 +703,7

[iproute PATCH 3/5] ss: review is_ephemeral()

2015-11-27 Thread Phil Sutter
duplicating is_ephemeral() in run_ssfilter(), simply call the function instead. Signed-off-by: Phil Sutter --- misc/ss.c | 32 ++-- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 4988d34e18c78..7928573285e4e 100644 --- a/misc/ss.c

[iproute PATCH 1/5] lnstat: review lnstat_update()

2015-11-27 Thread Phil Sutter
Instead of calling rewind() and fgets() before every call to scan_lines(), move them into scan_lines() itself. This should also fix compat mode, as before the second call to scan_lines() the first line was skipped unconditionally. Signed-off-by: Phil Sutter --- misc/lnstat_util.c | 18

[iproute PATCH 4/5] get rid of remaining -Wunused-result warnings

2015-11-27 Thread Phil Sutter
Although not fundamentally necessary to check return codes in these spots, preventing the warnings will put new ones into focus. Signed-off-by: Phil Sutter --- misc/ifstat.c | 6 -- misc/lnstat_util.c | 3 ++- misc/nstat.c | 6 -- misc/ss.c | 18

Re: [iproute PATCH RFC] libnetlink: introduce DECLARE_NLREQ

2015-11-26 Thread Phil Sutter
On Thu, Nov 26, 2015 at 02:56:30PM +0100, Hannes Frederic Sowa wrote: > > +#define DECLARE_NLREQ(name, hdrname, payload, tailroom) > >\ > > + struct { \ > > + struct nlmsghdr hdrname;

[iproute PATCH RFC] libnetlink: introduce DECLARE_NLREQ

2015-11-26 Thread Phil Sutter
ment, the requested tailroom is really as big as requested no matter what size struct whatever really is. Signed-off-by: Phil Sutter --- This patch is RFC because I want to wait for peer review and upstream acceptance before sending in the big refactoring patch itself. --- include/libnetli

Re: [iproute PATCH v3 3/5] ipaddress: fix ipaddr_flush for Linux >= 3.1

2015-11-25 Thread Phil Sutter
Hi Sergei, On Wed, Nov 25, 2015 at 04:36:04PM +0300, Sergei Shtylyov wrote: > On 11/24/2015 5:31 PM, Phil Sutter wrote: > > > Linux version 3.1 introduced a consistency check for netlink dumps in > > commit 670dc28 ("netlink: advertise incomplete dumps"). This bites

[iproute PATCH v2] bridge.8: minor formatting cleanup

2015-11-24 Thread Phil Sutter
- Replace commas at end of subsection with dots. - Replace double whitespace by single one. Signed-off-by: Phil Sutter --- Changes since v1: - Resolved conflict with current master. - All whitespace at EOL already gone, adjusted commit message. --- man/man8/bridge.8 | 46

[iproute PATCH v2] iproute: restrict hoplimit values to be in range [0;255]

2015-11-24 Thread Phil Sutter
alue to be specified, but keep it anyway for backwards compatibility. Signed-off-by: Phil Sutter --- Changes since v1: - Allow hoplimit 0 for backwards compatibility. - Adjust commit message accordingly. --- ip/iproute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iproute.c b/ip

[iproute PATCH v3 4/5] ipaddress: drop unnecessary check in ipaddr_list_flush_or_save()

2015-11-24 Thread Phil Sutter
Right after ipaddr_reset_filter(), filter.family is always AF_UNSPEC. Signed-off-by: Phil Sutter --- ip/ipaddress.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 9811eb4..bc8359e 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c

[iproute PATCH v3 1/5] ipaddress: simplify ipaddr_flush()

2015-11-24 Thread Phil Sutter
Since it's no longer relevant whether an IP address is primary or secondary when flushing, ipaddr_flush() can be simplified a bit. Signed-off-by: Phil Sutter --- ip/ipaddress.c | 38 +- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git

[iproute PATCH v3 0/5] flush many addresses and some cleanups

2015-11-24 Thread Phil Sutter
ded by e149d4e ("iproute2: Ignore EADDRNOTAVAIL errors during address flush operation"). - Adjust cover letter text accordingly. Phil Sutter (5): ipaddress: simplify ipaddr_flush() libnetlink: introduce nc_flags ipaddress: fix ipaddr_flush for Linux >= 3.1 ipaddress: dro

[iproute PATCH v3 3/5] ipaddress: fix ipaddr_flush for Linux >= 3.1

2015-11-24 Thread Phil Sutter
pted and may be inconsistent.", advise rtnl_dump_filter_l() to not care about NLM_F_DUMP_INTR. Signed-off-by: Phil Sutter --- ip/ipaddress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 26e91c9..9811eb4 100644 --- a/ip/ipaddress.c

[iproute PATCH v3 5/5] iptoken: simplify iptoken_list a bit

2015-11-24 Thread Phil Sutter
Since it uses only a single filter, rtnl_dump_filter() can be used. Signed-off-by: Phil Sutter --- ip/iptoken.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ip/iptoken.c b/ip/iptoken.c index a38194c..428f133 100644 --- a/ip/iptoken.c +++ b/ip/iptoken.c @@ -95,10

[iproute PATCH v3 2/5] libnetlink: introduce nc_flags

2015-11-24 Thread Phil Sutter
Allow for a filter to ignore certain nlmsg_flags. Signed-off-by: Phil Sutter --- include/libnetlink.h | 7 ++- lib/libnetlink.c | 10 ++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/include/libnetlink.h b/include/libnetlink.h index 2280c39..431189e 100644

Re: [iproute PATCH] iproute: fix filter_nlmsg

2015-11-24 Thread Phil Sutter
On Mon, Nov 23, 2015 at 04:20:24PM -0800, Stephen Hemminger wrote: > On Wed, 4 Nov 2015 16:54:24 +0100 > Phil Sutter wrote: > > > On Tue, Nov 03, 2015 at 04:33:59PM -0800, Stephen Hemminger wrote: > > > On Thu, 29 Oct 2015 12:15:47 +0100 > > > Phil Sutter wr

Re: [RFC PATCH 2/2] Crypto kernel tls socket

2015-11-24 Thread Phil Sutter
Hi, On Tue, Nov 24, 2015 at 12:20:00PM +0100, Hannes Frederic Sowa wrote: > Stephan Mueller writes: > > > Am Dienstag, 24. November 2015, 18:34:55 schrieb Herbert Xu: > > > > Hi Herbert, > > > >>On Mon, Nov 23, 2015 at 09:43:02AM -0800, Dave Watson wrote: > >>> Userspace crypto interface for TLS

Re: [PATCH iproute2] ip-address: properly display zero IPv4 peer address

2015-11-24 Thread Phil Sutter
On Mon, Nov 23, 2015 at 04:04:50PM -0800, Stephen Hemminger wrote: > On Thu, 22 Oct 2015 10:34:28 +0200 > Thomas Haller wrote: > > > Kernel allows for zero IPv4 peer addresses (IFA_ADDRESS): > > > >ip address add 192.168.5.1 peer 0.0.0.0/24 dev dummy > > > > which is distinct from a usual a

Re: [PATCH v2 4/4] rhashtable-test: allow to retry even if -ENOMEM was returned

2015-11-20 Thread Phil Sutter
On Fri, Nov 20, 2015 at 06:17:20PM +0100, Phil Sutter wrote: > This is rather a hack to expose the current issue with rhashtable to > under high pressure sometimes return -ENOMEM even though system memory > is not exhausted and a consecutive insert may succeed. Please note that this pro

[PATCH v2 4/4] rhashtable-test: allow to retry even if -ENOMEM was returned

2015-11-20 Thread Phil Sutter
This is rather a hack to expose the current issue with rhashtable to under high pressure sometimes return -ENOMEM even though system memory is not exhausted and a consecutive insert may succeed. Signed-off-by: Phil Sutter --- lib/test_rhashtable.c | 14 +- 1 file changed, 13

[PATCH v2 1/4] rhashtable-test: add cond_resched() to thread test

2015-11-20 Thread Phil Sutter
This should fix for soft lockup bugs triggered on slow systems. Signed-off-by: Phil Sutter --- lib/test_rhashtable.c | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/test_rhashtable.c b/lib/test_rhashtable.c index 8c1ad1c..63654e3 100644 --- a/lib/test_rhashtable.c +++ b/lib

[PATCH v2 3/4] rhashtable-test: calculate max_entries value by default

2015-11-20 Thread Phil Sutter
exact number of objects upon table init won't suffice as that value is being rounded down to the next power of two - anticipate this by rounding up to the next power of two in beforehand. Signed-off-by: Phil Sutter --- lib/test_rhashtable.c | 8 +--- 1 file changed, 5 insertions(

[PATCH v2 2/4] rhashtable-test: retry insert operations

2015-11-20 Thread Phil Sutter
non-threaded test to retry insert operations, too. Suggested-by: Thomas Graf Signed-off-by: Phil Sutter --- lib/test_rhashtable.c | 53 --- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/lib/test_rhashtable.c b/lib/test_rhashtable.c

[PATCH v2 0/4] improve fault-tolerance of rhashtable runtime-test

2015-11-20 Thread Phil Sutter
at it contains. - Add patch 4 as a debugging aid. Phil Sutter (4): rhashtable-test: add cond_resched() to thread test rhashtable-test: retry insert operations rhashtable-test: calculate max_entries value by default rhashtable-test: allow to retry even if -ENOMEM was returned lib/test_rhashta

Re: rhashtable: how to deal with that rhashtable_lookup_insert_key return -EBUSY

2015-11-20 Thread Phil Sutter
On Fri, Nov 20, 2015 at 01:14:18PM +0800, Xin Long wrote: > when I use rhashtable_lookup_insert_key, sometimes it will return -EBUSY. > im not sure if there is a good way to workabout it. > or I should just try again and again until it's inserted successfully ? > > I have seen some use in kernel

[iproute PATCH 0/2] lnstat: review --subject option

2015-11-18 Thread Phil Sutter
Add missing description in help output, fix algorithm. Phil Sutter (2): lnstat: describe -s option in help output lnstat: fix header displaying mechanism misc/lnstat.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) -- 2.5.0 -- To unsubscribe from this list: send the

[iproute PATCH 2/2] lnstat: fix header displaying mechanism

2015-11-18 Thread Phil Sutter
3 ("lnstat: run indefinitely by default") Signed-off-by: Phil Sutter --- misc/lnstat.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/misc/lnstat.c b/misc/lnstat.c index 529bc33..264c953 100644 --- a/misc/lnstat.c +++ b/misc/lnstat.c @@ -359,21 +359,19 @@ int m

[iproute PATCH 1/2] lnstat: describe -s option in help output

2015-11-18 Thread Phil Sutter
Signed-off-by: Phil Sutter --- misc/lnstat.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/lnstat.c b/misc/lnstat.c index 1e547d0..529bc33 100644 --- a/misc/lnstat.c +++ b/misc/lnstat.c @@ -73,7 +73,10 @@ static int usage(char *name, int exit_code) fprintf

[iproute PATCH 0/2] minor update to bridge.8

2015-11-18 Thread Phil Sutter
er 2012, bridge.8 was adjusted accordingly (commit d611682). - In July 2013 though, 'fdb replace' was added again (commit 45a82e5). The latter maybe should have been a revert, as it misses to add 'fdb change' as well. Anyway, this series fixes bridge.8 again and additionally reviews f

[iproute PATCH 2/2] bridge.8: minor formatting cleanup

2015-11-18 Thread Phil Sutter
- Replace commas at end of subsection with dots. - Remove whitespace at EOL. - Replace double whitespace by single one. Signed-off-by: Phil Sutter --- man/man8/bridge.8 | 50 +- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/man

[iproute PATCH 1/2] bridge.8: document fdb replace command

2015-11-18 Thread Phil Sutter
Despite commit 45a82e5 ("iproute vxlan add support for fdb replace command"), the 'fdb replace' command was not mentioned in bridge.8. Signed-off-by: Phil Sutter --- man/man8/bridge.8 | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/man/man8/bridge

Re: [iproute PATCH 05/12] ip{,6}tunnel: align do_tunnels_list() a bit

2015-11-13 Thread Phil Sutter
On Fri, Nov 13, 2015 at 05:30:10PM +, David Laight wrote: > From: Phil Sutter > > Sent: 13 November 2015 17:09 > > In iptunnel, declare loop variables inside the loop as done in > > ip6tunnel. > ... > > @@ -396,14 +396,8 @@ static void print_tunnel(struct ip_tu

[iproute PATCH 06/12] ip6tunnel: print local/remote addresses like iptunnel does

2015-11-13 Thread Phil Sutter
This makes output consistent with iptunnel, also supporting reverse DNS lookup for remote address if requested. Signed-off-by: Phil Sutter --- ip/ip6tunnel.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c index ba92518

[iproute PATCH 09/12] iptunnel: simplify parsing TTL, allow 'hlim' as identifier

2015-11-13 Thread Phil Sutter
Instead of parsing an unsigned integer and checking boundaries, simply parse u8. This and the added ttl alias 'hlim' provide consistency with ip6tunnel. Signed-off-by: Phil Sutter --- ip/iptunnel.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ip/iptun

[iproute PATCH 05/12] ip{,6}tunnel: align do_tunnels_list() a bit

2015-11-13 Thread Phil Sutter
in iptunnel, as well. Signed-off-by: Phil Sutter --- ip/ip6tunnel.c | 8 +++- ip/iptunnel.c | 25 + 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c index 410276f..ba92518 100644 --- a/ip/ip6tunnel.c +++ b/ip

[iproute PATCH 10/12] iptunnel: share common code when determining the default interface name

2015-11-13 Thread Phil Sutter
Signed-off-by: Phil Sutter --- ip/iptunnel.c | 70 +-- 1 file changed, 25 insertions(+), 45 deletions(-) diff --git a/ip/iptunnel.c b/ip/iptunnel.c index 8c05f6f..3b46a15 100644 --- a/ip/iptunnel.c +++ b/ip/iptunnel.c @@ -239,10 +239,26

[iproute PATCH 01/12] ip{,6}tunnel: get rid of extraneous whitespace when printing

2015-11-13 Thread Phil Sutter
Put whitespace in the beginning of optional parts, not as suffix anywhere. Also drop double whitespaces in between words. Signed-off-by: Phil Sutter --- ip/ip6tunnel.c | 4 ++-- ip/iptunnel.c | 16 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ip

[iproute PATCH 11/12] iptunnel: sanitize copying tunnel name

2015-11-13 Thread Phil Sutter
Since p->name is only IFNAMSIZ bytes, do not copy more than IFNAMSIZ - 1 bytes into it so there remains at least a single null byte in the end. Signed-off-by: Phil Sutter --- ip/iptunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iptunnel.c b/ip/iptunnel.c in

[iproute PATCH 04/12] iptunnel: use ll_name_to_index() for physical interface lookup

2015-11-13 Thread Phil Sutter
Although the cache is only initialized in do_show(), this way it is at least consistent with ip6tunnel. Signed-off-by: Phil Sutter --- ip/iptunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iptunnel.c b/ip/iptunnel.c index 803bb83..a547852 100644 --- a/ip

[iproute PATCH 02/12] ip/tunnel: introduce tnl_parse_key()

2015-11-13 Thread Phil Sutter
e for ip6tunnel, but the code was there before so this patch at least doesn't make it worse. Signed-off-by: Phil Sutter --- ip/ip6tunnel.c | 33 +++-- ip/iptunnel.c | 33 +++-- ip/tunnel.c| 15 +++ ip/tunnel.h| 1 + 4 fil

[iproute PATCH 12/12] ip{,6}tunnel: put spaces around non-unary operators

2015-11-13 Thread Phil Sutter
Signed-off-by: Phil Sutter --- ip/ip6tunnel.c | 16 ip/iptunnel.c | 40 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c index d8957f0..320d253 100644 --- a/ip/ip6tunnel.c +++ b/ip

[iproute PATCH 07/12] ip6tunnel: fix coding style: no newline between brace and else

2015-11-13 Thread Phil Sutter
Signed-off-by: Phil Sutter --- ip/ip6tunnel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c index 9eb5b2f..d8957f0 100644 --- a/ip/ip6tunnel.c +++ b/ip/ip6tunnel.c @@ -262,8 +262,7 @@ static int parse_args(int argc, char **argv, int cmd

[iproute PATCH 03/12] ip{,6}tunnel: unify behaviour if physical device is not found

2015-11-13 Thread Phil Sutter
Make ip6tunnel print an error message as well. While there, get rid of unnecessary line breaking. Signed-off-by: Phil Sutter --- ip/ip6tunnel.c | 4 +++- ip/iptunnel.c | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c index 8b842b6..410276f

[iproute PATCH 00/12] smaller iptunnel and ip6tunnel review

2015-11-13 Thread Phil Sutter
oduce too many bugs. Phil Sutter (12): ip{,6}tunnel: get rid of extraneous whitespace when printing ip/tunnel: introduce tnl_parse_key() ip{,6}tunnel: unify behaviour if physical device is not found iptunnel: use ll_name_to_index() for physical interface lookup ip{,6}tunnel:

[iproute PATCH 08/12] iptunnel: share common code when setting tunnel mode

2015-11-13 Thread Phil Sutter
Signed-off-by: Phil Sutter --- ip/iptunnel.c | 39 ++- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/ip/iptunnel.c b/ip/iptunnel.c index e323c1f..92edb34 100644 --- a/ip/iptunnel.c +++ b/ip/iptunnel.c @@ -47,6 +47,15 @@ static void usage(void

Re: [PATCH iproute2] ip-address: properly display zero IPv4 peer address

2015-11-11 Thread Phil Sutter
a->ifa_address)) || > > Signed-off-by: Thomas Haller Acked-by: Phil Sutter I wonder why this is not the case for IPv6. What is the functional effect of setting a zero peer with non-zero netmask? Cheers, Phil -- To unsubscribe from this list: send the line "unsubscribe netdev" in t

[iproute PATCH] iproute: restrict hoplimit values to be in range [1;255]

2015-11-10 Thread Phil Sutter
specified. Signed-off-by: Phil Sutter --- ip/iproute.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ip/iproute.c b/ip/iproute.c index c0ef7bf..e0c8e4c 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -931,7 +931,8 @@ static int iproute_modify(int cmd, unsigned flags, int argc, c

Re: [iproute PATCH v2 4/6] ipaddress: fix ipaddr_flush for Linux >= 3.1

2015-11-10 Thread Phil Sutter
On Mon, Nov 09, 2015 at 09:58:50PM +0300, Sergei Shtylyov wrote: > On 11/09/2015 09:51 PM, Sergei Shtylyov wrote: > > >> Linux version 3.1 introduced a consistency check for netlink dumps in > >> commit 670dc28 ("netlink: advertise incomplete dumps"). This bites > > > > The scripts/checkpatch.

<    4   5   6   7   8   9   10   11   >