aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/pkt_cls.h
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2017-02-16 10:31:12 +0200
committerDavid S. Miller <davem@davemloft.net>2017-02-17 12:08:05 -0500
commite696028acc458aa3d43ad899371a963eb28336d8 (patch)
tree911d2bf43bf5a169f7c350ed2492c0b4e88fd473 /include/uapi/linux/pkt_cls.h
parentnet/sched: cls_matchall: Dump the classifier flags (diff)
downloadlinux-dev-e696028acc458aa3d43ad899371a963eb28336d8.tar.xz
linux-dev-e696028acc458aa3d43ad899371a963eb28336d8.zip
net/sched: Reflect HW offload status
Currently there is no way of querying whether a filter is offloaded to HW or not when using "both" policy (where none of skip_sw or skip_hw flags are set by user-space). Add two new flags, "in hw" and "not in hw" such that user space can determine if a filter is actually offloaded to hw or not. The "in hw" UAPI semantics was chosen so it's similar to the "skip hw" flag logic. If none of these two flags are set, this signals running over older kernel. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Reviewed-by: Amir Vadai <amir@vadai.me> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/pkt_cls.h')
-rw-r--r--include/uapi/linux/pkt_cls.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h
index 345551e71410..7a69f2a4ca0c 100644
--- a/include/uapi/linux/pkt_cls.h
+++ b/include/uapi/linux/pkt_cls.h
@@ -103,8 +103,10 @@ enum {
#define TCA_POLICE_MAX (__TCA_POLICE_MAX - 1)
/* tca flags definitions */
-#define TCA_CLS_FLAGS_SKIP_HW (1 << 0)
-#define TCA_CLS_FLAGS_SKIP_SW (1 << 1)
+#define TCA_CLS_FLAGS_SKIP_HW (1 << 0) /* don't offload filter to HW */
+#define TCA_CLS_FLAGS_SKIP_SW (1 << 1) /* don't use filter in SW */
+#define TCA_CLS_FLAGS_IN_HW (1 << 2) /* filter is offloaded to HW */
+#define TCA_CLS_FLAGS_NOT_IN_HW (1 << 3) /* filter isn't offloaded to HW */
/* U32 filters */