Following a bug report about vhost-user port traffic with a vxlan tunnel
being dropped, I relooked at the offloading code to see how we could
switch to the non legacy offload flags mode in the vhost-user libary.

As I dug into this, and with Ilya recent comment (on switching to an
inner offload API) in mind, I wrote this series.

The result seems promising in terms of code.
I did no extensive performance testing yet, but I would expect either
similar performance (or maybe better performance for non offloaded
traffic, as a number of branches are removed in the flow extraction
code).


Mike recently posted a patch for removing the csum_start/csum_offset
netdev-linux for which I also had a patch, but since it had some
implications on the handling of inner checksums, I ended up including my
version for now.


There is still one extra step that is left for a future revision:
eliminate last if (tunnel) in miniflow_extract().


Comments?


-- 
David Marchand

Changes since v5:
- reused parse_tcp_flags() in netdev-linux.c instead of custom parsing,

Changes since v4:
- rebased,
- added one optimisation for basic v2v performance,

Changes since v3:
- moved testing on L4 partial status earlier in the series,
- added intermediate fix (and unit test) on parse_tcp_flags(),

Changes since v2:
- fixed (non DPDK) build between patches,

Changes since v1:
- added coverage for IP/L4 checksums,
- fixed existing problems in conntrack, ipf and netdev-native-tnl
  checksum validations and added coverage,
- fixed packet_expand IP checksum,
- fixed tunnel decapsulation L3/L4 checksum validation,
- fixed ipf checksum L3 validation,
- added checksum resolution in conntrack, ipf and tunnel decapsulation,

David Marchand (12):
  dp-packet: Remove Linux specific L4 offloads.
  dp-packet: Remove DPDK specific IP version.
  dp-packet: Add OVS offloading API.
  dp-packet: Expand offloads preparation helper.
  dp-packet: Rework tunnel offloads.
  dp-packet: Rework IP checksum offloads.
  dp-packet: Rework L4 checksum offloads.
  dp-packet: Resolve unknown checksums.
  dp-packet: Rework TCP segmentation.
  dp-packet: Remove direct access to DPDK offloads.
  netdev-dpdk: Stop relying on vhost-user Tx flags.
  netdev-dpdk: Adjust IPv4 checksum capability for vhost-user.

 .../topics/userspace-checksum-offloading.rst  |  31 +-
 lib/conntrack.c                               | 124 ++--
 lib/dp-packet-gso.c                           |  52 +-
 lib/dp-packet.c                               | 132 ++--
 lib/dp-packet.h                               | 697 +++++++-----------
 lib/dpif-netdev-extract-avx512.c              |  62 +-
 lib/flow.c                                    |  81 +-
 lib/ipf.c                                     |  17 +-
 lib/netdev-dpdk.c                             | 189 +++--
 lib/netdev-dummy.c                            |  77 +-
 lib/netdev-linux.c                            | 157 ++--
 lib/netdev-native-tnl.c                       | 117 ++-
 lib/netdev.c                                  |  24 +-
 lib/odp-execute-avx512.c                      |  20 +-
 lib/odp-execute.c                             |   8 +-
 lib/packets.c                                 |  95 ++-
 tests/dpif-netdev.at                          |  73 ++
 tests/tunnel-push-pop.at                      |  21 +-
 18 files changed, 903 insertions(+), 1074 deletions(-)

-- 
2.49.0

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to