[iproute PATCH 1/2] man: ip-neighbour.8: Document all known nud states

2016-03-04 Thread Phil Sutter
Not sure how useful they are in practice, but as 'ip neigh' supports setting them all, they deserve to be described as well. While at it, also add a missing layer of indentation to the subordinate nud state list. Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/ip-neighbour.

[iproute PATCH 2/2] ipneigh: List all nud states in help output

2016-03-04 Thread Phil Sutter
To not make the output overly confusing, list them in a definition of the STATE placeholder which is already used in the show/flush syntax but wasn't explained before. Signed-off-by: Phil Sutter <p...@nwl.cc> --- ip/ipneigh.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-)

[iproute PATCH 0/2] ip-neighbour: Add missing nud state descriptions

2016-03-04 Thread Phil Sutter
The following aims at documenting all nud states 'ip neigh' supports, not just the most common ones. This includes describing them in the relevant man page as well as extending 'ip neigh help' output. Phil Sutter (2): man: ip-neighbour.8: Document all known nud states ipneigh: List all nud

[iproute PATCH] libnetlink: Double the dump buffer size

2016-03-04 Thread Phil Sutter
ust double the buffer size to 32k. Feels like this opportunistic buffer size selection is rather workarounding a design flaw in libnetlink or maybe even the netlink protocol itself. Signed-off-by: Phil Sutter <p...@nwl.cc> --- lib/libnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 d

[iproute PATCH 08/12] man: Add a man page for the skbedit action

2016-03-04 Thread Phil Sutter
Cc: Alexander Duyck <alexander.du...@gmail.com> Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/tc-skbedit.8 | 45 + 1 file changed, 45 insertions(+) create mode 100644 man/man8/tc-skbedit.8 diff --git a/man/man8/tc-skbedit.8 b

[iproute PATCH 12/12] doc: Add my article about tc, filters and actions

2016-03-04 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- .gitignore | 1 + doc/Makefile | 2 +- doc/tc-filters.tex | 529 + 3 files changed, 531 insertions(+), 1 deletion(-) create mode 100644 doc/tc-filters.tex diff --git a/.gitig

[iproute PATCH 01/12] man: Add a man page for the connmark action

2016-03-04 Thread Phil Sutter
Cc: Felix Fietkau <n...@openwrt.org> Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/tc-connmark.8 | 55 ++ 1 file changed, 55 insertions(+) create mode 100644 man/man8/tc-connmark.8 diff --git a/man/man8/tc-connmark.8 b/man/man8

[iproute PATCH 05/12] man: Add a man page for the pedit action

2016-03-04 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/tc-pedit.8 | 230 1 file changed, 230 insertions(+) create mode 100644 man/man8/tc-pedit.8 diff --git a/man/man8/tc-pedit.8 b/man/man8/tc-pedit.8 new file mode 100644 index 000

[iproute PATCH 07/12] man: Add a man page for the simple action

2016-03-04 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/tc-simple.8 | 76 1 file changed, 76 insertions(+) create mode 100644 man/man8/tc-simple.8 diff --git a/man/man8/tc-simple.8 b/man/man8/tc-simple.8 new file mode 100644 index 000

[iproute PATCH 11/12] man: ship action man pages

2016-03-04 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/man/man8/Makefile b/man/man8/Makefile index 2f77640676df5..d3fdf66ab11d4 100644 --- a/man/man8/Makefile +++ b/man/man8/Makefile @@ -14,7 +14,9 @@ MAN

[iproute PATCH 00/12] Add tc action man pages

2016-03-04 Thread Phil Sutter
The following series adds a set of man pages for previously undocumented tc actions. On top of that, it adds an article about the same topic to the docs directory I wrote a little while ago. Phil Sutter (12): man: Add a man page for the connmark action man: Add a man page for the csum action

[iproute PATCH 06/12] man: Add a man page for the police action

2016-03-04 Thread Phil Sutter
Cc: Alexey Kuznetsov <kuz...@ms2.inr.ac.ru> Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/tc-police.8 | 127 +++ 1 file changed, 127 insertions(+) create mode 100644 man/man8/tc-police.8 diff --git a/man/man8/tc-police.8 b

[iproute PATCH 04/12] man: Add a man page for the nat action

2016-03-04 Thread Phil Sutter
Cc: Herbert Xu <herb...@gondor.apana.org.au> Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/tc-nat.8 | 78 +++ 1 file changed, 78 insertions(+) create mode 100644 man/man8/tc-nat.8 diff --git a/man/man8/tc-nat.8 b/man/man8/

[iproute PATCH 03/12] man: Add a man page for the mirred action

2016-03-04 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/tc-mirred.8 | 89 1 file changed, 89 insertions(+) create mode 100644 man/man8/tc-mirred.8 diff --git a/man/man8/tc-mirred.8 b/man/man8/tc-mirred.8 new file mode 100644 index 000

[iproute PATCH 09/12] man: Add a man page for the vlan action

2016-03-04 Thread Phil Sutter
Cc: Jiri Pirko <j...@resnulli.us> Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/tc-vlan.8 | 54 ++ 1 file changed, 54 insertions(+) create mode 100644 man/man8/tc-vlan.8 diff --git a/man/man8/tc-vlan.8 b/man/man8/tc-vla

[iproute PATCH 02/12] man: Add a man page for the csum action.

2016-03-04 Thread Phil Sutter
Cc: Gregoire Baron <baronc...@n7mm.org> Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/tc-csum.8 | 54 ++ 1 file changed, 54 insertions(+) create mode 100644 man/man8/tc-csum.8 diff --git a/man/man8/tc-csum.8 b/man/man8/t

[iproute PATCH 10/12] man: Add a man page for the xt action

2016-03-04 Thread Phil Sutter
Cc: Jiri Pirko <j...@resnulli.us> Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/tc-xt.8 | 42 ++ 1 file changed, 42 insertions(+) create mode 100644 man/man8/tc-xt.8 diff --git a/man/man8/tc-xt.8 b/man/man8/tc-xt.8 new file mode

[iproute PATCH 0/5] Misc minor documentation fixes

2016-03-04 Thread Phil Sutter
The following five patches contain minor changes to documentation at various places. They are all unrelated, but being lazy as I am, I submit them in one go. Phil Sutter (5): tc: pedit: document branch control in help output man: ip-link: Beef up VXLAN csum options a bit man: tc-u32: Minor

[iproute PATCH 1/5] tc: pedit: document branch control in help output

2016-03-04 Thread Phil Sutter
This seems to have been a hidden feature, though it's very useful and necessary at least when combining multiple pedit actions. Signed-off-by: Phil Sutter <p...@nwl.cc> --- tc/m_pedit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tc/m_pedit.c b/tc/m_pedit.c

[iproute PATCH 5/5] doc, man: ip-rule: Remove incorrect statement about rule 0

2016-03-04 Thread Phil Sutter
The documentation is wrong here: it is indeed possible to remove policy rule 0 and recreate it afterwards. Therefore remove these statements. Signed-off-by: Phil Sutter <p...@nwl.cc> --- doc/ip-cref.tex| 3 --- man/man8/ip-rule.8 | 2 -- 2 files changed, 5 deletions(-) diff --git a/

[iproute PATCH 4/5] man: ip-route: Make synopsis consistent with description

2016-03-04 Thread Phil Sutter
While the synopsis section contains 'ip route list', it is later described as 'ip route show'. Make this consistent by replacing 'list' with 'show' in synopsis. Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/ip-route.8.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[iproute PATCH 3/5] man: tc-u32: Minor syntax fix

2016-03-04 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/tc-u32.8 | 1 + 1 file changed, 1 insertion(+) diff --git a/man/man8/tc-u32.8 b/man/man8/tc-u32.8 index 47c8f2d092ee8..691f53c135cfe 100644 --- a/man/man8/tc-u32.8 +++ b/man/man8/tc-u32.8 @@ -370,6 +370,7 @@ then allows to match v

[iproute PATCH 2/5] man: ip-link: Beef up VXLAN csum options a bit

2016-03-04 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/ip-link.8.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in index c6a9c862dfda2..2cd93b0ff718e 100644 --- a/man/man8/ip-link.8.in +++ b/man/man8/ip-link.8.in @@ -

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

2016-03-03 Thread Phil Sutter
On Thu, Mar 03, 2016 at 09:21:55AM -0500, Jamal Hadi Salim wrote: > On 16-03-02 01:19 PM, Phil Sutter wrote: > > + fprintf(stderr, " unreachable | prohibit | blackhole | nat > > }\n"); > > Dont think nat exists anymore... But iproute2 seems to still s

Re: [iproute PATCH 3/3] tc: pedit: Fix retain value for ihl adjustments

2016-03-03 Thread Phil Sutter
On Thu, Mar 03, 2016 at 09:28:27AM -0500, Jamal Hadi Salim wrote: > Phil, there is one thing i noticed in your patch - dont think > it is a big deal but you are doing htons on an int > (instead of u16). Indeed, I totally overlooked that. Does not look like there's an easy fix though, as all

Re: [iproute PATCH 3/3] tc: pedit: Fix retain value for ihl adjustments

2016-03-03 Thread Phil Sutter
Hi, On Thu, Mar 03, 2016 at 09:21:23AM -0500, Jamal Hadi Salim wrote: > On 16-03-02 12:54 PM, Stephen Hemminger wrote: > > On Wed, 2 Mar 2016 11:20:31 + > > Phil Sutter <p...@nwl.cc> wrote: > > > >> + res = parse_cmd(, , 1, TU32,0x0f,sel,tkey); &

[net PATCH] net: sched: fix act_ipt for LOG target

2016-03-03 Thread Phil Sutter
From: Phil Sutter <p...@nwl.cc> Before calling the destroy() or target() callbacks, the family parameter field has to be initialized. Otherwise at least the LOG target will refuse to work and upon removal oops the kernel. Cc: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Ph

Re: [iproute PATCH v2 0/4] tc: pedit fixes

2016-03-02 Thread Phil Sutter
On Wed, Mar 02, 2016 at 11:05:33AM -0800, Stephen Hemminger wrote: > On Wed, 2 Mar 2016 19:45:39 +0100 > Phil Sutter <p...@nwl.cc> wrote: > > > While implementing an implementation example for a pedit man page, I > > noticed several issues with the current code. The

[iproute PATCH v2 4/4] tc/p_ip.c: Lint through checkpatch.pl

2016-03-02 Thread Phil Sutter
This diff was generated by using the fix-inplace option of checkpatch.pl and breaking the overlong lines of parse_ip() and parse_ip6() signatures. Signed-off-by: Phil Sutter <p...@nwl.cc> --- tc/p_ip.c | 36 +++- 1 file changed, 19 insertions(+), 17 del

[iproute PATCH v2 3/4] tc: pedit: Fix retain value for ihl adjustments

2016-03-02 Thread Phil Sutter
Since the IP Header Length field is just half a byte, adjust retain to only match these bits so the Version field is not overwritten by accident. The whole concept is actually broken due to dependency on endianness which pedit ignores. Signed-off-by: Phil Sutter <p...@nwl.cc> --- tc/p_ip

[iproute PATCH v2 0/4] tc: pedit fixes

2016-03-02 Thread Phil Sutter
8<--------- Changes since v1: - rebased onto current master - added required whitespace after comma in patch 3 - new patch 4 fixing remaining checkpatch.pl issues in tc/p_ip.c Phil Sutter (4): tc: pedit: Fix laye

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

2016-03-02 Thread Phil Sutter
key*() variants. Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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 +152,6 @@ pack_ke

[iproute PATCH v2 1/4] 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 <p...@nwl.cc> --- tc/m_p

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

2016-03-02 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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 \

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

2016-03-02 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 at once. Signed-off-by: Phil

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

2016-03-02 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 <p...@nwl.cc> --- man/man8/ip-link.8.in | 100 +++--- 1 file c

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

2016-03-02 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 <p...@nwl.cc> --- man/man8/ip-netns.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/man8/ip-netns.8 b/man/m

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

2016-03-02 Thread Phil Sutter
And while we're at it, add whitespace around braces and pipe symbol. Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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 ++

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

2016-03-02 Thread Phil Sutter
Namely, 'extra-flag' of 'ip xfrm state' and 'flag' of 'ip xfrm policy'. Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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..11f710470377f 100644 ---

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

2016-03-02 Thread Phil Sutter
'. Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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 --- a/man/man8/ip-address.8.in +++ b/man/man8/ip-add

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

2016-03-02 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 <p...@nwl.cc> --- ip/ipaddrlabel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ip/ipaddrlabel.c b/ip/ipaddrlabel.c

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

2016-03-02 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 <p...@nwl.cc> -

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

2016-03-02 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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 usag

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

2016-03-02 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 <p...@nwl.cc> --- man/man8/ip-token.8 | 12 ++-- 1 file changed, 6 insertions

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

2016-03-02 Thread Phil Sutter
Get rid of extraneous closing brackets and while here, merge the double netns parameter. Signed-off-by: Phil Sutter <p...@nwl.cc> --- ip/iplink.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ip/iplink.c b/ip/iplink.c index 69f50572633b1..33d7c0ad0e827

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

2016-03-02 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 <p...@nwl.cc> --- man/man8/ip-l2tp.8 | 24 +--- 1 file changed, 9 insertions(

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

2016-03-02 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- ip/iprule.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ip/iprule.c b/ip/iprule.c index 33b71976e7b5c..7e3b38b64c6e1 100644 --- a/ip/iprule.c +++ b/ip/iprule.c @@ -39,6 +39,7 @@ static void usage(void) fprintf(stderr, &qu

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

2016-03-02 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 'realms' parameters. Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/ip-rule.

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

2016-03-02 Thread Phil Sutter
Also drop the non-terminal 'TIME' description as it is not referenced anywhere. Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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 8b746cb

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

2016-03-02 Thread Phil Sutter
to added 'trust' option Phil Sutter (20): ip: align help text with manpage ipaddrlabel: Improve help text precision iplink: fix help text syntax ipneigh: add missing proxy keyword to help text ipntable: Fix typo in help text iproute: TYPE keyword is not optional, fix help text

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

2016-03-02 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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/m

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

2016-03-02 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 <p...@nwl.cc> --- man/man8/ip-addrlabel.

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

2016-03-02 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 <p...@nwl.cc> --- ip/ip.c | 2 +- 1 file changed, 1 insertion(+), 1 de

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

2016-03-02 Thread Phil Sutter
We commonly use bold font for terminals and italic for non-terminals. Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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 221831e52bc9a..2376f1653a8f2

[iproute PATCH] ifstat, nstat: fix daemon mode

2016-03-02 Thread Phil Sutter
then. * With the last change to the algorithm in place, it does not make sense to call update_db() before returning data to the connected client. Actually, it never does otherwise we could skip the periodic updates in the first place. Signed-off-by: Phil Sutter <p...@nwl.cc> --- misc/if

[iproute PATCH 0/3] tc: pedit fixes

2016-03-02 Thread Phil Sutter
c ip src preserve prove 0x3fff 0x3fff 12 prove 0x12340030 0x12340030 12 prove 0xee6af1ff 0xee6af1ff 12 prove 0x 0x 12 run_tc ip src invert prove 0x3fff 0xc000 12 prove 0x12340030 0xedcbffcf 12 prove 0xee6af1ff 0x11950e00 12 prove 0x 0x 12 -

[iproute PATCH 3/3] tc: pedit: Fix retain value for ihl adjustments

2016-03-02 Thread Phil Sutter
Since the IP Header Length field is just half a byte, adjust retain to only match these bits so the Version field is not overwritten by accident. The whole concept is actually broken due to dependency on endianness which pedit ignores. Signed-off-by: Phil Sutter <p...@nwl.cc> --- tc/p_ip

[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 <p...@nwl.cc> --- tc/m_p

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

2016-03-02 Thread Phil Sutter
key*() variants. Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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 +152,6 @@ pack_ke

[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 <p...@nwl.cc> --- ip/iprule.c | 5 +++--

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

2016-02-24 Thread Phil Sutter
'. Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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 --- a/man/man8/ip-address.8.in +++ b/man/man8/ip-add

[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 <p...@nwl.cc> --- man/man8/ip-netns.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/man8/ip-netns.8 b/man/m

[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 <p...@nwl.cc> --- ip/ip.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[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 <p...@nwl.cc> --- man/man8/ip-token.8 | 12 ++-- 1 file changed, 6 insertions

[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 <p...@nwl.cc> --- man/man8/ip-l2tp.8 | 24 +--- 1 file changed, 9 insertions(

[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 <p...@nwl.cc> --- 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

[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 <p...@nwl.cc> --- 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 ++

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

2016-02-24 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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 usag

[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 <p...@nwl.cc> --- 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 <p...@nwl.cc> --- man/man8/ip-link.8.in | 97 --- 1 file c

[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 at once. Signed-off-by: Phil

[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 'realms' parameters. Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/ip-rule.

[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 <p...@nwl.cc> --- 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 8b746cb

[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 <p...@nwl.cc> --- man/man8/ip-addrlabel.

[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 <p...@nwl.cc> --- 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..11f710470377f 100644 ---

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

2016-02-24 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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, &qu

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

2016-02-24 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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/m

[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 <p...@nwl.cc> -

[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 <p...@nwl.cc> --- 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 \

[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 <p...@nwl.cc> --- ip/iplink.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ip/iplink.c b/ip/iplink.c index 5ab9d613c4f99..5a220276f1f96

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

2016-02-24 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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

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

2016-02-17 Thread Phil Sutter
dling of tx_queue_len == 0") Tested-by: Mathieu Desnoyers <mathieu.desnoy...@efficios.com> Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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..75383f40

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 348e343

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

[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 <p...@nwl.cc> --- 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..6974c9b

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

[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 <p...@nwl.cc> --- ip/tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

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,

[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 <p...@nwl.cc> --- Changes since v1: - Fix conflict resolution (sscan from 'buf' instead of 'ptr'). --- ip/ip6tunnel.

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
cture has been > introduced. > > Signed-off-by: Dmitrii Shcherbakov <fw.dmit...@yandex.com> Acked-by: Phil Sutter <p...@nwl.cc> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo i

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 <fw.dmit...@yandex.com> Acked-by: Phil Sutter <p...@nwl.cc> -- To un

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

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

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

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

[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 <p...@nwl.cc> --- ip/i

[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 <p...@nwl.cc> --- ip/ip6tunnel.c | 21 ++--- ip/iptunnel.c | 21 ++--- ip/tunnel.c

[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 <p...@nwl.cc> --- 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 +++

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.

<    3   4   5   6   7   8   9   10   11   >