From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 95EBB457BB; Wed, 14 Aug 2024 09:50:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6B2B7427A1; Wed, 14 Aug 2024 09:49:03 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by mails.dpdk.org (Postfix) with ESMTP id ECAB84026C for ; Tue, 13 Aug 2024 18:00:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723564839; x=1755100839; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=90InAMdvasV1KnSx1C55buG50wDA5L95Srns7CXBVbo=; b=l/+PsrxTQbrz1XyjOfUeqTYdB+/1bvde9Z8IWXTjQbJ9s8zVikCqgTbX I6+LQQqvHf9vV2GMP8tupaLkhv85TbVjoiNFr4QoK4veKa4wJKGdkSSKj wUAlpxZRgK6y1q6jlMi0PiMGhAbE82bWOHs/eSYcTzuXzpIWXbywSyxqk wllgzwJD/MkS5DCbL9hRAkwHpFWuBlisGq0tKK+lHh+6eDomFV/V8elue cyorbFW8x5ikV1U5zDHjJY38F86l8JPSBPTahs3uvmfbIaDuPEtoEv4/s b3w3wa8INc+43rPvt1D7UI3RfOGnKTziG5+D+2NEAoVreoJxswmA76nxK A==; X-CSE-ConnectionGUID: nPri3YFtRnmiJNgdSfMUbA== X-CSE-MsgGUID: DJ4J5Cw0TDSqmeRWm2/wrA== X-IronPort-AV: E=McAfee;i="6700,10204,11163"; a="12987873" X-IronPort-AV: E=Sophos;i="6.09,286,1716274800"; d="scan'208";a="12987873" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Aug 2024 09:00:39 -0700 X-CSE-ConnectionGUID: UFfw5t6RTvymqfati4tS9g== X-CSE-MsgGUID: ukpCkPmmT/ifZ+EevlNWkw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,286,1716274800"; d="scan'208";a="58406568" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa007.fm.intel.com with ESMTP; 13 Aug 2024 09:00:37 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: ferruh.yigit@amd.com, thomas@monjalon.net, mb@smartsharesystems.com, Bruce Richardson , Bruce Richardson Subject: [RFC PATCH v2 18/26] net/vhost: use separate Rx and Tx queue limits Date: Tue, 13 Aug 2024 16:59:55 +0100 Message-ID: <20240813160003.423935-19-bruce.richards@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240813160003.423935-1-bruce.richards@intel.com> References: <20240812132910.162252-1-bruce.richardson@intel.com> <20240813160003.423935-1-bruce.richards@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Wed, 14 Aug 2024 09:48:35 +0200 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Update driver to use the new defines RTE_MAX_ETHPORT_TX_QUEUES and RTE_MAX_ETHPORT_RX_QUEUES rather than the old define RTE_MAX_QUEUES_PER_PORT. Signed-off-by: Bruce Richardson --- drivers/net/vhost/rte_eth_vhost.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 21bbb008e0..78bc755109 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -117,8 +117,8 @@ static struct rte_eth_link pmd_link = { struct rte_vhost_vring_state { rte_spinlock_t lock; - bool cur[RTE_MAX_QUEUES_PER_PORT * 2]; - bool seen[RTE_MAX_QUEUES_PER_PORT * 2]; + bool cur[RTE_MAX_ETHPORT_RX_QUEUES + RTE_MAX_ETHPORT_TX_QUEUES]; + bool seen[RTE_MAX_ETHPORT_RX_QUEUES + RTE_MAX_ETHPORT_TX_QUEUES]; unsigned int index; unsigned int max_vring; }; @@ -1648,7 +1648,8 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev) if (rte_kvargs_count(kvlist, ETH_VHOST_QUEUES_ARG) == 1) { ret = rte_kvargs_process(kvlist, ETH_VHOST_QUEUES_ARG, &open_int, &queues); - if (ret < 0 || queues > RTE_MAX_QUEUES_PER_PORT) + if (ret < 0 || queues > RTE_MAX_ETHPORT_RX_QUEUES + || queues > RTE_MAX_ETHPORT_TX_QUEUES) goto out_free; } else -- 2.43.0