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 E85CC457C0; Wed, 14 Aug 2024 12:52:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F339842E44; Wed, 14 Aug 2024 12:50:48 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mails.dpdk.org (Postfix) with ESMTP id 4EA4B42E1C for ; Wed, 14 Aug 2024 12:50:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723632646; x=1755168646; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=B7X4teW8wanFonofbILw8xeu5uk9bP2aJxc0Nj2MLuY=; b=P3RQlN4rNID4JqO04S+1+Yi+27Gk1NRrUvjx+o9M3mXv7USIsUSJo0c+ 9d1aWTijS2W4yj7hcTu28CAYwzhX7xTPW9d8GeXJpmEC78+NwRaUSz8Tw H35ZxXt5EM5eZN8JCLnpO6OZ/K28IjMAoc2QlaDzKfjt6hne6MRQKx+Bz Ti/PhatJmunasMNox+cPsetVZLslXbyW7zwGkfXslM0IZyzy1sjTq2e3G ftOovcA7vY2b1/P4NT/S9D8U61cwIlHef9mmtTfv/LUPupiTq4If+m6// 1CdbK0IrSsCB7299Xx/49LDtPe6iKCNabaeYGTXoGyqIEcxPs61vY3rW5 Q==; X-CSE-ConnectionGUID: rO8oO7zDT2S/8FvpX/Zq9A== X-CSE-MsgGUID: Ar/AtvJ+QQWKxE7N0jR+/w== X-IronPort-AV: E=McAfee;i="6700,10204,11163"; a="44360368" X-IronPort-AV: E=Sophos;i="6.09,145,1716274800"; d="scan'208";a="44360368" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2024 03:50:46 -0700 X-CSE-ConnectionGUID: csnPcIaNQEeGq+HdPT2fUA== X-CSE-MsgGUID: hsvq20L+RVi0LZssclqSFg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,145,1716274800"; d="scan'208";a="96481777" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by orviesa001.jf.intel.com with ESMTP; 14 Aug 2024 03:50:45 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: ferruh.yigit@amd.com, thomas@monjalon.net, mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v3 20/26] app/test-pmd: use separate Rx and Tx queue limits Date: Wed, 14 Aug 2024 11:49:26 +0100 Message-ID: <20240814104933.14062-21-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240814104933.14062-1-bruce.richardson@intel.com> References: <20240812132910.162252-1-bruce.richardson@intel.com> <20240814104933.14062-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 app 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 Acked-by: Morten Brørup --- app/test-pmd/testpmd.c | 7 ++++--- app/test-pmd/testpmd.h | 16 ++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index b1401136e4..84da9a80f2 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -1305,7 +1305,7 @@ check_socket_id(const unsigned int socket_id) queueid_t get_allowed_max_nb_rxq(portid_t *pid) { - queueid_t allowed_max_rxq = RTE_MAX_QUEUES_PER_PORT; + queueid_t allowed_max_rxq = RTE_MAX_ETHPORT_RX_QUEUES; bool max_rxq_valid = false; portid_t pi; struct rte_eth_dev_info dev_info; @@ -1353,7 +1353,7 @@ check_nb_rxq(queueid_t rxq) queueid_t get_allowed_max_nb_txq(portid_t *pid) { - queueid_t allowed_max_txq = RTE_MAX_QUEUES_PER_PORT; + queueid_t allowed_max_txq = RTE_MAX_ETHPORT_TX_QUEUES; bool max_txq_valid = false; portid_t pi; struct rte_eth_dev_info dev_info; @@ -1564,7 +1564,8 @@ check_nb_txd(queueid_t txd) queueid_t get_allowed_max_nb_hairpinq(portid_t *pid) { - queueid_t allowed_max_hairpinq = RTE_MAX_QUEUES_PER_PORT; + queueid_t allowed_max_hairpinq = RTE_MIN(RTE_MAX_ETHPORT_RX_QUEUES, + RTE_MAX_ETHPORT_TX_QUEUES); portid_t pi; struct rte_eth_hairpin_cap cap; diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 9facd7f281..5e405775b1 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -332,10 +332,10 @@ struct rte_port { uint8_t need_reconfig_queues; /**< need reconfiguring queues or not */ uint8_t rss_flag; /**< enable rss or not */ uint8_t dcb_flag; /**< enable dcb */ - uint16_t nb_rx_desc[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue rx desc number */ - uint16_t nb_tx_desc[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue tx desc number */ - struct port_rxqueue rxq[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue Rx config and state */ - struct port_txqueue txq[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue Tx config and state */ + uint16_t nb_rx_desc[RTE_MAX_ETHPORT_RX_QUEUES+1]; /**< per queue rx desc number */ + uint16_t nb_tx_desc[RTE_MAX_ETHPORT_TX_QUEUES+1]; /**< per queue tx desc number */ + struct port_rxqueue rxq[RTE_MAX_ETHPORT_RX_QUEUES+1]; /**< per queue Rx config and state */ + struct port_txqueue txq[RTE_MAX_ETHPORT_TX_QUEUES+1]; /**< per queue Tx config and state */ struct rte_ether_addr *mc_addr_pool; /**< pool of multicast addrs */ uint32_t mc_addr_nb; /**< nb. of addr. in mc_addr_pool */ queueid_t queue_nb; /**< nb. of queues for flow rules */ @@ -351,14 +351,14 @@ struct rte_port { struct port_indirect_action *actions_list; /**< Associated indirect actions. */ LIST_HEAD(, port_flow_tunnel) flow_tunnel_list; - const struct rte_eth_rxtx_callback *rx_dump_cb[RTE_MAX_QUEUES_PER_PORT+1]; - const struct rte_eth_rxtx_callback *tx_dump_cb[RTE_MAX_QUEUES_PER_PORT+1]; + const struct rte_eth_rxtx_callback *rx_dump_cb[RTE_MAX_ETHPORT_RX_QUEUES+1]; + const struct rte_eth_rxtx_callback *tx_dump_cb[RTE_MAX_ETHPORT_TX_QUEUES+1]; /**< metadata value to insert in Tx packets. */ uint32_t tx_metadata; - const struct rte_eth_rxtx_callback *tx_set_md_cb[RTE_MAX_QUEUES_PER_PORT+1]; + const struct rte_eth_rxtx_callback *tx_set_md_cb[RTE_MAX_ETHPORT_TX_QUEUES+1]; /**< dynamic flags. */ uint64_t mbuf_dynf; - const struct rte_eth_rxtx_callback *tx_set_dynf_cb[RTE_MAX_QUEUES_PER_PORT+1]; + const struct rte_eth_rxtx_callback *tx_set_dynf_cb[RTE_MAX_ETHPORT_TX_QUEUES+1]; struct xstat_display_info xstats_info; }; -- 2.43.0