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 EDD3D457BB; Wed, 14 Aug 2024 09:49:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C971B41101; Wed, 14 Aug 2024 09:48:45 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by mails.dpdk.org (Postfix) with ESMTP id 4F2D240650 for ; Tue, 13 Aug 2024 18:00:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723564821; x=1755100821; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6Zxi6Y44KV2J7X4U7FIZmKl3JIwCG/yHvD1nrlUgZDc=; b=UcFsJJg3HHcGkNsuxqKZ9sF82+xGgskduJoz31Zs/srd9KzC9qeTuQeo cE8P/FF6/fT2Ms7Jtjq7q1pcJVcPocsyf6Cq34HpaCoIWOipYs5fyHmN3 2FXX8JRbf61erClTHCMFukzPMUEsuQkQfZE/c2P42Rix2XCJiLYSf0YUX pAwklFZuU6qcIr+WTzf8mLbUh3yotZckQuW18UMWjUJuKCunq0pxI5WL0 QvjCiWtEs0ZOlbJjVPohFBXt32c7P5C5D2JlB5ekvVOHkOrRxYM9WuOcM g7x0lBkzTZOtTAOPtGqPTrgjH/Qwp/baVvBVScYkLk4Xc4qFcqVhFKApd Q==; X-CSE-ConnectionGUID: WJP03qmLRvm0QW8b6dgXeA== X-CSE-MsgGUID: GCXd9hYEQT+GedL8qsKIqg== X-IronPort-AV: E=McAfee;i="6700,10204,11163"; a="12987814" X-IronPort-AV: E=Sophos;i="6.09,286,1716274800"; d="scan'208";a="12987814" 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:20 -0700 X-CSE-ConnectionGUID: jMuVm2/TQCiWyVAkPtOmhA== X-CSE-MsgGUID: Qam95EVATZanUtarAvvAaA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,286,1716274800"; d="scan'208";a="58406177" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa007.fm.intel.com with ESMTP; 13 Aug 2024 09:00:18 -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 06/26] bpf: use separate Rx and Tx queue limits Date: Tue, 13 Aug 2024 16:59:43 +0100 Message-ID: <20240813160003.423935-7-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:34 +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 library 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 --- lib/bpf/bpf_pkt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bpf/bpf_pkt.c b/lib/bpf/bpf_pkt.c index aaca935f2d..2c6b0e18f7 100644 --- a/lib/bpf/bpf_pkt.c +++ b/lib/bpf/bpf_pkt.c @@ -503,7 +503,8 @@ bpf_eth_elf_load(struct bpf_eth_cbh *cbh, uint16_t port, uint16_t queue, ftx = NULL; if (prm == NULL || rte_eth_dev_is_valid_port(port) == 0 || - queue >= RTE_MAX_QUEUES_PER_PORT) + queue >= (cbh->type == BPF_ETH_RX ? + RTE_MAX_ETHPORT_RX_QUEUES : RTE_MAX_ETHPORT_TX_QUEUES)) return -EINVAL; if (cbh->type == BPF_ETH_RX) -- 2.43.0