On 31.12.2019 21:14, Flavio Leitner 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 3 patches are not really part of TSO support, but they are > required to make sure everything works. > > The TSO is enabled in the vhost-user ports in client mode and linux ports > in userspace. > > This patchset is based on branch dpdk-latest (v19.11 required). > > There are good improvements sending to or receiving from veth pairs or > tap devices as well. > > 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 | 89 ++++++++ > NEWS | 1 + > lib/automake.mk | 2 + > lib/conntrack.c | 29 ++- > lib/dp-packet.c | 4 +- > lib/dp-packet.h | 160 +++++++++++++- > lib/ipf.c | 32 +-- > lib/netdev-dpdk.c | 317 ++++++++++++++++++++++++---- > lib/netdev-linux-private.h | 4 + > lib/netdev-linux.c | 295 +++++++++++++++++++++++--- > lib/netdev-provider.h | 10 + > lib/netdev.c | 52 ++++- > lib/tso.c | 54 +++++ > lib/tso.h | 23 ++ > vswitchd/bridge.c | 2 + > vswitchd/vswitch.xml | 12 ++ > 18 files changed, 997 insertions(+), 91 deletions(-) > create mode 100644 Documentation/topics/dpdk/tso.rst > create mode 100644 lib/tso.c > create mode 100644 lib/tso.h >
Hi, Flavio. I didn't look through the code yet, but since you're probably preparing v3 based on review from Ian, please, fix sparse issues too. It complains about types for virtio header: https://travis-ci.org/ovsrobot/ovs/jobs/631404835 lib/netdev-linux.c:6399:23: error: incorrect type in assignment (different base types) lib/netdev-linux.c:6399:23: expected restricted __virtio16 [usertype] hdr_len lib/netdev-linux.c:6399:23: got long lib/netdev-linux.c:6400:23: error: bad assignment (+=) to restricted __virtio16 lib/netdev-linux.c:6401:36: error: restricted __virtio16 degrades to integer lib/netdev-linux.c:6401:24: error: incorrect type in assignment (different base types) lib/netdev-linux.c:6401:24: expected restricted __virtio16 [usertype] gso_size lib/netdev-linux.c:6401:24: got int lib/netdev-linux.c:6414:26: error: incorrect type in assignment (different base types) lib/netdev-linux.c:6414:26: expected restricted __virtio16 [usertype] csum_start lib/netdev-linux.c:6414:26: got long lib/netdev-linux.c:6417:31: error: incorrect type in assignment (different base types) lib/netdev-linux.c:6417:31: expected restricted __virtio16 [usertype] csum_offset lib/netdev-linux.c:6417:31: got unsigned long lib/netdev-linux.c:6420:31: error: incorrect type in assignment (different base types) lib/netdev-linux.c:6420:31: expected restricted __virtio16 [usertype] csum_offset lib/netdev-linux.c:6420:31: got unsigned long lib/netdev-linux.c:6423:31: error: incorrect type in assignment (different base types) lib/netdev-linux.c:6423:31: expected restricted __virtio16 [usertype] csum_offset lib/netdev-linux.c:6423:31: got unsigned long Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
