Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: hns3: fix wrong use of rss size during VF rss config

Currently, it used old rss size to get current tc mode. As a result, the
rss size is updated, but the tc mode is still configured based on the old
rss size.

So this patch fixes it by using the new rss size in both process.

Fixes: 93969dc14fcd ("net: hns3: refactor VF rss init APIs with new common rss init APIs")
Signed-off-by: Jie Wang <wangjie125@huawei.com>
Signed-off-by: Hao Lan <lanhao@huawei.com>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Link: https://lore.kernel.org/r/20230110115359.10163-1-lanhao@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Jie Wang and committed by
Jakub Kicinski
ae9f29fd 8fed7565

+1 -1
+1 -1
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
··· 3130 3130 3131 3131 hclgevf_update_rss_size(handle, new_tqps_num); 3132 3132 3133 - hclge_comm_get_rss_tc_info(cur_rss_size, hdev->hw_tc_map, 3133 + hclge_comm_get_rss_tc_info(kinfo->rss_size, hdev->hw_tc_map, 3134 3134 tc_offset, tc_valid, tc_size); 3135 3135 ret = hclge_comm_set_rss_tc_mode(&hdev->hw.hw, tc_offset, 3136 3136 tc_valid, tc_size);