From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5ED44A0353; Mon, 18 Nov 2019 21:32:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D4964A69; Mon, 18 Nov 2019 21:32:00 +0100 (CET) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id C14669E4 for ; Mon, 18 Nov 2019 21:31:58 +0100 (CET) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 2F1DE30C065; Mon, 18 Nov 2019 12:28:27 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 2F1DE30C065 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1574108907; bh=zOgCqcNPAm+EA2jSXygOj7vEo/+8W4lKcoEiuxUOnqs=; h=From:To:Cc:Subject:Date:From; b=SDWuBFUBJPoHNtdRmVmApSoMs6QEzTc6l285iwx65RHKpR4uaY40LsNT3il+22PO0 67cV6CkFt8hffrZtR/McyyIJu1BASCzTmuaEGcarwrPBlrDKX1SjHTs/AlIxbZHd0r 3BKE32okpYEX08EbRS/tBJlQV9UhDs9jVAD0QfAE= Received: from C02VPB22HTD6.wifi.broadcom.net (c02vpb22htd6.wifi.broadcom.net [10.69.74.102]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id BAF0914008B; Mon, 18 Nov 2019 12:31:52 -0800 (PST) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Somnath Kotur Date: Mon, 18 Nov 2019 12:31:50 -0800 Message-Id: <20191118203150.66895-1-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122.2) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/bnxt: fix Rx queue pool calculation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When the number of Rx queues requested by the application is less than the number of pools calculated, we end up calling HWRM_VNIC_ALLOC with incorrect parameters. This causes the firmware to return an error. Fix the Rx queue pool calculation. Fixes: 10bb6ddc2984 ("net/bnxt: fix flow creation with non-consecutive group ids") Signed-off-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_rxq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index 94f105d34..457ebede0 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -104,6 +104,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp) pools = bp->rx_cosq_cnt ? bp->rx_cosq_cnt : pools; } + pools = RTE_MIN(pools, bp->rx_cp_nr_rings); nb_q_per_grp = bp->rx_cp_nr_rings / pools; bp->rx_num_qs_per_vnic = nb_q_per_grp; PMD_DRV_LOG(DEBUG, "pools = %u nb_q_per_grp = %u\n", -- 2.21.0 (Apple Git-122.2)