patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 21.11] net/cnxk: fix configuring large Rx/Tx queues
@ 2022-11-29  9:04 Hanumanth Pothula
  0 siblings, 0 replies; only message in thread
From: Hanumanth Pothula @ 2022-11-29  9:04 UTC (permalink / raw)
  To: stable; +Cc: jerinj, ndabilpuram, Hanumanth Pothula

[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 <hpothula@marvell.com>
---
 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-29  9:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-29  9:04 [PATCH 21.11] net/cnxk: fix configuring large Rx/Tx queues Hanumanth Pothula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).