From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP; 25 Sep 2016 23:40:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,398,1470726000"; d="scan'208";a="13211584" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by fmsmga005.fm.intel.com with ESMTP; 25 Sep 2016 23:40:29 -0700 From: Yuanhan Liu To: dev@dpdk.org Cc: Stephen Hemminger , Maxime Coquelin , "Michael S. Tsirkin" , Yuanhan Liu Date: Mon, 26 Sep 2016 14:40:55 +0800 Message-Id: <1474872056-24665-2-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1474872056-24665-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1474872056-24665-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-dev] [PATCH 1/2] vhost: enable any layout feature X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 06:40:32 -0000 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