[PATCH v2 5/6] net/vhost: perform SW checksum in Rx path

Jiang, Cheng1 cheng1.jiang at intel.com
Fri Jun 10 09:19:10 CEST 2022


Hi Maxime,

> -----Original Message-----
> From: Xia, Chenbo <chenbo.xia at intel.com>
> Sent: Friday, June 10, 2022 11:49 AM
> To: Maxime Coquelin <maxime.coquelin at redhat.com>; dev at dpdk.org;
> jasowang at redhat.com; david.marchand at redhat.com; Matz, Olivier
> <olivier.matz at 6wind.com>; Ma, WenwuX <wenwux.ma at intel.com>; Zhang,
> Yuying <yuying.zhang at intel.com>; Singh, Aman Deep
> <aman.deep.singh at intel.com>; Jiang, Cheng1 <cheng1.jiang at intel.com>
> Subject: RE: [PATCH v2 5/6] net/vhost: perform SW checksum in Rx path
> 
> + Cheng for review
> 
> > -----Original Message-----
> > From: Maxime Coquelin <maxime.coquelin at redhat.com>
> > Sent: Wednesday, June 8, 2022 8:50 PM
> > To: dev at dpdk.org; jasowang at redhat.com; Xia, Chenbo
> > <chenbo.xia at intel.com>; david.marchand at redhat.com; Matz, Olivier
> > <olivier.matz at 6wind.com>; Ma, WenwuX <wenwux.ma at intel.com>;
> Zhang,
> > Yuying <yuying.zhang at intel.com>; Singh, Aman Deep
> > <aman.deep.singh at intel.com>
> > Cc: Maxime Coquelin <maxime.coquelin at redhat.com>
> > Subject: [PATCH v2 5/6] net/vhost: perform SW checksum in Rx path
> >
> > Virtio specification supports host checksum offloading for L4, which
> > is enabled with VIRTIO_NET_F_CSUM feature negotiation. However, the
> > Vhost PMD does not advertise Rx checksum offload capabilities, so we
> > can end-up with the VIRTIO_NET_F_CSUM feature being negotiated,
> > implying the Vhost library returns packets with checksum being
> > offloaded while the application did not request for it.
> >
> > Advertising these offload capabilities at the ethdev level is not
> > enough, because we could still end-up with the application not
> > enabling these offloads while the guest still negotiate them.
> >
> > This patch advertises the Rx checksum offload capabilities, and
> > introduces a compatibility layer to cover the case VIRTIO_NET_F_CSUM
> > has been negotiated but the application does not configure the Rx
> > checksum offloads. This function performis the L4 Rx checksum in SW
> > for UDP and TCP. Note that it is not needed to calculate the
> > pseudo-header checksum, because the Virtio specification requires that
> > the driver do it.
> >
> > 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 at redhat.com>
> > Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> > ---
> >

Reviewed-by: Cheng Jiang <cheng1.jiang at intel.com>


More information about the dev mailing list