numam-dpdk/examples
David Marchand ca7036b4af vhost: fix offload flags in Rx path
The vhost library currently configures Tx offloading (PKT_TX_*) on any
packet received from a guest virtio device which asks for some offloading.

This is problematic, as Tx offloading is something that the application
must ask for: the application needs to configure devices
to support every used offloads (ip, tcp checksumming, tso..), and the
various l2/l3/l4 lengths must be set following any processing that
happened in the application itself.

On the other hand, the received packets are not marked wrt current
packet l3/l4 checksumming info.

Copy virtio rx processing to fix those offload flags with some
differences:
- accept VIRTIO_NET_HDR_GSO_ECN and VIRTIO_NET_HDR_GSO_UDP,
- ignore anything but the VIRTIO_NET_HDR_F_NEEDS_CSUM flag (to comply with
  the virtio spec),

Some applications might rely on the current behavior, so it is left
untouched by default.
A new RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS flag is added to enable the
new behavior.

The vhost example has been updated for the new behavior: TSO is applied to
any packet marked LRO.

Fixes: 859b480d5a ("vhost: add guest offload setting")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2021-05-04 10:22:17 +02:00
..
bbdev_app examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
bond examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
bpf examples: remove old build system references 2020-09-07 23:51:57 +02:00
cmdline examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
distributor examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
ethtool examples/ethtool: remove unused parsing 2021-04-21 20:28:54 +02:00
eventdev_pipeline examples: reduce indentation in build files 2021-04-21 14:04:09 +02:00
fips_validation examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
flow_classify examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
flow_filtering examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
helloworld examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
ioat raw/ioat: report status of completed jobs 2021-05-04 17:43:50 +02:00
ip_fragmentation examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
ip_pipeline examples: reduce indentation in build files 2021-04-21 14:04:09 +02:00
ip_reassembly examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
ipsec-secgw examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
ipv4_multicast examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
kni examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
l2fwd examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
l2fwd-cat examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
l2fwd-crypto examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
l2fwd-event examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
l2fwd-jobstats examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
l2fwd-keepalive examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
l3fwd build: fix formatting of Meson lists 2021-05-04 15:01:47 +02:00
l3fwd-acl examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
l3fwd-graph examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
l3fwd-power examples: reduce indentation in build files 2021-04-21 14:04:09 +02:00
link_status_interrupt examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
multi_process build: fix formatting of Meson lists 2021-05-04 15:01:47 +02:00
ntb examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
packet_ordering examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
performance-thread examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
pipeline examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
ptpclient examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
qos_meter examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
qos_sched examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
rxtx_callbacks examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
server_node_efd examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
service_cores examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
skeleton examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
timer examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
vdpa examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
vhost vhost: fix offload flags in Rx path 2021-05-04 10:22:17 +02:00
vhost_blk examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
vhost_crypto examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
vm_power_manager examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
vmdq examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
vmdq_dcb examples: add eal cleanup to examples 2021-04-21 20:21:25 +02:00
meson.build examples: reduce indentation in build files 2021-04-21 14:04:09 +02:00