[PATCH iproute] tc: matchall: Print skip flags when dumping a filter

Subsystems: the rest

STALE3471d

3 messages, 3 authors, 2017-02-19 · open the first message on its own page

[PATCH iproute] tc: matchall: Print skip flags when dumping a filter

From: Or Gerlitz <hidden>
Date: 2017-02-09 13:37:26

Print the skip flags when we dump a filter.

Signed-off-by: Or Gerlitz <redacted>
Acked by: Yotam Gigi [off-list ref]
---
 tc/f_matchall.c | 9 +++++++++
 1 file changed, 9 insertions(+)
diff --git a/tc/f_matchall.c b/tc/f_matchall.c
index 04e524e..ac48630 100644
--- a/tc/f_matchall.c
+++ b/tc/f_matchall.c
@@ -130,6 +130,15 @@ static int matchall_print_opt(struct filter_util *qu, FILE *f,
 			sprint_tc_classid(rta_getattr_u32(tb[TCA_MATCHALL_CLASSID]), b1));
 	}
 
+	if (tb[TCA_MATCHALL_FLAGS]) {
+		__u32 flags = rta_getattr_u32(tb[TCA_MATCHALL_FLAGS]);
+
+		if (flags & TCA_CLS_FLAGS_SKIP_HW)
+			fprintf(f, "\n  skip_hw");
+		if (flags & TCA_CLS_FLAGS_SKIP_SW)
+			fprintf(f, "\n  skip_sw");
+	}
+
 	if (tb[TCA_MATCHALL_ACT])
 		tc_print_action(f, tb[TCA_MATCHALL_ACT]);
 
-- 
2.3.7

Re: [PATCH iproute] tc: matchall: Print skip flags when dumping a filter

From: Simon Horman <hidden>
Date: 2017-02-10 15:37:28

On Thu, Feb 09, 2017 at 03:10:14PM +0200, Or Gerlitz wrote:
Print the skip flags when we dump a filter.

Signed-off-by: Or Gerlitz <redacted>
Acked by: Yotam Gigi [off-list ref]
This appears to be consistent with other classifiers that support these
flags.

Reviewed-by: Simon Horman <redacted>
quoted hunk
---
 tc/f_matchall.c | 9 +++++++++
 1 file changed, 9 insertions(+)
diff --git a/tc/f_matchall.c b/tc/f_matchall.c
index 04e524e..ac48630 100644
--- a/tc/f_matchall.c
+++ b/tc/f_matchall.c
@@ -130,6 +130,15 @@ static int matchall_print_opt(struct filter_util *qu, FILE *f,
 			sprint_tc_classid(rta_getattr_u32(tb[TCA_MATCHALL_CLASSID]), b1));
 	}
 
+	if (tb[TCA_MATCHALL_FLAGS]) {
+		__u32 flags = rta_getattr_u32(tb[TCA_MATCHALL_FLAGS]);
+
+		if (flags & TCA_CLS_FLAGS_SKIP_HW)
+			fprintf(f, "\n  skip_hw");
+		if (flags & TCA_CLS_FLAGS_SKIP_SW)
+			fprintf(f, "\n  skip_sw");
+	}
+
 	if (tb[TCA_MATCHALL_ACT])
 		tc_print_action(f, tb[TCA_MATCHALL_ACT]);
 
-- 
2.3.7

Re: [PATCH iproute] tc: matchall: Print skip flags when dumping a filter

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2017-02-19 00:09:51

On Thu,  9 Feb 2017 15:10:14 +0200
Or Gerlitz [off-list ref] wrote:
Print the skip flags when we dump a filter.

Signed-off-by: Or Gerlitz <redacted>
Acked by: Yotam Gigi [off-list ref]
Applied, thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help