- net/hns3: fix unrelease some resources on reset case - net/hns3: fix divide by zero - net/hns3: fix incorrect failed rollback - net/hns3: fix memory leakage for indirect action - net/hns3: fix extra waiting for link up - net/hns3: fix variable overflow - net/hns3: fix memory leakage in failure path - devtools: fix symbol listing - net/hns3: remove weak symbols - net/hns3: fix reset timeout - net/hns3: fix copper port inialization - net/hns3: rename RAS module - net/hns3: remove PVID info dump for VF - net/hns3: fix mbuf freeing in simple Tx path Signed-off-by: Dengdui Huang <huangdengdui@huawei.com> (cherry picked from commit 4f2a5e819346fb5bf12b9de68352782319e4a2a6)
37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
From ddd8a70074f58d1861d979ac1d16206ad014e2f3 Mon Sep 17 00:00:00 2001
|
|
From: Dengdui Huang <huangdengdui@huawei.com>
|
|
Date: Tue, 8 Apr 2025 16:30:54 +0800
|
|
Subject: [PATCH] net/hns3: fix variable overflow
|
|
|
|
[ upstream commit 52d4c3c4872be23c173ea14d5d7a5f71ef217bdc ]
|
|
|
|
The number of interrupt vector may exceed the range of uint8_t.
|
|
So hns3_unmap_rx_interrupt() should use uint16_t for 'vec' variable.
|
|
|
|
Fixes: 02a7b55657b2 ("net/hns3: support Rx interrupt")
|
|
Cc: stable@dpdk.org
|
|
|
|
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
|
|
---
|
|
drivers/net/hns3/hns3_common.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
|
|
index 25a4521..dc70bf3 100644
|
|
--- a/drivers/net/hns3/hns3_common.c
|
|
+++ b/drivers/net/hns3/hns3_common.c
|
|
@@ -882,8 +882,8 @@ hns3_unmap_rx_interrupt(struct rte_eth_dev *dev)
|
|
struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
|
|
struct hns3_adapter *hns = dev->data->dev_private;
|
|
struct hns3_hw *hw = &hns->hw;
|
|
- uint8_t base = RTE_INTR_VEC_ZERO_OFFSET;
|
|
- uint8_t vec = RTE_INTR_VEC_ZERO_OFFSET;
|
|
+ uint16_t base = RTE_INTR_VEC_ZERO_OFFSET;
|
|
+ uint16_t vec = RTE_INTR_VEC_ZERO_OFFSET;
|
|
uint16_t q_id;
|
|
|
|
if (dev->data->dev_conf.intr_conf.rxq == 0)
|
|
--
|
|
2.25.1
|
|
|