[ovs-git] [openvswitch/ovs] b90189: socket-util: Introduce emulation and wrapper for r...

Yi Yang noreply at github.com
Thu Jan 9 17:51:09 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: b90189841f1a6f953e25ad784b824c6e29b48660
      https://github.com/openvswitch/ovs/commit/b90189841f1a6f953e25ad784b824c6e29b48660
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2020-01-09 (Thu, 09 Jan 2020)

  Changed paths:
    M include/sparse/sys/socket.h
    M lib/socket-util.c
    M lib/socket-util.h

  Log Message:
  -----------
  socket-util: Introduce emulation and wrapper for recvmmsg().

Not every system will have recvmmsg(), so introduce compatibility code
that will allow it to be used blindly from the rest of the tree.

This assumes that recvmmsg() and sendmmsg() are either both present or
both absent in system libraries and headers.

CC: Yi Yang <yangyi01 at inspur.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 2109841b798451230255c34d6724e17a6f075aa5
      https://github.com/openvswitch/ovs/commit/2109841b798451230255c34d6724e17a6f075aa5
  Author: Yi Yang <yangyi01 at inspur.com>
  Date:   2020-01-09 (Thu, 09 Jan 2020)

  Changed paths:
    M lib/netdev-linux.c

  Log Message:
  -----------
  Use batch process recv for tap and raw socket in netdev datapath

Current netdev_linux_rxq_recv_tap and netdev_linux_rxq_recv_sock
just receive single packet, that is very inefficient, per my test
case which adds two tap ports or veth ports into OVS bridge
(datapath_type=netdev) and use iperf3 to do performance test
between two ports (they are set into different network name space).

The result is as below:

  tap:  295 Mbits/sec
  veth: 207 Mbits/sec

After I change netdev_linux_rxq_recv_tap and
netdev_linux_rxq_recv_sock to use batch process, the performance
is boosted by about 7 times, here is the result:

  tap:  1.96 Gbits/sec
  veth: 1.47 Gbits/sec

Undoubtedly this is a huge improvement although it can't match
OVS kernel datapath yet.

FYI: here is thr result for OVS kernel datapath:

  tap:  37.2 Gbits/sec
  veth: 36.3 Gbits/sec

Note: performance result is highly related with your test machine,
you shouldn't expect the same results on your test machine.

Signed-off-by: Yi Yang <yangyi01 at inspur.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/b926f577aaf1...2109841b7984


More information about the git mailing list