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: sta...@dpdk.org

Signed-off-by: Dengdui Huang <huangdeng...@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 25a45212be..dc70bf3cff 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.33.0

Reply via email to