Skip to content

Commit

Permalink
net/hns3: fix RSS TC mode entry
Browse files Browse the repository at this point in the history
[ upstream commit cdb9a7ae5f8f3b59b6de9dc2b52387636245e3a5 ]

The driver allocates queues only to valid TCs. But the driver also
configure queues for invalid TCs, which is unreasonable.

Fixes: c37ca66 ("net/hns3: support RSS")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
  • Loading branch information
LiHuiSong1 authored and cpaelzer committed Mar 9, 2022
1 parent bf1670a commit c367ca2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/hns3/hns3_rss.c
Expand Up @@ -456,8 +456,8 @@ hns3_set_rss_tc_mode(struct hns3_hw *hw)

for (i = 0; i < HNS3_MAX_TC_NUM; i++) {
tc_valid[i] = !!(hw->hw_tc_map & BIT(i));
tc_size[i] = roundup_size;
tc_offset[i] = rss_size * i;
tc_size[i] = tc_valid[i] ? roundup_size : 0;
tc_offset[i] = tc_valid[i] ? rss_size * i : 0;
}

hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_TC_MODE, false);
Expand Down

0 comments on commit c367ca2

Please sign in to comment.