From: Huisong Li Date: Thu, 29 Oct 2020 12:51:54 +0000 (+0800) Subject: net/hns3: fix data type to store queue number X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=708ecc07d23edff628008669401cfaf37a503ce8;p=dpdk.git net/hns3: fix data type to store queue number Currently, u8 type variable is used to control to release fake queues in hns3_fake_rx/tx_queue_config function. Although there is no case in which more than 256 fake queues are created in hns3 network engine, it is unreasonable to compare u8 variable with u16 variable. Fixes: a951c1ed3ab5 ("net/hns3: support different numbers of Rx and Tx queues") Cc: stable@dpdk.org Signed-off-by: Huisong Li Signed-off-by: Lijun Ou --- diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 3d5e4654c7..33864535b6 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -1378,7 +1378,7 @@ hns3_fake_rx_queue_config(struct hns3_hw *hw, uint16_t nb_queues) { uint16_t old_nb_queues = hw->fkq_data.nb_fake_rx_queues; void **rxq; - uint8_t i; + uint16_t i; if (hw->fkq_data.rx_queues == NULL && nb_queues != 0) { /* first time configuration */ @@ -1425,7 +1425,7 @@ hns3_fake_tx_queue_config(struct hns3_hw *hw, uint16_t nb_queues) { uint16_t old_nb_queues = hw->fkq_data.nb_fake_tx_queues; void **txq; - uint8_t i; + uint16_t i; if (hw->fkq_data.tx_queues == NULL && nb_queues != 0) { /* first time configuration */