summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorVlad Buslov <vladbu@mellanox.com>2019-11-04 18:34:49 +0200
committerSimon Horman <simon.horman@netronome.com>2019-11-11 14:42:52 +0100
commit292d5bd9bb344527e0da19433cf3e51f8a24058c (patch)
tree944a9c08109601c218322292e5bf149abc6b63c7 /acinclude.m4
parentc0a1df2e3f209fbf3c61b66a719b90e41636ef52 (diff)
downloadopenvswitch-292d5bd9bb344527e0da19433cf3e51f8a24058c.tar.gz
tc: Set 'no_percpu' flag for compatible actions
Recent changes in Linux kernel TC action subsystem introduced new TCA_ACT_FLAGS_NO_PERCPU_STATS flag. The purpose of the flag is to request action implementation to skip allocating action stats with expensive percpu allocator and use regular built-in action stats instead. Such approach significantly improves rule insertion rate and reduce memory usage for hardware-offloaded rules that don't need benefits provided by percpu allocated stats (improved software TC fast-path performance). Set the flag for all compatible actions. Modify acinclude.m4 to use OVS-internal pkt_cls.h implementation when TCA_ACT_FLAGS is not defined by kernel headers and to manually define struct nla_bitfield32 in netlink.h (new file) when it is not defined by kernel headers. Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Reviewed-by: Roi Dayan <roid@mellanox.com> Signed-off-by: Simon Horman <simon.horman@netronome.com>
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m418
1 files changed, 15 insertions, 3 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index bc5b1c667..fc6157ac8 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -174,16 +174,28 @@ AC_DEFUN([OVS_CHECK_LINUX], [
AM_CONDITIONAL(LINUX_ENABLED, test -n "$KBUILD")
])
+dnl OVS_CHECK_LINUX_NETLINK
+dnl
+dnl Configure Linux netlink compat.
+AC_DEFUN([OVS_CHECK_LINUX_NETLINK], [
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([#include <linux/netlink.h>], [
+ struct nla_bitfield32 x = { 0 };
+ ])],
+ [AC_DEFINE([HAVE_NLA_BITFIELD32], [1],
+ [Define to 1 if struct nla_bitfield32 is available.])])
+])
+
dnl OVS_CHECK_LINUX_TC
dnl
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_FLOWER_KEY_ENC_IP_TTL_MASK;
+ int x = TCA_ACT_FLAGS;
])],
- [AC_DEFINE([HAVE_TCA_FLOWER_KEY_ENC_IP_TTL_MASK], [1],
- [Define to 1 if TCA_FLOWER_KEY_ENC_IP_TTL_MASK is available.])])
+ [AC_DEFINE([HAVE_TCA_ACT_FLAGS], [1],
+ [Define to 1 if TCA_ACT_FLAGS is available.])])
AC_CHECK_MEMBERS([struct tcf_t.firstuse], [], [], [#include <linux/pkt_cls.h>])