numam-dpdk/doc/guides/prog_guide
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
..
img hash: add predictable RSS 2021-04-20 23:13:23 +02:00
bbdev.rst doc: update bbdev guide 2020-10-14 21:32:11 +02:00
bpf_lib.rst
build_app.rst build: remove makefiles 2020-09-08 00:09:50 +02:00
build-sdk-meson.rst doc: add links for build requirements per OS 2021-04-17 12:37:38 +02:00
compressdev.rst eal: replace blacklist/whitelist options 2020-11-16 00:11:22 +01:00
cryptodev_lib.rst cryptodev: add enqueue and dequeue callbacks 2021-01-19 18:05:44 +01:00
efd_lib.rst
env_abstraction_layer.rst eal: replace blacklist/whitelist options 2020-11-16 00:11:22 +01:00
event_crypto_adapter.rst eventdev: introduce crypto adapter enqueue API 2021-04-17 18:49:52 +02:00
event_ethernet_rx_adapter.rst eventdev: support Rx adapter event vector 2021-04-12 09:23:34 +02:00
event_ethernet_tx_adapter.rst eventdev: introduce event vector Tx capability 2021-04-12 09:23:34 +02:00
event_timer_adapter.rst lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
eventdev.rst eventdev: introduce event vector capability 2021-04-12 09:23:34 +02:00
flow_classify_lib.rst
generic_receive_offload_lib.rst gro: support VXLAN UDP/IPv4 2020-10-06 21:51:03 +02:00
generic_segmentation_offload_lib.rst gso: support VXLAN UDP/IPv4 2021-01-15 11:31:28 +01:00
glossary.rst eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
graph_lib.rst doc: fix figure numbering in graph guide 2021-01-15 12:28:19 +01:00
hash_lib.rst hash: implement RCU resources reclamation 2020-10-24 09:25:13 +02:00
index.rst doc: add Toeplitz hash guide 2021-04-20 23:12:47 +02:00
intro.rst build: remove makefiles 2020-09-08 00:09:50 +02:00
ip_fragment_reassembly_lib.rst doc: remove references to make from prog guide 2020-10-01 16:51:24 +02:00
ipsec_lib.rst
kernel_nic_interface.rst doc: fix typo in KNI guide 2020-11-04 21:08:30 +01:00
link_bonding_poll_mode_drv_lib.rst doc: fix driver names 2020-11-03 16:23:03 +01:00
lpm6_lib.rst
lpm_lib.rst
lto.rst doc: remove references to make from prog guide 2020-10-01 16:51:24 +02:00
mbuf_lib.rst doc: remove references to make from prog guide 2020-10-01 16:51:24 +02:00
member_lib.rst
mempool_lib.rst doc: add stack mempool guide 2020-10-08 09:34:58 +02:00
meson_ut.rst
metrics_lib.rst metrics: add function to deinitialise library 2019-07-16 12:45:30 +02:00
multi_proc_support.rst doc: fix grammar 2020-11-26 16:03:16 +01:00
overview.rst build: remove makefiles 2020-09-08 00:09:50 +02:00
packet_classif_access_ctrl.rst acl: check max SIMD bitwidth 2020-10-19 16:45:02 +02:00
packet_distrib_lib.rst
packet_framework.rst doc: describe the SWX pipeline type 2020-11-13 13:55:07 +01:00
pdump_lib.rst doc: clarify multi-process roles for pdump 2020-11-26 16:32:11 +01:00
perf_opt_guidelines.rst
poll_mode_drv.rst ethdev: support PF index in representor 2021-03-16 20:15:29 +01:00
power_man.rst power: add ethdev power management 2021-01-29 15:29:48 +01:00
profile_app.rst doc: add vtune profiling config to prog guide 2021-01-13 21:25:13 +01:00
qos_framework.rst lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rawdev.rst lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rcu_lib.rst doc: remove references to make from prog guide 2020-10-01 16:51:24 +02:00
regexdev.rst eal: replace blacklist/whitelist options 2020-11-16 00:11:22 +01:00
reorder_lib.rst
ring_lib.rst ring: add zero copy API 2020-10-29 14:13:31 +01:00
rte_flow.rst ethdev: add pre-defined meter policy API 2021-04-21 12:22:17 +02:00
rte_security.rst security: switch metadata to dynamic mbuf field 2020-10-31 16:13:11 +01:00
service_cores.rst
source_org.rst doc: fix driver names 2020-11-03 16:23:03 +01:00
stack_lib.rst doc: add stack mempool guide 2020-10-08 09:34:58 +02:00
switch_representation.rst ethdev: support sub-function representor 2021-03-16 20:15:29 +01:00
telemetry_lib.rst doc: add more detail to telemetry guides 2020-07-30 20:32:49 +02:00
thread_safety_dpdk_functions.rst doc: fix reference to master process 2020-08-07 13:02:04 +02:00
timer_lib.rst
toeplitz_hash_lib.rst hash: add predictable RSS 2021-04-20 23:13:23 +02:00
trace_lib.rst doc: remove references to make from prog guide 2020-10-01 16:51:24 +02:00
traffic_management.rst
traffic_metering_and_policing.rst ethdev: add pre-defined meter policy API 2021-04-21 12:22:17 +02:00
vhost_lib.rst vhost: fix offload flags in Rx path 2021-05-04 10:22:17 +02:00
writing_efficient_code.rst doc: remove references to make from prog guide 2020-10-01 16:51:24 +02:00