summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorBaowen Zheng <baowen.zheng@corigine.com>2022-09-30 14:07:56 +0800
committerSimon Horman <simon.horman@corigine.com>2022-11-01 10:18:16 +0100
commitffcb6f115fe5e00be3ca8fb9a940a3224e687e23 (patch)
tree2aeb478eabd799933e30218adfee15698d8bca70 /acinclude.m4
parent743499607bdd0dcb3541a179ba2bb41ea10c4b3b (diff)
downloadopenvswitch-ffcb6f115fe5e00be3ca8fb9a940a3224e687e23.tar.gz
netdev-linux: Allow meter to work in tc software datapath when tc-policy is specified
Add tc action flags when adding police action to offload meter table. There is a restriction that the flag of skip_sw/skip_hw should be same for filter rule and the independent created tc actions the rule uses. In this case, if we configure the tc-policy as skip_hw, filter rule will be created with skip_hw flag and the police action according to meter table will have no action flag, then flower rule will fail to add to tc kernel system. To fix this issue, we will add tc action flag when adding police action to offload a meter table, so it will allow meter table to work in tc software datapath. Fixes: 5c039ddc64ff ("netdev-linux: Add functions to manipulate tc police action") Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com> Acked-by: Ilya Maximets <i.maximets@ovn.org> Signed-off-by: Simon Horman <simon.horman@corigine.com>
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m46
1 files changed, 3 insertions, 3 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index ad07989ac..aa9af5506 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -163,10 +163,10 @@ dnl Configure Linux tc compat.
AC_DEFUN([OVS_CHECK_LINUX_TC], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([#include <linux/pkt_cls.h>], [
- int x = TCA_POLICE_PKTRATE64;
+ int x = TCA_ACT_FLAGS_SKIP_HW;
])],
- [AC_DEFINE([HAVE_TCA_POLICE_PKTRATE64], [1],
- [Define to 1 if TCA_POLICE_PKTRATE64 is available.])])
+ [AC_DEFINE([HAVE_TCA_ACT_FLAGS_SKIP_HW], [1],
+ [Define to 1 if TCA_ACT_FLAGS_SKIP_HW is available.])])
AC_CHECK_MEMBERS([struct tcf_t.firstuse], [], [], [#include <linux/pkt_cls.h>])