From fb12cea8d9b64a81ffb996afb464758de805b00d Mon Sep 17 00:00:00 2001 From: Roman Mashak Date: Mon, 19 Jun 2017 15:52:25 -0400 Subject: [PATCH 1/5] tc: fixed typo in usage text. Signed-off-by: Roman Mashak --- tc/f_u32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/f_u32.c b/tc/f_u32.c index ff700e9f..b272c2cb 100644 --- a/tc/f_u32.c +++ b/tc/f_u32.c @@ -34,7 +34,7 @@ static void explain(void) "Usage: ... u32 [ match SELECTOR ... ] [ link HTID ] [ classid CLASSID ]\n" " [ action ACTION_SPEC ] [ offset OFFSET_SPEC ]\n" " [ ht HTID ] [ hashkey HASHKEY_SPEC ]\n" - " [ sample SAMPLE ] [skip-hw | skip-sw]\n" + " [ sample SAMPLE ] [skip_hw | skip_sw]\n" "or u32 divisor DIVISOR\n" "\n" "Where: SELECTOR := SAMPLE SAMPLE ...\n" From 7cca407e28ee41b234cfea0e1cc211d92f09f696 Mon Sep 17 00:00:00 2001 From: Roman Mashak Date: Wed, 21 Jun 2017 11:14:22 -0400 Subject: [PATCH 2/5] tc: updated tc-u32 man page to reflect skip_sw and skip_hw parameters. Signed-off-by: Roman Mashak --- man/man8/tc-u32.8 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/man/man8/tc-u32.8 b/man/man8/tc-u32.8 index 691f53c1..e9475a93 100644 --- a/man/man8/tc-u32.8 +++ b/man/man8/tc-u32.8 @@ -29,6 +29,10 @@ u32 \- universal 32bit traffic control filter .IR HANDLE " ] [ " .B indev .IR ifname " ] [ " +.B skip_hw +.R "|" +.B skip_sw +.R " ] [ " .BR help " ]" .ti -8 @@ -331,6 +335,13 @@ option. Filter on the incoming interface of the packet. Obviously works only for forwarded traffic. .TP +.BI skip_sw +Do not process filter by software. If hardware has no offload support for this +filter, or TC offload is not enabled for the interface, operation will fail. +.TP +.BI skip_hw +Do not process filter by hardware. +.TP .BI help Print a brief help text about possible options. .SH SELECTORS From f2ca4a7a6f721eaa9d4c5c66d1df2015fad5f4f4 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 27 Jun 2017 21:00:25 +0200 Subject: [PATCH 3/5] man: Collect names of man pages automatically As it turned out, forgetting to add a man page to the respective Makefile when introducing it is a common mistake. Overcome this once and for all by using $(wildcard) function in Makefiles. Fixes: 7124942942e53 ("genl: add manpage") Fixes: 958cd210942c8 ("ifcfg: add manpage") Fixes: e1b7f883e50de ("man: add documentation for IPv6 SR commands") Fixes: 1949f82cdf62c ("Introduce ip vrf command") Fixes: 535194a172d23 ("tipc: add peer remove functionality") Signed-off-by: Phil Sutter --- man/man3/Makefile | 2 +- man/man7/Makefile | 2 +- man/man8/Makefile | 21 +-------------------- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/man/man3/Makefile b/man/man3/Makefile index bf55658c..a98741de 100644 --- a/man/man3/Makefile +++ b/man/man3/Makefile @@ -1,4 +1,4 @@ -MAN3PAGES=libnetlink.3 +MAN3PAGES = $(wildcard *.3) all: diff --git a/man/man7/Makefile b/man/man7/Makefile index ccfd8398..689fc713 100644 --- a/man/man7/Makefile +++ b/man/man7/Makefile @@ -1,4 +1,4 @@ -MAN7PAGES = tc-hfsc.7 +MAN7PAGES = $(wildcard *.7) all: diff --git a/man/man8/Makefile b/man/man8/Makefile index f3318644..12af66be 100644 --- a/man/man8/Makefile +++ b/man/man8/Makefile @@ -1,25 +1,6 @@ TARGETS = ip-address.8 ip-link.8 ip-route.8 -MAN8PAGES = $(TARGETS) ip.8 arpd.8 lnstat.8 routel.8 rtacct.8 rtmon.8 rtpr.8 ss.8 \ - tc.8 tc-bfifo.8 tc-bpf.8 tc-cbq.8 tc-cbq-details.8 tc-choke.8 tc-codel.8 \ - tc-fq.8 \ - tc-drr.8 tc-ematch.8 tc-fq_codel.8 tc-hfsc.8 tc-htb.8 tc-pie.8 \ - tc-mqprio.8 tc-netem.8 tc-pfifo.8 tc-pfifo_fast.8 tc-prio.8 tc-red.8 \ - tc-sfb.8 tc-sfq.8 tc-stab.8 tc-tbf.8 \ - bridge.8 rtstat.8 ctstat.8 nstat.8 routef.8 \ - ip-addrlabel.8 ip-fou.8 ip-gue.8 ip-l2tp.8 ip-macsec.8 \ - ip-maddress.8 ip-monitor.8 ip-mroute.8 ip-neighbour.8 \ - ip-netns.8 ip-ntable.8 ip-rule.8 ip-tunnel.8 ip-xfrm.8 \ - ip-tcp_metrics.8 ip-netconf.8 ip-token.8 \ - tipc.8 tipc-bearer.8 tipc-link.8 tipc-media.8 tipc-nametable.8 \ - tipc-node.8 tipc-socket.8 \ - tc-basic.8 tc-cgroup.8 tc-flow.8 tc-flower.8 tc-fw.8 tc-route.8 \ - tc-tcindex.8 tc-u32.8 tc-matchall.8 \ - tc-connmark.8 tc-csum.8 tc-mirred.8 tc-nat.8 tc-pedit.8 tc-police.8 \ - tc-simple.8 tc-skbedit.8 tc-vlan.8 tc-xt.8 tc-skbmod.8 tc-ife.8 \ - tc-tunnel_key.8 tc-sample.8 \ - devlink.8 devlink-dev.8 devlink-monitor.8 devlink-port.8 devlink-sb.8 \ - ifstat.8 +MAN8PAGES = $(TARGETS) $(filter-out $(TARGETS),$(wildcard *.8)) all: $(TARGETS) From 3288e9b4264ec3646c4a7ae496b2b08d85ed4a47 Mon Sep 17 00:00:00 2001 From: Lukas Braun Date: Wed, 21 Jun 2017 21:59:45 +0200 Subject: [PATCH 4/5] man: ip-route.8: Mention that lower metric means higher priority This is quite counter-intuitive when using the 'preference' keyword. Signed-off-by: Lukas Braun --- man/man8/ip-route.8.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in index c8eb38a7..d74e2a8a 100644 --- a/man/man8/ip-route.8.in +++ b/man/man8/ip-route.8.in @@ -380,7 +380,7 @@ from .BI preference " NUMBER" the preference value of the route. .I NUMBER -is an arbitrary 32bit number. +is an arbitrary 32bit number, where routes with lower values are preferred. .TP .BI table " TABLEID" From c9c3720d1411730f865d4c16ac8b2f01ab2eb8a6 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Tue, 27 Jun 2017 02:48:36 +0200 Subject: [PATCH 5/5] bpf: indicate lderr when bpf_apply_relo_data fails When LLVM wrongly generates a rodata relo entry (llvm BZ #33599), then just bail out instead of probing for prog w/o reloc, which will fail in this case anyway. Signed-off-by: Daniel Borkmann --- lib/bpf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/bpf.c b/lib/bpf.c index ae4d97dc..6b5a96d0 100644 --- a/lib/bpf.c +++ b/lib/bpf.c @@ -1795,8 +1795,10 @@ static int bpf_fetch_prog_relo(struct bpf_elf_ctx *ctx, const char *section, *sseen = true; ret = bpf_apply_relo_data(ctx, &data_relo, &data_insn); - if (ret < 0) + if (ret < 0) { + *lderr = true; return ret; + } memset(&prog, 0, sizeof(prog)); prog.type = ctx->type;