]> git.droids-corp.org - dpdk.git/commit
vhost: fix missing enqueue pseudo-header calculation
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Wed, 8 Jun 2022 12:49:42 +0000 (14:49 +0200)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 17 Jun 2022 12:41:04 +0000 (14:41 +0200)
commit7316b4fd610fe945a0bc20054ba5ab61b98bb155
tree876b074d305a79d7c37f42bae12c3a354f121b8c
parent9b4ea7ae77faa8f8aba8c7510c821f75d7863b16
vhost: fix missing enqueue pseudo-header calculation

The Virtio specification requires that in case of checksum
offloading, the pseudo-header checksum must be set in the
L4 header.

When received from another Vhost-user port, the packet
checksum might already contain the pseudo-header checksum
but we have no way to know it. So we have no other choice
than doing the pseudo-header checksum systematically.

This patch handles this using the rte_net_intel_cksum_prepare()
helper.

Fixes: 859b480d5afd ("vhost: add guest offload setting")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
lib/vhost/virtio_net.c