numam-dpdk/drivers/net/vhost
Maxime Coquelin 8ba1723783 net/vhost: perform SW checksum in Tx path
Virtio specification supports guest checksum offloading
for L4, which is enabled with VIRTIO_NET_F_GUEST_CSUM
feature negotiation. However, the Vhost PMD does not
advertise Tx checksum offload capabilities.

Advertising these offload capabilities at the ethdev level
is not enough, because we could still end-up with the
application enabling these offloads while the guest not
negotiating it.

This patch advertises the Tx checksum offload capabilities,
and introduces a compatibility layer to cover the case
VIRTIO_NET_F_GUEST_CSUM has not been negotiated but the
application does configure the Tx checksum offloads. This
function performs the L4 Tx checksum in SW for UDP and TCP.
Compared to Rx SW checksum, the Tx SW checksum function
needs to compute the pseudo-header checksum, as we cannot
know whether it was done before.

This patch does not advertise SCTP checksum offloading
capability for now, but it could be handled later if the
need arises.

Reported-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Cheng Jiang <cheng1.jiang@intel.com>
2022-06-17 14:41:04 +02:00
..
meson.build build: remove custom dependency checks in drivers 2022-01-21 15:40:58 +01:00
rte_eth_vhost.c net/vhost: perform SW checksum in Tx path 2022-06-17 14:41:04 +02:00
rte_eth_vhost.h net/vhost: update license to SPDX format 2018-04-27 15:54:56 +01:00
version.map version: 21.11-rc0 2021-08-17 08:37:52 +02:00