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

Yao, Lei A lei.a.yao at intel.com
Mon Dec 25 02:53:29 CET 2017



> -----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>
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