[ovs-dev] [PATCH v4 0/3] Add support for TSO with DPDK

Flavio Leitner fbl at sysclose.org
Wed Jan 22 08:26:31 UTC 2020


On Tue, Jan 21, 2020 at 10:39:14AM -0800, William Tu wrote:
> On Thu, Jan 16, 2020 at 9:01 AM Flavio Leitner <fbl at sysclose.org> wrote:
> >
> > 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 2 patches are not really part of TSO support, but they are
> > required to make sure everything works.
> >
> > There are good improvements sending to or receiving from veth pairs or
> > tap devices as well. See the iperf3 results below:
> >
> > [*] veth with ethtool tx off.
> >
> 
> Hi Flavio,
> 
> I want to test performance of namespace to namespace using veth, hoping to
> see TSO packets. Using below setup:
>   iperf -c (ns0) -> veth peer -> OVS -> veth peer -> iperf -s (ns1)
> 
> With current master I'm not able to see large packet size being sent.
> I compile ovs with --with-dpdk and,
> $ ovs-vsctl set Open_vSwitch . other_config:userspace-tso-enable=true
> 
> At ns0 and ns1, enable tso by ethtool sg and tso on
> The veth driver shows
> # ip netns exec at_ns0 ethtool -k p0
> Features for p0:
> Cannot get device udp-fragmentation-offload settings: Operation not supported
> rx-checksumming: on
> tx-checksumming: off
^^^^^^^^^^^^^^^^^^^^^

That disables TSO. We had to do '[*] veth with ethtool tx off'
before TSO is supported exactly to avoid the large packets to
be able to run iperf3 tests, etc...

You must leave tx on (default) to enable TSO in veth pairs.

HTH,
fbl


More information about the dev mailing list