]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc: matchall: Print skip flags when dumping a filter
authorOr Gerlitz <ogerlitz@mellanox.com>
Thu, 9 Feb 2017 13:10:14 +0000 (15:10 +0200)
committerStephen Hemminger <sthemmin@microsoft.com>
Fri, 17 Feb 2017 23:25:24 +0000 (15:25 -0800)
Print the skip flags when we dump a filter.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Acked by: Yotam Gigi <yotamg@mellanox.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
tc/f_matchall.c

index 04e524e3bf2fa2bec6ce384877694b1e2a5b36ef..ac4863083767da7f0840d08efd3e1605d49a9869 100644 (file)
@@ -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]);