From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: [PATCH 1/2] vhost: enable any layout feature Date: Mon, 26 Sep 2016 14:40:55 +0800 Message-ID: <1474872056-24665-2-git-send-email-yuanhan.liu@linux.intel.com> References: <1474872056-24665-1-git-send-email-yuanhan.liu@linux.intel.com> Cc: Stephen Hemminger , Maxime Coquelin , "Michael S. Tsirkin" , Yuanhan Liu To: dev@dpdk.org Return-path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 153B72C63 for ; Mon, 26 Sep 2016 08:40:30 +0200 (CEST) In-Reply-To: <1474872056-24665-1-git-send-email-yuanhan.liu@linux.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The VIRTIO_F_ANY_LAYOUT feature allows virtio-net header and packet data in single vring desc if possible. Before that, it is assumed they will always take two descs. DPDK vhost removes this assumption since commit bc7f87a2c19f ("vhost: refactor dequeueing"), meaning we actually support this feature. But it is not enabled. Thus, this patch enables it. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost.c | 1 + lib/librte_vhost/vhost.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index 46095c3..1d8d941 100644 --- a/lib/librte_vhost/vhost.c +++ b/lib/librte_vhost/vhost.c @@ -57,6 +57,7 @@ (1ULL << VIRTIO_NET_F_CTRL_RX) | \ (1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE) | \ (VHOST_SUPPORTS_MQ) | \ + (1ULL << VIRTIO_F_ANY_LAYOUT) | \ (1ULL << VIRTIO_F_VERSION_1) | \ (1ULL << VHOST_F_LOG_ALL) | \ (1ULL << VHOST_USER_F_PROTOCOL_FEATURES) | \ diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index c2dfc3c..5ee6c6c 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib/librte_vhost/vhost.h @@ -92,6 +92,9 @@ struct vhost_virtqueue { #define VIRTIO_NET_F_GUEST_ANNOUNCE 21 #endif +#ifndef VIRTIO_F_ANY_LAYOUT + #define VIRTIO_F_ANY_LAYOUT 27 +#endif /* * Make an extra wrapper for VIRTIO_NET_F_MQ and -- 1.9.0