[ovs-git] [openvswitch/ovs] c2567e: add port-based ingress policing based packet-per-s...

Tianyu Yuan noreply at github.com
Thu Jul 1 19:15:34 UTC 2021


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: c2567e533f8a83cf705f008c4a6688e457d8f756
      https://github.com/openvswitch/ovs/commit/c2567e533f8a83cf705f008c4a6688e457d8f756
  Author: Yong Xu <yong.xu at corigine.com>
  Date:   2021-07-01 (Thu, 01 Jul 2021)

  Changed paths:
    M acinclude.m4
    M include/linux/pkt_cls.h
    M lib/netdev-dpdk.c
    M lib/netdev-linux-private.h
    M lib/netdev-linux.c
    M lib/netdev-provider.h
    M lib/netdev.c
    M lib/netdev.h
    M vswitchd/bridge.c
    M vswitchd/vswitch.ovsschema
    M vswitchd/vswitch.xml

  Log Message:
  -----------
  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 at corigine.com>
Signed-off-by: Simon Horman <simon.horman at netronome.com>


  Commit: f686957c9667ae962fb8fc003be2a5482e380d75
      https://github.com/openvswitch/ovs/commit/f686957c9667ae962fb8fc003be2a5482e380d75
  Author: Tianyu Yuan <tianyu.yuan at corigine.com>
  Date:   2021-07-01 (Thu, 01 Jul 2021)

  Changed paths:
    M tests/atlocal.in
    M tests/ovs-vsctl.at
    M tests/system-offloads-traffic.at

  Log Message:
  -----------
  add test cases for ingress_policing_kpkts parameters

Exercise OVS setting of ingress_policing_kpkts parameters using ovs-vsctl
and verify that the correct values are stored on OVSDB.

Verify the ingress_policing parameters with tc command. Also check offload
and non-offload in tc software datapath based on tc filter type (matchall
and basic).  Skip test of pps if OVS or kernel does not support pps rate
limit.

Example invocation:
make check TESTSUITEFLAGS='-k ingress_policing_kpkts'
make check-offloads TESTSUITEFLAGS='-k ingress_policing_kpkts'

Signed-off-by: Tianyu Yuan <tianyu.yuan at corigine.com>
Signed-off-by: Simon Horman <simon.horman at netronome.com>


Compare: https://github.com/openvswitch/ovs/compare/b6c5f30cfa99...f686957c9667


More information about the git mailing list