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 57A082C5 for ; Fri, 7 Apr 2017 10:15:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491552927; x=1523088927; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=gBOTw/ytbPIBw6IyAfwy7MonyymNgkzcFKIsTTsZOCM=; b=d3vCzUjh7kAcg6mvznY5NfxZbEBlTenGsa7g/Q07+5MW8+njhh6iF4UW ZlInZV18UA6YxHQErwZ7UWpUeRj6Zw==; 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="953273607" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by orsmga003.jf.intel.com with ESMTP; 07 Apr 2017 01:15:26 -0700 From: Yuanhan Liu To: Yuanhan Liu Cc: dpdk stable Date: Fri, 7 Apr 2017 16:11:55 +0800 Message-Id: <1491552724-3034-38-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 max queues' 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 c7bab6d5a7a450ddfeaae7a40fd5e5995aa2fb25 Mon Sep 17 00:00:00 2001 From: Yuanhan Liu Date: Wed, 1 Mar 2017 18:41:59 +0800 Subject: [PATCH] vhost: fix max queues [ upstream commit de8e1fdcecdca1254dbd6a63fd6e0e65fe3e3b05 ] 0x8000 is the max virito-net queue pairs the virtio 1.0 spec claims to support. While for vhost-user, it's a different story: the max vring index could be passed by the vhost-user spec is 0xff, masked by the VHOST_USER_VRING_IDX_MASK. That said, the max queue pairs could vhost-user could supported is 0x80. If user are asking more, I think the vhost-user need be extended. Fixes: b09b198bfb5c ("vhost-user: announce queue number in message") Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index 4391e62..d97df1d 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib/librte_vhost/vhost.h @@ -110,24 +110,15 @@ struct vhost_virtqueue { uint16_t shadow_used_idx; } __rte_cache_aligned; -/* Old kernels have no such macro defined */ +/* Old kernels have no such macros defined */ #ifndef VIRTIO_NET_F_GUEST_ANNOUNCE #define VIRTIO_NET_F_GUEST_ANNOUNCE 21 #endif - -/* - * Make an extra wrapper for VIRTIO_NET_F_MQ and - * VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX as they are - * introduced since kernel v3.8. This makes our - * code buildable for older kernel. - */ -#ifdef VIRTIO_NET_F_MQ - #define VHOST_MAX_QUEUE_PAIRS VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX -#else +#ifndef VIRTIO_NET_F_MQ #define VIRTIO_NET_F_MQ 22 - #define VHOST_MAX_QUEUE_PAIRS 0x8000 #endif +#define VHOST_MAX_QUEUE_PAIRS 0x80 /* * Define virtio 1.0 for older kernels -- 1.9.0