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: Prevent spurious EBUSY errors on insertion

2015-12-03 Thread Phil Sutter
resize/rehash and simply retry the > insertion with the new table. > > Reported-by: Thomas Graf <tg...@suug.ch> > Reported-by: Phil Sutter <p...@nwl.cc> > Signed-off-by: Herbert Xu <herb...@gondor.apana.org.au> Tested-by: Phil Sutter <p...@nwl.cc> -- To unsubscribe f

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

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

2015-12-01 Thread Phil Sutter
packets on eth0. To avoid these kinds of confusion, reject zero. Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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

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

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 <p...@nwl.cc> wrote: > > > This macro aims to simplify most netlink users' pattern to prepare a > > request, which is to create an un

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 <p...@nwl.cc> wrote: > > > This macro aims to simplify most netlink users' pattern to prepare a > >

[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

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

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

[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 <p...@nwl.cc> --- misc/ss.c | 32 ++-- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 4988d34e18c78..7928573285e4e

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

[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 <p...@nwl.cc> --- misc/ifstat.c | 6 -- misc/lnstat_util.c | 3 ++- misc/nstat.c | 6 -- misc/ss.c

[iproute PATCH RFC] libnetlink: introduce DECLARE_NLREQ

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

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;

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

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

2015-11-24 Thread Phil Sutter
to be specified, but keep it anyway for backwards compatibility. Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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/iprou

[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 <p...@nwl.cc> --- Changes since v1: - Resolved conflict with current master. - All whitespace at EOL already gone, adjusted commit message. --- man/man8/bridge.

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

[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 <p...@nwl.cc> --- ip/ipaddress.c | 38 +- 1 file changed, 1 insertion(+), 37 deletions(-) diff

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

2015-11-24 Thread Phil Sutter
oute2: 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: drop unnecessary check in ip

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

2015-11-24 Thread Phil Sutter
rrupted and may be inconsistent.", advise rtnl_dump_filter_l() to not care about NLM_F_DUMP_INTR. Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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 ---

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

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

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 <p...@nwl.cc> wrote: > > > On Tue, Nov 03, 2015 at 04:33:59PM -0800, Stephen Hemminger wrote: > > > On Thu, 29 Oct 2015 12:15:47 +0100 > &g

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

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

[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 <p...@nwl.cc> --- lib/test_rhashtable.c | 14 +-

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 3/4] rhashtable-test: calculate max_entries value by default

2015-11-20 Thread Phil Sutter
the 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 <p...@nwl.cc> --- lib/test_rhashtable.c | 8 +--- 1 file changed, 5 inse

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

2015-11-20 Thread Phil Sutter
the non-threaded test to retry insert operations, too. Suggested-by: Thomas Graf <tg...@suug.ch> Signed-off-by: Phil Sutter <p...@nwl.cc> --- lib/test_rhashtable.c | 53 --- 1 file changed, 29 insertions(+), 24 deletions(-) diff

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

2015-11-20 Thread Phil Sutter
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_rhashtable.c

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

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

2015-11-18 Thread Phil Sutter
: run indefinitely by default") Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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 @@ i

[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

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

2015-11-18 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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 exi

[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 <p...@nwl.cc> --- man/man8/bridge.8 | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/man

[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 <p...@nwl.cc> --- man/man8/bridge.8 | 50 +- 1 file changed, 25 insertions(+), 25 deletions(-)

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

2015-11-18 Thread Phil Sutter
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 formatting. Phil Sutter (2): bridge.8: document

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

2015-11-13 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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 @@

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

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

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

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

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

2015-11-13 Thread Phil Sutter
Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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/ip6tu

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

2015-11-13 Thread Phil Sutter
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: align

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

[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 <p...@nwl.cc> --- ip/ip6tunnel.c | 4 ++-- ip/iptunnel.c | 16 2 files changed, 10 insertions(+), 10 deletions(-) diff

[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 <p...@nwl.cc> --- ip/ip6tunnel.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c

[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 <p...@nwl.cc> --- ip/iptunnel.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --gi

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

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

[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 <p...@nwl.cc> --- ip/iptunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iptunnel.c b/ip/iptunnel.c index 803bb83..a547852

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

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

2015-11-11 Thread Phil Sutter
ifa_address)) || > > Signed-off-by: Thomas Haller <thal...@redhat.com> Acked-by: Phil Sutter <p...@nwl.cc> 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 l

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

2015-11-10 Thread Phil Sutter
. Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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

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

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

2015-11-08 Thread Phil Sutter
nlmsg_flags bits. Patch 3/6 therefore extends libnetlink, patch 4/6 then makes use of the extended functionality. While debugging the issue, an unnecessary check has been discovered (patch 5/6) as well as a possible simplification in iptoken.c was found (patch 6/6). Phil Sutter (6): ipaddress: make

[iproute PATCH 1/6] ipaddress: make flush command more error-tolerant

2015-11-08 Thread Phil Sutter
address This patch fixes the issue by simply ignoring EADDRNOTAVAIL when flushing. Signed-off-by: Phil Sutter <p...@nwl.cc> --- ip/ipaddress.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index f290205..75b3e27 100644 --

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

2015-11-08 Thread Phil Sutter
rrupted and may be inconsistent.", advise rtnl_dump_filter_l() to not care about NLM_F_DUMP_INTR. Signed-off-by: Phil Sutter <p...@nwl.cc> --- ip/ipaddress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index b5b444b..23e0308 100644 ---

[iproute PATCH 2/6] ipaddress: simplify ipaddr_flush()

2015-11-08 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 <p...@nwl.cc> --- ip/ipaddress.c | 38 +- 1 file changed, 1 insertion(+), 37 deletions(-) diff

[iproute PATCH v2 0/6] flush many addresses and some cleanups

2015-11-08 Thread Phil Sutter
was built upon previously sent in patch "ip_common.h header cleanup". Changes since v1: - Add forgotten hint about dependent patch (see above). - Fix typo in patch 3/6 (sorry, I forgot to test-build a last-minute cleanup). - All other patches remain unchanged. Phil Sutter (6): ipaddress:

[iproute PATCH v2 1/6] ipaddress: make flush command more error-tolerant

2015-11-08 Thread Phil Sutter
address This patch fixes the issue by simply ignoring EADDRNOTAVAIL when flushing. Signed-off-by: Phil Sutter <p...@nwl.cc> --- ip/ipaddress.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index f290205..75b3e27 100644 --

[iproute PATCH v2 3/6] libnetlink: introduce nc_flags

2015-11-08 Thread Phil Sutter
Allow for a filter to ignore certain nlmsg_flags. Signed-off-by: Phil Sutter <p...@nwl.cc> --- Changed since v1: - Fix typo in #define of rtnl_dump_filter(). include/libnetlink.h | 7 ++- lib/libnetlink.c | 10 ++ 2 files changed, 12 insertions(+), 5 deletions(-) diff

[iproute PATCH v2 5/6] ipaddress: drop unnecessary check in ipaddr_list_flush_or_save()

2015-11-08 Thread Phil Sutter
Right after ipaddr_reset_filter(), filter.family is always AF_UNSPEC. Signed-off-by: Phil Sutter <p...@nwl.cc> --- ip/ipaddress.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 23e0308..ff7f2a8 100644 --- a/ip/ipaddress.c ++

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

2015-11-08 Thread Phil Sutter
rrupted and may be inconsistent.", advise rtnl_dump_filter_l() to not care about NLM_F_DUMP_INTR. Signed-off-by: Phil Sutter <p...@nwl.cc> --- ip/ipaddress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index b5b444b..23e0308 100644 ---

[iproute PATCH v2 2/6] ipaddress: simplify ipaddr_flush()

2015-11-08 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 <p...@nwl.cc> --- ip/ipaddress.c | 38 +- 1 file changed, 1 insertion(+), 37 deletions(-) diff

[iproute PATCH v2 6/6] iptoken: simplify iptoken_list a bit

2015-11-08 Thread Phil Sutter
Since it uses only a single filter, rtnl_dump_filter() can be used. Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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/ipt

[iproute PATCH 3/6] libnetlink: introduce nc_flags

2015-11-08 Thread Phil Sutter
Allow for a filter to ignore certain nlmsg_flags. Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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 2

[iproute PATCH 6/6] iptoken: simplify iptoken_list a bit

2015-11-08 Thread Phil Sutter
Since it uses only a single filter, rtnl_dump_filter() can be used. Signed-off-by: Phil Sutter <p...@nwl.cc> --- 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/ipt

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

2015-11-08 Thread Phil Sutter
Right after ipaddr_reset_filter(), filter.family is always AF_UNSPEC. Signed-off-by: Phil Sutter <p...@nwl.cc> --- ip/ipaddress.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 23e0308..ff7f2a8 100644 --- a/ip/ipaddress.c ++

[iproute PATCH] ip_common.h header cleanup

2015-11-06 Thread Phil Sutter
- Drop 'extern' keyword from all function prototypes. - Make line breaking of print_* functions consistent. - Make print_ntable() and ipntable_reset_filter() static and remove their declaration. - Drop declaration of non-existent ipaddr_list() and iproute_monitor(). Signed-off-by: Phil Sutter

Re: [iproute PATCH] iproute: fix filter_nlmsg

2015-11-04 Thread Phil Sutter
On Tue, Nov 03, 2015 at 04:33:59PM -0800, Stephen Hemminger wrote: > On Thu, 29 Oct 2015 12:15:47 +0100 > Phil Sutter <p...@nwl.cc> wrote: > > > This patch is based upon an old Fedora bug[1] regarding the routing > > setup of PPP links. I'm not quite sure if it

[PATCH] net: sched: kill dead code in sch_choke.c

2015-11-03 Thread Phil Sutter
It looks like this has never been used at all. Signed-off-by: Phil Sutter <p...@nwl.cc> --- net/sched/sch_choke.c | 59 --- 1 file changed, 59 deletions(-) diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c index 02bfd3d..5ffb8b8

Re: [PATCH] net: sched: kill dead code in sch_choke.c

2015-11-03 Thread Phil Sutter
On Tue, Nov 03, 2015 at 01:32:44PM -0500, David Miller wrote: > From: Phil Sutter <p...@nwl.cc> > Date: Tue, 3 Nov 2015 19:01:41 +0100 > > > It looks like this has never been used at all. > > > > Signed-off-by: Phil Sutter <p...@nwl.cc> > > Indeed,

Re: [iproute PATCH] Confirm success for each tc -batch command

2015-11-03 Thread Phil Sutter
On Tue, Nov 03, 2015 at 12:46:21PM -0800, Stephen Hemminger wrote: > On Thu, 29 Oct 2015 13:09:56 +0100 > Phil Sutter <p...@nwl.cc> wrote: > > > If `tc -force -batch' is fed by a controlling program from a pipe, > > it's not possible to recognize when a command has been

[iproute PATCH] Confirm success for each tc -batch command

2015-10-29 Thread Phil Sutter
ccessfully completed tc command. Signed-off-by: Petr Písař <ppi...@redhat.com> Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/tc.8 | 8 +++- tc/tc.c | 8 +++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/man/man8/tc.8 b/man/man8/tc.8 index 700b960..4c

[iproute PATCH] lib/utils: improve error messages of get_addr() and get_prefix()

2015-10-29 Thread Phil Sutter
Instead of statically complaining about illegal inet address, use get_family() to get the address family right. Based on a patch by Hangbin Liu to print "inet6" for AF_INET6 made more generic by me. Signed-off-by: Phil Sutter <p...@nwl.cc> --- lib/utils.c | 6 -- 1

[iproute PATCH v2] lib/utils: improve error messages of get_addr() and get_prefix()

2015-10-29 Thread Phil Sutter
Instead of statically complaining about illegal inet address, use get_family() to get the address family right. Based on a patch by Hangbin Liu to print "inet6" for AF_INET6 made more generic by me. Signed-off-by: Phil Sutter <p...@nwl.cc> --- Changes since v1: - Rebased t

[iproute PATCH 2/4] genl: add manpage

2015-10-29 Thread Phil Sutter
--- man/man8/genl.8 | 77 + 1 file changed, 77 insertions(+) create mode 100644 man/man8/genl.8 diff --git a/man/man8/genl.8 b/man/man8/genl.8 new file mode 100644 index 000..22e44a8 --- /dev/null +++ b/man/man8/genl.8 @@ -0,0 +1,77 @@

[iproute PATCH 3/4] ifstat: add manpage

2015-10-29 Thread Phil Sutter
--- man/man8/ifstat.8 | 59 +++ 1 file changed, 59 insertions(+) create mode 100644 man/man8/ifstat.8 diff --git a/man/man8/ifstat.8 b/man/man8/ifstat.8 new file mode 100644 index 000..e49d868 --- /dev/null +++ b/man/man8/ifstat.8 @@ -0,0

[iproute PATCH 4/4] bridge: fdb: minor syntax fix in help text

2015-10-29 Thread Phil Sutter
--- bridge/fdb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridge/fdb.c b/bridge/fdb.c index 5ea50ab..4d10925 100644 --- a/bridge/fdb.c +++ b/bridge/fdb.c @@ -31,11 +31,11 @@ static unsigned int filter_index; static void usage(void) { - fprintf(stderr,

[iproute PATCH 0/4] A few more man pages and documentation fixup

2015-10-29 Thread Phil Sutter
This series adds man pages for ifcfg, genl and ifstat utilities. Some of them have already been submitted once in 2013[1] but weren't picked up for unknown reasons. Along with this comes a final patch fixing bridge fdb help text. [1]: http://lists.openwall.net/netdev/2013/05/27/102 Phil Sutter

[iproute PATCH 1/4] ifcfg: add manpage

2015-10-29 Thread Phil Sutter
--- man/man8/ifcfg.8 | 48 1 file changed, 48 insertions(+) create mode 100644 man/man8/ifcfg.8 diff --git a/man/man8/ifcfg.8 b/man/man8/ifcfg.8 new file mode 100644 index 000..79033bd --- /dev/null +++ b/man/man8/ifcfg.8 @@ -0,0 +1,48 @@

[iproute PATCH] iproute: fix filter_nlmsg

2015-10-29 Thread Phil Sutter
("iproute2: filter routing entries based on clone flag") Signed-off-by: Phil Sutter <p...@nwl.cc> --- ip/iproute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iproute.c b/ip/iproute.c index eab512d..ea7e9aa 100644 --- a/ip/iproute.c +++ b/ip/iproute.c

Re: [PATCH v7 02/10] ss: created formatters for json and hr

2015-10-28 Thread Phil Sutter
On Wed, Oct 28, 2015 at 12:57:28PM +0100, Matthias Tafelmeier wrote: > >> Those resentments were related to the patchsets complexity and > >> size. > > > > I didn't see any problem with that in the first place. It is indeed > > a big change, achieving something like that without a big patch set >

Re: [PATCH v7 10/10] ss: activate json_writer excluded logic

2015-10-28 Thread Phil Sutter
On Wed, Oct 28, 2015 at 11:39:41AM +0900, Stephen Hemminger wrote: > On Tue, 27 Oct 2015 14:21:03 +0100 > Phil Sutter <p...@nwl.cc> wrote: > > > On Thu, Sep 10, 2015 at 09:35:08PM +0200, Matthias Tafelmeier wrote: > > > This small patch extends the lib j

Re: [PATCH v7 02/10] ss: created formatters for json and hr

2015-10-28 Thread Phil Sutter
On Wed, Oct 28, 2015 at 09:07:47AM +0100, Matthias Tafelmeier wrote: > > > > > Well, then we should wait for another voice aimed at the complexity of > > the patchset before amending and resending me the patchset. > > > > > > Well, I perceive that after Sutter has taken over the maintenance >

Re: [PATCH v7 05/10] ss: replaced old output with new generic output mechanisms

2015-10-27 Thread Phil Sutter
On Thu, Sep 10, 2015 at 09:35:03PM +0200, Matthias Tafelmeier wrote: > This patch just adds the -j and --json flag to ss. Also it ensures proper > stats components bracketization – that goes for ex. TCP, UDP, NETLINK etc. > > Moreover, this patch prevents human readable headers to be printed. >

Re: [PATCH v7 07/10] ss: symmetrical subhandler output extension example

2015-10-27 Thread Phil Sutter
On Thu, Sep 10, 2015 at 09:35:05PM +0200, Matthias Tafelmeier wrote: > This small sized patch shall convey the locations which have to be > changed for a symmetrical output extension. Symmetrical means in this > context all existing semantically related handlers in the diverse > formatters (for hr

Re: [PATCH v7 08/10] ss: symmetrical formatter extension example

2015-10-27 Thread Phil Sutter
On Thu, Sep 10, 2015 at 09:35:06PM +0200, Matthias Tafelmeier wrote: > This commit shall show shortly where to place changes when one wants to > extend an ss output formatter with a new handler (format print > procedure). The extension is done symmetrically. That means, every up to > now existing

Re: [PATCH v7 02/10] ss: created formatters for json and hr

2015-10-27 Thread Phil Sutter
On Tue, Oct 27, 2015 at 06:47:53AM -0700, David Miller wrote: > > Please do not quote an entire large patch in a reply just to common on > one particular section of the change. > > Instead, trim it to just the necessary context. OK, I'll make sure to remember this. Better don't read my other

Re: [PATCH v7 06/10] ss: renaming and export of current_filter

2015-10-27 Thread Phil Sutter
On Thu, Sep 10, 2015 at 09:35:04PM +0200, Matthias Tafelmeier wrote: > Exported current_filter as ss_current_filter, because in > the fmt handlers, I need that piece of info to resolve out issues of json. This patch should come before the patches using the new name. > Signed-off-by: Matthias

Re: [PATCH v7 09/10] ss: fixed free on local array for valid json output

2015-10-27 Thread Phil Sutter
On Thu, Sep 10, 2015 at 09:35:07PM +0200, Matthias Tafelmeier wrote: > Minor fix to enable json output. Freeing of automatic char array name > which will get freed after function stack cleanup. Another one after > tcp_stats_fmt for freeing automatic tcpstats struct instance. > > Signed-off-by:

Re: [PATCH v7 10/10] ss: activate json_writer excluded logic

2015-10-27 Thread Phil Sutter
On Thu, Sep 10, 2015 at 09:35:08PM +0200, Matthias Tafelmeier wrote: > This small patch extends the lib json_writer module for formerly > deactivated functionality. Why was it deactivated in the first place? > > Signed-off-by: Matthias Tafelmeier > --- >

Re: [PATCH v7 02/10] ss: created formatters for json and hr

2015-10-27 Thread Phil Sutter
On Thu, Sep 10, 2015 at 09:35:00PM +0200, Matthias Tafelmeier wrote: > This patch creates a central formatter module that acts as a kind of > switch. From there, more specific handler modules for the certain output > formats are called. Up to now, humand readable and json do exist. > > That

[iproute RFC PATCH 1/9] tc: add a man page for basic filter

2015-10-23 Thread Phil Sutter
Cc: Thomas Graf <tg...@suug.ch> Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/tc-basic.8 | 34 ++ 1 file changed, 34 insertions(+) create mode 100644 man/man8/tc-basic.8 diff --git a/man/man8/tc-basic.8 b/man/man8/tc-basic.8 new file mode

[iproute RFC PATCH 3/9] tc: add a man page for flow filter

2015-10-23 Thread Phil Sutter
Cc: Patrick McHardy <ka...@trash.net> Signed-off-by: Phil Sutter <p...@nwl.cc> --- man/man8/tc-flow.8 | 265 + 1 file changed, 265 insertions(+) create mode 100644 man/man8/tc-flow.8 diff --git a/man/man8/tc-flow.8 b/man/man8/t

[iproute RFC PATCH 6/9] tc: add a man page for route filter

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

[iproute RFC PATCH 5/9] tc: add a man page for fw filter

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

<    4   5   6   7   8   9   10   11   >