From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 7FED02C5 for ; Fri, 7 Apr 2017 10:15:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491552926; x=1523088926; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=PJaTAbhGOZjsA8SiEI9i8kuEK4qjFrz/zZ6V+W0xqlc=; b=gFwN+0BdRjbf0D8eunIwFUnLwrHDse1XbmUYG1HB0lnER8fzHwHGyUsL yvPhZO/MHEDHAi90xntwcCFIrvFRzQ==; Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Apr 2017 01:15:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,164,1488873600"; d="scan'208";a="953273601" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by orsmga003.jf.intel.com with ESMTP; 07 Apr 2017 01:15:25 -0700 From: Yuanhan Liu To: Yuanhan Liu Cc: Maxime Coquelin , dpdk stable Date: Fri, 7 Apr 2017 16:11:54 +0800 Message-Id: <1491552724-3034-37-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1491552724-3034-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1491552724-3034-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-stable] patch 'vhost: fix multiple queue not enabled for old kernels' has been queued to LTS release 16.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Apr 2017 08:15:27 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/11/17. So please shout if anyone has objections. Thanks. --yliu --- >>From abd6a605076a6579653a3e691a5981d4e1defe7f Mon Sep 17 00:00:00 2001 From: Yuanhan Liu Date: Wed, 1 Mar 2017 18:41:58 +0800 Subject: [PATCH] vhost: fix multiple queue not enabled for old kernels [ upstream commit 8d286dbeb8d70551ab520569cf8a0ecdec319826 ] Some macros (say VIRTIO_NET_F_MQ) are needed for enabling multiple queue, however they are introduced since kernel v3.8, meaning build error happens if we build DPDK vhost on those platforms. 71dfdbe66a66 ("vhost: fix build with kernel < 3.8") meant to fix it, but in a wrong way: it completely disables the MQ features for those kernels. However, the MQ feature doesn't depend on the kernel at all (except the macros dependency stated above), that we could still enable the MQ feature even the host kernel has no such support. The right fix is to define the macro if it's not defined. Fixes: 71dfdbe66a66 ("vhost: fix build with kernel < 3.8") Signed-off-by: Yuanhan Liu Reviewed-by: Maxime Coquelin --- lib/librte_vhost/vhost.c | 2 +- lib/librte_vhost/vhost.h | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index e415093..3c3f6a4 100644 --- a/lib/librte_vhost/vhost.c +++ b/lib/librte_vhost/vhost.c @@ -56,7 +56,7 @@ (1ULL << VIRTIO_NET_F_CTRL_VQ) | \ (1ULL << VIRTIO_NET_F_CTRL_RX) | \ (1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE) | \ - (VHOST_SUPPORTS_MQ) | \ + (1ULL << VIRTIO_NET_F_MQ) | \ (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 22564f1..4391e62 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib/librte_vhost/vhost.h @@ -123,11 +123,10 @@ struct vhost_virtqueue { * code buildable for older kernel. */ #ifdef VIRTIO_NET_F_MQ - #define VHOST_MAX_QUEUE_PAIRS VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX - #define VHOST_SUPPORTS_MQ (1ULL << VIRTIO_NET_F_MQ) + #define VHOST_MAX_QUEUE_PAIRS VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX #else - #define VHOST_MAX_QUEUE_PAIRS 1 - #define VHOST_SUPPORTS_MQ 0 + #define VIRTIO_NET_F_MQ 22 + #define VHOST_MAX_QUEUE_PAIRS 0x8000 #endif /* -- 1.9.0