summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorYong Xu <yong.xu@corigine.com>2021-06-09 11:52:08 +0200
committerSimon Horman <simon.horman@netronome.com>2021-07-01 20:44:07 +0200
commitc2567e533f8a83cf705f008c4a6688e457d8f756 (patch)
tree04eb38878e0256d727febcdaa7fc82e4cc5e306e /acinclude.m4
parentb6c5f30cfa9994a1069bc6bef28a270bbb61df6c (diff)
downloadopenvswitch-c2567e533f8a83cf705f008c4a6688e457d8f756.tar.gz
add port-based ingress policing based packet-per-second rate-limiting
OVS has support for using policing to enforce a rate limit in kilobits per second. This is configured using OVSDB. f.e. $ ovs-vsctl set interface tap0 ingress_policing_rate=1000 $ ovs-vsctl set interface tap0 ingress_policing_burst=100 This patch adds a related feature, allowing policing to enforce a rate limit in kilo-packets per second. This is also configured using OVSDB. $ ovs-vsctl set interface tap0 ingress_policing_kpkts_rate=1000 $ ovs-vsctl set interface tap0 ingress_policing_kpkts_burst=100 The kilo-bit and kilo-packet rate limits may be used separately or in combination. Add separate action for BPS and PPS in netlink message. Revise code and change action result to pipe to allow traffic pipe into second action. This patch implements the feature for: * OVSDB (northbound API) * TC policer when used both with and without TC offload (kernel API) Signed-off-by: Yong Xu <yong.xu@corigine.com> Signed-off-by: Simon Horman <simon.horman@netronome.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 15a54d636..18c52f63a 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -209,10 +209,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_FLOWER_KEY_CT_FLAGS_REPLY;
+ int x = TCA_POLICE_PKTRATE64;
])],
- [AC_DEFINE([HAVE_TCA_FLOWER_KEY_CT_FLAGS_REPLY], [1],
- [Define to 1 if TCA_FLOWER_KEY_CT_FLAGS_REPLY is available.])])
+ [AC_DEFINE([HAVE_TCA_POLICE_PKTRATE64], [1],
+ [Define to 1 if TCA_POLICE_PKTRATE64 is available.])])
AC_CHECK_MEMBERS([struct tcf_t.firstuse], [], [], [#include <linux/pkt_cls.h>])