[ovs-git] [openvswitch/ovs] f3ad56: dpif-netdev: Expand the meter capacity.

kevintraynor noreply at github.com
Thu Jun 24 20:12:56 UTC 2021


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: f3ad560d5f1866870341d0f052b499aa0f84a672
      https://github.com/openvswitch/ovs/commit/f3ad560d5f1866870341d0f052b499aa0f84a672
  Author: Tonghao Zhang <xiangxia.m.yue at gmail.com>
  Date:   2021-06-24 (Thu, 24 Jun 2021)

  Changed paths:
    M NEWS
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Expand the meter capacity.

For now, ovs-vswitchd use the array of the dp_meter struct
to store meter's data, and at most, there are only 65536
(defined by MAX_METERS) meters that can be used. But in some
case, for example, in the edge gateway, we should use 200,000+,
at least, meters for IP address bandwidth limitation.
Every one IP address will use two meters for its rx and tx
path[1]. In other way, ovs-vswitchd should support meter-offload
(rte_mtr_xxx api introduced by dpdk.), but there are more than
65536 meters in the hardware, such as Mellanox ConnectX-6.

This patch use cmap to manage the meter, instead of the array.

* Insertion performance, ovs-ofctl add-meter 1000+ meters,
  the cmap takes about 4000ms, as same as previous implementation.
* Lookup performance in datapath, we add 1000+ meters which rate limit
  are 10Gbps (the NIC cards are 10Gbps, so netdev-datapath will not
  drop the packets.), and a flow which only forward packets from p0
  to p1, with meter action[2]. On other machine, pktgen-dpdk will
  generate 64B packets to p0.

  The forwarding performance always is 1324 Kpps on my server
  which CPU is Intel E5-2650, 2.00GHz.

[1].
$ in_port=p0,ip,ip_dst=1.1.1.x action=meter:n,output:p1
$ in_port=p1,ip,ip_src=1.1.1.x action=meter:m,output:p0

[2].
$ in_port=p0 action=meter:100,output:p1

Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 833f1b843d2681a345bfe428420304ccf5572e56
      https://github.com/openvswitch/ovs/commit/833f1b843d2681a345bfe428420304ccf5572e56
  Author: Kevin Traynor <ktraynor at redhat.com>
  Date:   2021-06-24 (Thu, 24 Jun 2021)

  Changed paths:
    M tests/pmd.at

  Log Message:
  -----------
  pmd.at: Get next line number of log.

Some tests get the current log line number so they can check that
there is a new occurrence of a log entry after a command.

'tail' uses the line number as the starting line number. However,
this will include the last line of the log before the command.

To prevent any races on logs and possibly checking an existing log
entry prior to a command here or in reuse of this method, get the
next line number of the log and use that as the starting line for tail.

Suggested-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: f0e4a7338c622bf4824aa2cf978bd24478951ddf
      https://github.com/openvswitch/ovs/commit/f0e4a7338c622bf4824aa2cf978bd24478951ddf
  Author: Kevin Traynor <ktraynor at redhat.com>
  Date:   2021-06-24 (Thu, 24 Jun 2021)

  Changed paths:
    A tests/alb.at
    M tests/automake.mk
    M tests/testsuite.at

  Log Message:
  -----------
  tests: Add PMD auto load balance unit tests.

These tests focus on enabling/disabling and user parameters.

Co-Authored-by: David Marchand <david.marchand at redhat.com>
Signed-off-by: David Marchand <david.marchand at redhat.com>
Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
Acked-by: Sunil Pai G <sunil.pai.g at intel.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/bd9052455092...f0e4a7338c62


More information about the git mailing list