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 48043A0093 for ; Tue, 29 Nov 2022 10:04:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 22A4540691; Tue, 29 Nov 2022 10:04:51 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 27E4C4067E for ; Tue, 29 Nov 2022 10:04:49 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AT3NnnE005630 for ; Tue, 29 Nov 2022 01:04:49 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=74yahjk5EPG2vhNGG5kkb63RsmlVSF6Gw7weuBj0xHc=; b=P/+htC7aDmHtJwBqUop6fcwIvPQ/5GGFLJ7VLdJEbTKUkptAhXIyMHsXQAVHMY/cxPpf CiHjplJLuTqdymm+lvLiICuSyHElPBqcqu22PsL5V0CqHvb7mAxK8SKGhCidBxAyw8qc BC+8Ggt4epp5ywEzBfdsNujAe3adUu3giIGbJwEayRnYtdZm9TnKaesadCbTBx5hmMUQ Y3EvmcTpSVaa6ZCxDXrLWEekhX+463SjVNsbhSdR/yHoYmsCdvQ/V+bderq4jsTfJi20 QNG1l7m/Wuq0BKD2M791lPr0O1O4Lb4Otzs+8O8B1hz7hLuLbnUThOFl74A5ldel6fCH Rg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3m5a5095fj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 29 Nov 2022 01:04:49 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 29 Nov 2022 01:04:47 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 29 Nov 2022 01:04:47 -0800 Received: from localhost.localdomain (unknown [10.28.36.155]) by maili.marvell.com (Postfix) with ESMTP id A5C363F7067; Tue, 29 Nov 2022 01:04:45 -0800 (PST) From: Hanumanth Pothula To: CC: , , Hanumanth Pothula Subject: [PATCH 21.11] net/cnxk: fix configuring large Rx/Tx queues Date: Tue, 29 Nov 2022 14:34:41 +0530 Message-ID: <20221129090441.186744-1-hpothula@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: _TZNSRPdNVGisFRauxTaVkucwBF4ZtGl X-Proofpoint-GUID: _TZNSRPdNVGisFRauxTaVkucwBF4ZtGl X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-29_06,2022-11-28_02,2022-06-22_01 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org [upstream commit 5a0f64d84bf939aba37527d511fde45e1a9f6f9e] While configuring NIX, local variables 'nb_rxq' and 'nb_txq' are declared as 8bit variables, leading to an integer overflow when an application sends Rxq/Txq value greater than 255. Hence, declare local variables, 'nb_rxq' and 'nb_txq' as 16bit variable. Fixes: b75e0aca84b0 ("net/cnxk: add device configuration operation") Signed-off-by: Hanumanth Pothula --- drivers/net/cnxk/cnxk_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c index 8ba35ac36f..67a8dec75b 100644 --- a/drivers/net/cnxk/cnxk_ethdev.c +++ b/drivers/net/cnxk/cnxk_ethdev.c @@ -1034,7 +1034,7 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev) struct roc_nix_fc_cfg fc_cfg = {0}; struct roc_nix *nix = &dev->nix; struct rte_ether_addr *ea; - uint8_t nb_rxq, nb_txq; + uint16_t nb_rxq, nb_txq; uint64_t rx_cfg; void *qs; int rc; -- 2.25.1