[dpdk-dev] [PATCH 5/8] driver/virtio:enqueue vhost TX offload

David Marchand david.marchand at 6wind.com
Fri Oct 30 13:14:58 CET 2015


On Fri, Oct 30, 2015 at 12:45 PM, Liu, Jijiang <jijiang.liu at intel.com>
wrote:

>
> If the driver correctly reports negotiated offload capabilities (see my
> previous comment on patch 3), there is no need for the test on
> VIRTIO_NET_F_CSUM, because application is not supposed to ask for offloads
> on driver that do not support them.
>
>
>
>
>
> > If the driver correctly reports negotiated offload capabilities, then
> application in guest will set the ol_flags in mbuf based on these offload
> capabilities.
>
> If the VIRTIO_NET_F_CSUM is not enabled, and there is no need to call
> virtqueue_enqueue_offload() to check ol_flags in mbuf to see if the TX
> checksum and TSO is set ,and it will  not effect on the performance of
> disabling TX checksum path as much as possible.
>
> So I think there is need for the check.
>

You are supposed to only handle mbuf with offloads if VIRTIO_NET_F_CSUM was
enabled in the first place through the capabilities.
So looking at ol_flags means that you implicitely check for
VIRTIO_NET_F_CSUM.
This is just an optimisation, so do as you like.

Anyway, I just want to confirm, is this patchset for 2.2 ?


-- 
David Marchand


More information about the dev mailing list