> 
> Abbreviated as TSO, TCP Segmentation Offload is a feature which enables
> the network stack to delegate the TCP segmentation to the NIC reducing
> the per packet CPU overhead.
> 
> A guest using vhost-user interface with TSO enabled can send TCP packets
> much bigger than the MTU, which saves CPU cycles normally used to break
> the packets down to MTU size and to calculate checksums.
> 
> It also saves CPU cycles used to parse multiple packets/headers during
> the packet processing inside virtual switch.
> 
> If the destination of the packet is another guest in the same host, then
> the same big packet can be sent through a vhost-user interface skipping
> the segmentation completely. However, if the destination is not local,
> the NIC hardware is instructed to do the TCP segmentation and checksum
> calculation.
> 
> The first 3 patches are not really part of TSO support, but they are
> required to make sure everything works.
> 
> The TSO is only enabled in the vhost-user ports in client mode which
> means DPDK is required. The other ports (dpdk or linux) can receive
> those packets.
> 
> This patchset is based on branch dpdk-latest (v19.11 required).
> 
> The numbers look good and I noticed no regression so far. However, my
> environment is tuned but not well fined tuned, so consider those as
> ball park numbers only.
> 
> This is VM-to-external host (Gbits/sec)
>                | No patch  |  TSO off  |  TSO on
>               ---------------------------------------------
> TCPv4          |    10     |    10     |   38  (line rate)
> -----------------------------------------------------------
> TCPv6          |     9     |     9     |   38  (line rate)
> -----------------------------------------------------------
> V4 Conntrack   |     1     |     1     |   33
> 
> 
> This is VM-to-VM in the same host (Gbits/sec)
>                | No patch  |  TSO off  |  TSO on
>               ---------------------------------------------
> TCPv4          |     9.4   |    9.4    |   31
> -----------------------------------------------------------
> TCPv6          |     8     |    8      |   30
> -----------------------------------------------------------

Hi Flavio,

Thanks for the patch.
Similarly, my environment is not tuned but I'm measuring a decent improvement 
too.
(These results include your fixes on 
https://github.com/fleitner/ovs/tree/tso-v2-devel)
VM to external host: +71%
VM to VM: +154%

Note: TSO appears to be broken for some cases on i40e: 
https://bugs.dpdk.org/show_bug.cgi?id=373
So I've applied this patch to DPDK for my tests: 
https://github.com/Mic92/dpdk/commit/2dc9b8dd2c8e2eb71f216b5b9222a4deb57482c9

I've also tested on 82599ES however since we hit near line rate with TSO off, 
no significant improvement can be measured.

Thanks,
Ciara

> 
> There are good improvements sending to veth pairs or tap devices too.
> 
> Flavio Leitner (4):
>   dp-packet: preserve headroom when cloning a pkt batch
>   vhost: Disable multi-segmented buffers
>   dp-packet: handle new dpdk buffer flags
>   netdev-dpdk: Add TCP Segmentation Offload support
> 
>  Documentation/automake.mk           |   1 +
>  Documentation/topics/dpdk/index.rst |   1 +
>  Documentation/topics/dpdk/tso.rst   |  83 +++++++++++++++++++++
>  NEWS                                |   1 +
>  lib/automake.mk                     |   2 +
>  lib/dp-packet.c                     |  50 ++++++++++++-
>  lib/dp-packet.h                     |  38 ++++++++--
>  lib/netdev-bsd.c                    |   7 ++
>  lib/netdev-dpdk.c                   | 112 +++++++++++++++++++++++-----
>  lib/netdev-dummy.c                  |   7 ++
>  lib/netdev-linux.c                  |  71 ++++++++++++++++--
>  lib/tso.c                           |  54 ++++++++++++++
>  lib/tso.h                           |  23 ++++++
>  vswitchd/bridge.c                   |   2 +
>  vswitchd/vswitch.xml                |  14 ++++
>  15 files changed, 430 insertions(+), 36 deletions(-)
>  create mode 100644 Documentation/topics/dpdk/tso.rst
>  create mode 100644 lib/tso.c
>  create mode 100644 lib/tso.h
> 
> --
> 2.23.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to