浏览代码

net: sched: introduce helper to identify gact pass action

Introduce a helper called is_tcf_gact_pass which could be used to
tell if the action is gact pass or not.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Pirko 8 年之前
父节点
当前提交
3b8e9238a8
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      include/net/tc_act/tc_gact.h

+ 5 - 0
include/net/tc_act/tc_gact.h

@@ -33,6 +33,11 @@ static inline bool __is_tcf_gact_act(const struct tc_action *a, int act,
 	return false;
 	return false;
 }
 }
 
 
+static inline bool is_tcf_gact_ok(const struct tc_action *a)
+{
+	return __is_tcf_gact_act(a, TC_ACT_OK, false);
+}
+
 static inline bool is_tcf_gact_shot(const struct tc_action *a)
 static inline bool is_tcf_gact_shot(const struct tc_action *a)
 {
 {
 	return __is_tcf_gact_act(a, TC_ACT_SHOT, false);
 	return __is_tcf_gact_act(a, TC_ACT_SHOT, false);