Skip to content

Commit

Permalink
net/hns3: fix data type to store queue number
Browse files Browse the repository at this point in the history
[ upstream commit 708ecc0 ]

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: a951c1e ("net/hns3: support different numbers of Rx and Tx queues")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
  • Loading branch information
LiHuiSong1 authored and bluca committed Nov 9, 2020
1 parent 8d16746 commit eb8dd4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/hns3/hns3_rxtx.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,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 */
Expand Down Expand Up @@ -1038,7 +1038,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 */
Expand Down

0 comments on commit eb8dd4f

Please sign in to comment.