[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 --- 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 --git a/include

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

[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 --- 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 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 --- 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 --- a/ip/ipaddress.c +++ b/ip

[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 --- 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 +++ b/ip/ipaddress.c

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

2015-11-08 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 b5b444b..23e0308 100644 --- a/ip/ipaddress.c

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

2015-11-08 Thread Phil Sutter
note that this series 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

[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 --- 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 --- a/ip/ipaddress.c +++ b/ip

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

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

2015-11-08 Thread Phil Sutter
y allow to ignore certain 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 Sutt

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

2015-11-08 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 b5b444b..23e0308 100644 --- a/ip/ipaddress.c

[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 --- 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..38e54f4 100644

[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 --- 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 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 --- 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 +++ b/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: P

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 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 still applies toda

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 wrote: > > > If `tc -force -batch' is fed by a controlling program from a pipe, > > it's not possible to recognize when a command has

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 > Date: Tue, 3 Nov 2015 19:01:41 +0100 > > > It looks like this has never been used at all. > > > > Signed-off-by: Phil Sutter > > Indeed, from day one this was completely unre

[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 --- 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 100644 --- a/net/sched

[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 --- Changes since v1: - Rebased this patch on top

[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 --- lib/utils.c | 6 -- 1 file changed, 4 insert

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

2015-10-29 Thread Phil Sutter
rd output on each successfully completed tc command. Signed-off-by: Petr Písař Signed-off-by: Phil Sutter --- 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..4c5c079 100644 --- a/man

[iproute PATCH] iproute: fix filter_nlmsg

2015-10-29 Thread Phil Sutter
s: 4479282 ("iproute2: filter routing entries based on clone flag") Signed-off-by: Phil Sutter --- 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 @@ -151,7

[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, "Us

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

[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 @@ +.TH

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

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 wrote: > > > On Thu, Sep 10, 2015 at 09:35:08PM +0200, Matthias Tafelmeier wrote: > > > This small patch extends the lib json_writer module for fo

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 ema

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 > --- > include/json_writer.h | 1 + > lib/json

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: Mat

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 f

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

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

Re: [iproute RFC PATCH 0/9] Document tc filters

2015-10-23 Thread Phil Sutter
On Fri, Oct 23, 2015 at 10:13:02PM +0200, Thomas Graf wrote: > On 10/23/15 at 07:47pm, Phil Sutter wrote: > > man/man8/Makefile | 4 +- > > man/man8/tc-basic.8 | 34 +++ > > man/man8/tc-cgroup.8 | 80 ++ > > man/man8/tc-flow.8| 265 +++

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

2015-10-23 Thread Phil Sutter
Cc: Alexey Kuznetsov Signed-off-by: Phil Sutter --- 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/man8/tc-route.8 new file mode 100644 index 000

[iproute RFC PATCH 8/9] tc: add a man page for u32 filter

2015-10-23 Thread Phil Sutter
Cc: Alexey Kuznetsov Signed-off-by: Phil Sutter --- man/man8/tc-u32.8 | 663 ++ 1 file changed, 663 insertions(+) create mode 100644 man/man8/tc-u32.8 diff --git a/man/man8/tc-u32.8 b/man/man8/tc-u32.8 new file mode 100644 index 000

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

2015-10-23 Thread Phil Sutter
Cc: Thomas Graf Signed-off-by: Phil Sutter --- 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 100644 index 000..fb39eaa --- /dev/null

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

2015-10-23 Thread Phil Sutter
Cc: Patrick McHardy Signed-off-by: Phil Sutter --- 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/tc-flow.8 new file mode 100644 index 000

[iproute RFC PATCH 4/9] tc: add a man page for flower filter

2015-10-23 Thread Phil Sutter
Cc: Jiri Pirko Signed-off-by: Phil Sutter --- man/man8/tc-flower.8 | 113 +++ 1 file changed, 113 insertions(+) create mode 100644 man/man8/tc-flower.8 diff --git a/man/man8/tc-flower.8 b/man/man8/tc-flower.8 new file mode 100644 index 000

[iproute RFC PATCH 7/9] tc: add a man page for tcindex filter

2015-10-23 Thread Phil Sutter
Cc: Werner Almesberger Signed-off-by: Phil Sutter --- man/man8/tc-tcindex.8 | 58 +++ 1 file changed, 58 insertions(+) create mode 100644 man/man8/tc-tcindex.8 diff --git a/man/man8/tc-tcindex.8 b/man/man8/tc-tcindex.8 new file mode 100644 index

[iproute RFC PATCH 2/9] tc: add a man page for cgroup filter

2015-10-23 Thread Phil Sutter
Cc: Thomas Graf Signed-off-by: Phil Sutter --- man/man8/tc-cgroup.8 | 80 1 file changed, 80 insertions(+) create mode 100644 man/man8/tc-cgroup.8 diff --git a/man/man8/tc-cgroup.8 b/man/man8/tc-cgroup.8 new file mode 100644 index 000

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

2015-10-23 Thread Phil Sutter
Cc: Alexey Kuznetsov Signed-off-by: Phil Sutter --- 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-fw.8 new file mode 100644 index 000..d742b47

[iproute RFC PATCH 0/9] Document tc filters

2015-10-23 Thread Phil Sutter
y happy by explaining to me how that filter is supposed to work. In turn I could serve you with stupid^Wunqualified questions and ultimately tc-rsvp.8 which you would then have to proof-read as well. Phil Sutter (9): tc: add a man page for basic filter tc: add a man page for cgroup filter tc: add

[iproute RFC PATCH 9/9] tc: ship filter man pages and refer to them in tc.8

2015-10-23 Thread Phil Sutter
Cc: Thomas Graf Cc: Alexey Kuznetsov Cc: Jiri Pirko Cc: Patrick McHardy Cc: Werner Almesberger Signed-off-by: Phil Sutter --- man/man8/Makefile | 4 +++- man/man8/tc.8 | 52 2 files changed, 55 insertions(+), 1 deletion(-) diff

[iproute PATCH] tc: u32 filter coding style cleanup

2015-10-23 Thread Phil Sutter
Add missing spaces around operators to increase readability. Aside from that, make "preference" match a real synonym for "tos" and "dsfield" as it's effect was identical to them. Signed-off-by: Phil Sutter --- tc/f_u32.c | 56 +++--

[iproute PATCH] tc: improve filter help texts a bit

2015-10-23 Thread Phil Sutter
This fixes a few syntax errors and changes route filter help text to use classid instead of flowid to be consistent with other filters' help texts. Signed-off-by: Phil Sutter --- tc/f_flower.c | 4 ++-- tc/f_route.c | 2 +- tc/f_rsvp.c | 2 +- 3 files changed, 4 insertions(+), 4 dele

[PATCH v2 iproute2] ip-address: fix oneline mode for interfaces with VF

2015-10-16 Thread Phil Sutter
Signed-off-by: Phil Sutter --- Changed since v1: Fix commit message - typo in From: header confused git-send-email. --- ip/ipaddress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index e864ca6..f290205 100644 --- a/ip

[PATCH iproute2] ip-address: fix oneline mode for interfaces with VF

2015-10-16 Thread Phil Sutter
From: Phil Sutter --- ip/ipaddress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index e864ca6..f290205 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -345,7 +345,7 @@ static void print_vfinfo(FILE *fp, struct rtattr *vfinfo

[PATCH] ip-rule: neither prohibit nor reject or unreachable flags exist

2015-10-15 Thread Phil Sutter
This has been inconsistent since the beginning of Git and seems to be merely a documentation leftover, therefore just remove it from help output and man page. Signed-off-by: Phil Sutter --- ip/iprule.c| 1 - man/man8/ip-rule.8 | 2 +- 2 files changed, 1 insertion(+), 2 deletions

[PATCH iproute2] ss: return -1 if an unrecognized option was given

2015-10-15 Thread Phil Sutter
When getopt_long encounters an option which has not been registered, it returns '?'. React upon that and call usage() instead of help() so ss returns with a non-zero exit status. Signed-off-by: Phil Sutter --- misc/ss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

Re: NULL pointer dereference in rt6_get_cookie()

2015-10-14 Thread Phil Sutter
Hi Martin, On Tue, Oct 13, 2015 at 11:14:21PM -0700, Martin KaFai Lau wrote: > On Tue, Oct 13, 2015 at 09:26:41PM +0200, Phil Sutter wrote: > > I have backed up the rt pointer at top of the function and restored it > > before pr_err, this is the output: > > > > | rt6i

Re: NULL pointer dereference in rt6_get_cookie()

2015-10-13 Thread Phil Sutter
On Tue, Oct 13, 2015 at 09:10:39PM +0200, Phil Sutter wrote: > Hi Martin, > > On Tue, Oct 13, 2015 at 11:14:43AM -0700, Martin KaFai Lau wrote: > > On Sat, Oct 10, 2015 at 03:24:37PM +0200, Phil Sutter wrote: > > > The conditional at the start of the function evaluat

Re: NULL pointer dereference in rt6_get_cookie()

2015-10-13 Thread Phil Sutter
Hi Martin, On Tue, Oct 13, 2015 at 11:14:43AM -0700, Martin KaFai Lau wrote: > On Sat, Oct 10, 2015 at 03:24:37PM +0200, Phil Sutter wrote: > > The conditional at the start of the function evaluates true, since > > 'rt->rt6i_flags & RTF_PCPU' is non-zero. >

NULL pointer dereference in rt6_get_cookie()

2015-10-10 Thread Phil Sutter
Hi, Linux 4.2.0 and above dereferences a NULL pointer for me when sending an IPsec secured packet for the first time. I use kernel IPsec with racoon and setkey. This is what my configuration looks like: Local host: 2001:4dd0:ff3b:13::23 Remote host: 2001:4dd0:ff3b:13::5 Setkey instructions: | #

[iproute PATCH 1/3] ip: link: consolidate macvlan and macvtap

2015-09-25 Thread Phil Sutter
til. Fold both files into one in order to share common code and eliminate the chance of having fixes/enhancements applied to only one of them. Signed-off-by: Phil Sutter --- ip/Makefile | 2 +- ip/iplink_macvlan.c | 40 +--- ip/iplink_macvt

[iproute PATCH 2/3] ip: macvlan: support MACVLAN_FLAG_NOPROMISC flag

2015-09-25 Thread Phil Sutter
This flag is allowed for devices in passthru mode to prevent forcing the underlying interface into promiscuous mode. Signed-off-by: Phil Sutter --- ip/iplink_macvlan.c | 30 +++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/ip/iplink_macvlan.c b/ip

[iproute PATCH 3/3] man: ip-link: document MACVLAN/MACVTAP interface types

2015-09-25 Thread Phil Sutter
Signed-off-by: Phil Sutter --- man/man8/ip-link.8.in | 50 ++ 1 file changed, 50 insertions(+) diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in index 4928249..ac6f481 100644 --- a/man/man8/ip-link.8.in +++ b/man/man8/ip-link.8.in

[iproute PATCH 0/3] improve MACVLAN/MACVTAP support

2015-09-25 Thread Phil Sutter
nt this in the future and to share common code, this series merges the files. In addition, it implements support for MACVLAN_FLAG_NOPROMISC and finally documents these interface types in ip-link.8.in. Phil Sutter (3): ip: link: consolidate macvlan and macvtap ip: macvlan: support MACVLAN_FLAG

Re: RFC: ss: improve horizontal output scaling

2015-09-24 Thread Phil Sutter
On Thu, Sep 24, 2015 at 06:27:59AM -0700, Eric Dumazet wrote: > On Thu, 2015-09-24 at 14:36 +0200, Phil Sutter wrote: > > > This is because TIOCGWINSZ returns 80 if the output is a pipe. > > Not exactly. > > ss doesn't even call TIOCGWINSZ if output is a pipe. O

Re: RFC: ss: improve horizontal output scaling

2015-09-24 Thread Phil Sutter
On Thu, Sep 24, 2015 at 05:25:47AM -0700, Eric Dumazet wrote: > On Thu, 2015-09-24 at 13:16 +0200, Phil Sutter wrote: > > Hi, > > > > Currently, ss scales it's output to the available horizontal screen > > space available, so that the regular columns (Netid,

RFC: ss: improve horizontal output scaling

2015-09-24 Thread Phil Sutter
Hi, Currently, ss scales it's output to the available horizontal screen space available, so that the regular columns (Netid, State, Recv-Q, Send-Q, Local Address:Port and Peer Address:Port) use the maximum space available and extended information (e.g. users) get wrapped into a new line. While th

[iproute2 PATCH v2] man: tc.8: mention available qdiscs

2015-09-22 Thread Phil Sutter
adjusting it more to the context in which it is now. In case there wasn't appropriate wording available, I tried to identify key aspects of the given qdisc. Signed-off-by: Phil Sutter --- Changes since v1: - Added all remaining qdiscs which were not listed before and for which a file e

Re: [iproute2 PATCH] ip-link: do not support 'ip link add dev help'

2015-09-21 Thread Phil Sutter
On Mon, Sep 21, 2015 at 10:13:49PM +0200, Christoph Schulz wrote: > Phil Sutter schrieb am Mon, 21 Sep 2015 21:33:01 +0200: > > > Commit 0532555 ('Support "ip link add help" for rtnl_link API') added a > > check for specified help parameter. Though due to th

[iproute2 PATCH] ip-link: do not support 'ip link add dev help'

2015-09-21 Thread Phil Sutter
ev '. Fix this by forcing whatever follows 'dev' to be presumed as interface name. Signed-off-by: Phil Sutter --- ip/iplink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ip/iplink.c b/ip/iplink.c index 97f46cd..1c45205 100644 --- a/ip/iplink.c +++

[iproute PATCH 0/6] documentation enhancements

2015-09-18 Thread Phil Sutter
headers listing an incorrect FSF address. Phil Sutter (6): man: ip-address: align synopsis with help output man: ip: add -h[uman-readable] option comment: Fix remaining listings of wrong FSF address man: ip-address: document mngtmpaddr and noprefixroute flags man: lnstat: rewrite manpage

[iproute PATCH 4/6] man: ip-address: document mngtmpaddr and noprefixroute flags

2015-09-18 Thread Phil Sutter
Signed-off-by: Phil Sutter --- man/man8/ip-address.8.in | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/man/man8/ip-address.8.in b/man/man8/ip-address.8.in index 43611b9..159d906 100644 --- a/man/man8/ip-address.8.in +++ b/man/man8/ip-address.8.in @@ -67,7

[iproute PATCH 6/6] man: rtpr: add minimal manpage

2015-09-18 Thread Phil Sutter
While there is not much to explain about this rather trivial shell script, having a manpage for it serves as good point of reference for users wondering what it might be for. Signed-off-by: Phil Sutter --- man/man8/Makefile | 2 +- man/man8/rtpr.8 | 25 + 2 files

[iproute PATCH 2/6] man: ip: add -h[uman-readable] option

2015-09-18 Thread Phil Sutter
Since 'ip help' lists it, it should be described in ip.8 as well. Signed-off-by: Phil Sutter --- man/man8/ip.8 | 5 + 1 file changed, 5 insertions(+) diff --git a/man/man8/ip.8 b/man/man8/ip.8 index 9da086d..e6c2b32 100644 --- a/man/man8/ip.8 +++ b/man/man8/ip.8 @@ -27,6 +

[iproute PATCH 3/6] comment: Fix remaining listings of wrong FSF address

2015-09-18 Thread Phil Sutter
This patch follows the changes of commit 4d98ab0 ("Fix FSF address in file headers"), fixing file headers added after it. Signed-off-by: Phil Sutter --- include/linux/tc_act/tc_skbedit.h | 3 +-- tc/m_connmark.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletion

[iproute PATCH 1/6] man: ip-address: align synopsis with help output

2015-09-18 Thread Phil Sutter
When fixing the BNF syntax error, I overlooked that 'ip address help' prints a more correct synopsis. This patch aligns them. Fixes: 715296b ("ip-address.8.in: fix BNF syntax error") Signed-off-by: Phil Sutter --- man/man8/ip-address.8.in | 2 +- 1 file changed, 1 inse

[iproute PATCH 5/6] man: lnstat: rewrite manpage

2015-09-18 Thread Phil Sutter
Signed-off-by: Phil Sutter --- man/man8/lnstat.8 | 197 -- 1 file changed, 192 insertions(+), 5 deletions(-) diff --git a/man/man8/lnstat.8 b/man/man8/lnstat.8 index 699ddf4..69fe876 100644 --- a/man/man8/lnstat.8 +++ b/man/man8/lnstat.8

Re: [net-next PATCH] net: bridge: fix for bridging 802.1Q without REORDER_HDR

2015-09-16 Thread Phil Sutter
On Tue, Sep 15, 2015 at 10:36:41PM -0400, Vlad Yasevich wrote: > On 09/15/2015 02:17 PM, Phil Sutter wrote: > > On Tue, Sep 15, 2015 at 11:11:53AM -0400, Vlad Yasevich wrote: > >> On 09/14/2015 04:06 PM, Phil Sutter wrote: > >>> On Mon, Sep 14, 2015 at 02:21:1

Re: [net-next PATCH] net: bridge: fix for bridging 802.1Q without REORDER_HDR

2015-09-15 Thread Phil Sutter
On Tue, Sep 15, 2015 at 11:11:53AM -0400, Vlad Yasevich wrote: > On 09/14/2015 04:06 PM, Phil Sutter wrote: > > On Mon, Sep 14, 2015 at 02:21:10PM -0400, Vlad Yasevich wrote: > >> On 09/11/2015 04:20 PM, Phil Sutter wrote: > >>> On Fri, Sep 11, 2015 at 12:24:45PM

[PATCH] net: qdisc: enhance default_qdisc documentation

2015-09-15 Thread Phil Sutter
Aside from some lingual cleanup, point out which interfaces are not or partly covered by this setting. Signed-off-by: Phil Sutter --- Documentation/sysctl/net.txt | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Documentation/sysctl/net.txt b/Documentation

Re: [net-next PATCH] net: sched: document attach_default_qdiscs

2015-09-14 Thread Phil Sutter
On Mon, Sep 14, 2015 at 03:07:42PM -0700, Cong Wang wrote: > On Mon, Sep 14, 2015 at 8:31 AM, Phil Sutter wrote: > > The process of selecting an interface's default qdisc is not really > > intuitive, at least because there are three different cases to consider. > > It

Re: [net-next PATCH] net: bridge: fix for bridging 802.1Q without REORDER_HDR

2015-09-14 Thread Phil Sutter
On Mon, Sep 14, 2015 at 02:21:10PM -0400, Vlad Yasevich wrote: > On 09/11/2015 04:20 PM, Phil Sutter wrote: > > On Fri, Sep 11, 2015 at 12:24:45PM -0700, Stephen Hemminger wrote: > >> On Fri, 11 Sep 2015 21:22:03 +0200 > >> Phil Sutter wrote: > >> > >

[net-next PATCH] net: sched: document attach_default_qdiscs

2015-09-14 Thread Phil Sutter
The process of selecting an interface's default qdisc is not really intuitive, at least because there are three different cases to consider. Signed-off-by: Phil Sutter --- net/sched/sch_generic.c | 12 1 file changed, 12 insertions(+) diff --git a/net/sched/sch_generic.c

Re: [net-next PATCH] net: bridge: fix for bridging 802.1Q without REORDER_HDR

2015-09-11 Thread Phil Sutter
On Fri, Sep 11, 2015 at 12:24:45PM -0700, Stephen Hemminger wrote: > On Fri, 11 Sep 2015 21:22:03 +0200 > Phil Sutter wrote: > > > When forwarding packets from an 802.1Q interface with REORDER_HDR set to > > zero, the VLAN header previously inserted by vlan_do_receive() nee

[net-next PATCH] net: bridge: fix for bridging 802.1Q without REORDER_HDR

2015-09-11 Thread Phil Sutter
-by: Phil Sutter --- net/bridge/br_input.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c index f921a5d..e4e3fc7 100644 --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c @@ -288,6 +288,16 @@ rx_handler_result_t br_handle_frame

[iproute2 PATCH] tc: fq: allow setting and retrieving flow refill delay

2015-09-10 Thread Phil Sutter
Code to parse and export this tuneable via netlink is already present in sched_fq.c of the kernel, so not making it accessible for users would be a waste of resources. Signed-off-by: Phil Sutter --- tc/q_fq.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git

Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads

2015-09-10 Thread Phil Sutter
On Thu, Sep 10, 2015 at 04:03:44PM +0800, Herbert Xu wrote: > On Tue, Sep 01, 2015 at 04:51:24PM +0200, Thomas Graf wrote: > > > > 1. The current in-kernel self-test > > 2. bind_netlink.c: https://github.com/tgraf/rhashtable > > I can't reproduce it: I can't speak for netlink, but if you apply p

[iproute PATCH] man: tc.8: mention Fair Queue scheduler

2015-09-09 Thread Phil Sutter
This is rather a placeholder to let users know fq exists at all. Signed-off-by: Phil Sutter --- man/man8/tc.8 | 4 1 file changed, 4 insertions(+) diff --git a/man/man8/tc.8 b/man/man8/tc.8 index feafa05..0081625 100644 --- a/man/man8/tc.8 +++ b/man/man8/tc.8 @@ -151,6 +151,10 @@ The

[net-next PATCH v3] net: ipv6: use common fib_default_rule_pref

2015-09-09 Thread Phil Sutter
directly instead. Therefore get rid of the function pointer altogether and make fib_default_rule_pref() static, as it's not used outside fib_rules.c anymore. Signed-off-by: Phil Sutter --- Changes since v1: - Folded together with API change and adjusted commit message accordingly. Changes

Re: [net-next PATCH v2] net: ipv6: use common fib_default_rule_pref

2015-09-09 Thread Phil Sutter
On Tue, Sep 08, 2015 at 10:38:09PM -0700, David Miller wrote: > From: David Miller > Date: Tue, 08 Sep 2015 22:37:05 -0700 (PDT) > > > Applied, thanks. > > Actually, reverted, this doesn't even compile. > > net/core/fib_rules.c:47:12: error: static declaration of > ‘fib_default_rule_pref’ foll

[net-next PATCH v2] net: ipv6: use common fib_default_rule_pref

2015-09-06 Thread Phil Sutter
directly instead. Therefore get rid of the function pointer altogether and make fib_default_rule_pref() static, as it's not used outside fib_rules.c anymore. Signed-off-by: Phil Sutter --- Changes since v1: - Folded together with API change and adjusted commit message accordingly. --- in

Re: [net-next PATCH] net: kill default_pref field of struct fib_rules_ops

2015-09-06 Thread Phil Sutter
On Sat, Sep 05, 2015 at 10:00:40PM -0700, David Miller wrote: > From: Phil Sutter > Date: Thu, 3 Sep 2015 13:10:22 +0200 > > > Since now all users of that field have been converted to use the generic > > function fib_default_rule_pref() when assigning to it, fib_nl_newrule(

[net-next PATCH] net: kill default_pref field of struct fib_rules_ops

2015-09-03 Thread Phil Sutter
Since now all users of that field have been converted to use the generic function fib_default_rule_pref() when assigning to it, fib_nl_newrule() may just use it directly instead. Signed-off-by: Phil Sutter --- include/net/fib_rules.h | 1 - net/core/fib_rules.c| 10 +++--- net/decnet

[net-next PATCH] net: ipv6: use common fib_default_rule_pref

2015-09-02 Thread Phil Sutter
: Formerly, IPv6 rules were assigned a fixed priority of 0x3FFF whereas for IPv4 the assigned priority value was decreased with each rule added. Signed-off-by: Phil Sutter --- net/ipv6/fib6_rules.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/net/ipv6/fib6_rules.c b

Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads

2015-09-01 Thread Phil Sutter
On Tue, Sep 01, 2015 at 09:50:19PM +0800, Herbert Xu wrote: > On Tue, Sep 01, 2015 at 03:43:11PM +0200, Phil Sutter wrote: > > > > Hmm. Since memory allocation is first tried with GFP_ATOMIC set and upon > > failure retried in background, this seems like a situation which mi

Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads

2015-09-01 Thread Phil Sutter
On Tue, Sep 01, 2015 at 09:00:57PM +0800, Herbert Xu wrote: > On Tue, Sep 01, 2015 at 02:46:48PM +0200, Phil Sutter wrote: > > > > This is not an inherent behaviour of the implementation but general > > agreement. The insertion may fail non-permanently (returning -EBUSY), >

Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads

2015-09-01 Thread Phil Sutter
On Tue, Sep 01, 2015 at 07:43:00PM +0800, Herbert Xu wrote: > On Mon, Aug 31, 2015 at 01:00:12PM +0200, Phil Sutter wrote: > > > > The variable would be used to track if the worker has failed to allocate > > memory in background. > > > > Since the failing inse

Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads

2015-08-31 Thread Phil Sutter
On Sun, Aug 30, 2015 at 03:47:17PM +0800, Herbert Xu wrote: > Phil Sutter wrote: > > > > Should we introduce a new field to struct rhashtable to track the > > internal state? This might allow to clean up some rather obscure tests, > > e.g. whether a table resize is i

Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads

2015-08-29 Thread Phil Sutter
On Sat, Aug 29, 2015 at 12:43:03AM +0200, Thomas Graf wrote: > On 08/28/15 at 03:34pm, Phil Sutter wrote: > > Quite ugly, IMHO: rhashtable_insert_fast() may return -ENOMEM as > > non-permanent error, if allocation in GFP_ATOMIC failed. In this case, > > allocation in GFP

Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads

2015-08-28 Thread Phil Sutter
On Fri, Aug 28, 2015 at 01:13:20PM +0200, Phil Sutter wrote: > On Fri, Aug 28, 2015 at 01:09:29PM +0200, Thomas Graf wrote: > > On 08/28/15 at 12:28pm, Phil Sutter wrote: > > > After adding cond_resched() calls to threadfunc(), a surprisingly high > > > rate of insert

<    5   6   7   8   9   10   11   >