[dpdk-dev] [PATCH] vhost: support Generic Segmentation Offload

Yuanhan Liu yliu at fridaylinux.org
Wed Dec 27 15:39:10 CET 2017


On Mon, Dec 25, 2017 at 01:53:29AM +0000, Yao, Lei A wrote:
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Jiayu Hu
> > Sent: Tuesday, November 28, 2017 1:29 PM
> > To: dev at dpdk.org
> > Cc: yliu at fridaylinux.org; Tan, Jianfeng <jianfeng.tan at intel.com>; Hu, Jiayu
> > <jiayu.hu at intel.com>
> > Subject: [dpdk-dev] [PATCH] vhost: support Generic Segmentation Offload
> > 
> > In virtio, Generic Segmentation Offload (GSO) is the feature for the
> > backend, which means the backend can receive packets with any GSO
> > type.
> > 
> > Virtio-net enables the GSO feature by default, and vhost-net supports it.
> > To make live migration from vhost-net to vhost-user possible, this patch
> > enables GSO for vhost-user.
> > 
> > Signed-off-by: Jiayu Hu <jiayu.hu at intel.com>
> Tested-by: Lei Yao<lei.a.yao at intel.com>

Applied to dpdk-next-virtio.

Thanks.

	--yliu

> This patch has been tested on my server, after add csum=on, gso=on to qemu cmdline,
> Following offload are active in vm:
> udp-fragmentation-offload: on
> tx-tcp-segmentation: on
>  tx-tcp-ecn-segmentation: on
>  tx-tcp6-segmentation: on
> 
> > ---
> >  lib/librte_vhost/vhost.h | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
> > index 1cc81c1..04f54cb 100644
> > --- a/lib/librte_vhost/vhost.h
> > +++ b/lib/librte_vhost/vhost.h
> > @@ -204,6 +204,7 @@ struct vhost_msg {
> >  				(1ULL << VIRTIO_F_VERSION_1)   | \
> >  				(1ULL << VHOST_F_LOG_ALL)      | \
> >  				(1ULL <<
> > VHOST_USER_F_PROTOCOL_FEATURES) | \
> > +				(1ULL << VIRTIO_NET_F_GSO) | \
> >  				(1ULL << VIRTIO_NET_F_HOST_TSO4) | \
> >  				(1ULL << VIRTIO_NET_F_HOST_TSO6) | \
> >  				(1ULL << VIRTIO_NET_F_CSUM)    | \
> > --
> > 2.7.4


More information about the dev mailing list