Hi Wenwu,
On 6/6/22 11:44, Ma, WenwuX wrote:
-----Original Message-----
From: Maxime Coquelin <maxime.coque...@redhat.com>
Sent: 2022年6月2日 17:07
To: Ma, WenwuX <wenwux...@intel.com>; dev@dpdk.org;
jasow...@redhat.com; Xia, Chenbo <chenbo....@intel.com>;
david.march...@redhat.com; Matz, Olivier <olivier.m...@6wind.com>
Cc: sta...@dpdk.org
Subject: Re: [PATCH 6/6] net/vhost: perform SW checksum in Tx path
Hi Wenwu,
Sorry, I missed your review.
On 5/7/22 05:20, Ma, WenwuX wrote:
-----Original Message-----
From: Maxime Coquelin <maxime.coque...@redhat.com>
Sent: 2022年5月5日 18:27
To: dev@dpdk.org; jasow...@redhat.com; Xia, Chenbo
<chenbo....@intel.com>; david.march...@redhat.com;
olivier.m...@6wind.com
Cc: sta...@dpdk.org; Maxime Coquelin <maxime.coque...@redhat.com>
Subject: [PATCH 6/6] 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 advertizes 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 knwo whether it
was
done before.
This patch does not advertize SCTP checksum offloading capability for
now, but it could be handled later if the need arises.
In virtio_enqueue_offload(), if RTE_MBUF_F_TX_IP_CKSUM is set, we will
performs the L3 Tx checksum, why do not we advertise IPV4 checksum
offloading capability?
Will we advertise it later?
Indeed, we have an IPv4 SW checksum fallback in Vhost library.
We could think about adding the capability, but that's not urgent I think. Do
you have a use-case where it is needed?
The GRO/GSO library doesn't re-calculate IPv4 checksums for merged/fragmented
packets, it will cause iperf in the vm to fail.
Can you please elaborate?
If we don't expose the IPv4 checksum availability, it would be done by
the application using the Vhost PMD, so the result will be the same from
the VM point of view. Am I missing something?
Thanks,
Maxime
Regards,
Maxime