Skip to content

Commit 71b215f

Browse files
Jie Wangdavem330
authored andcommitted
net: hns3: fix PF rss size initialization bug
Currently hns3 driver misuses the VF rss size to initialize the PF rss size in hclge_tm_vport_tc_info_update. So this patch fix it by checking the vport id before initialization. Fixes: 7347255 ("net: hns3: refactor PF rss get APIs with new common rss get APIs") Signed-off-by: Jie Wang <[email protected]> Signed-off-by: Guangbin Huang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e93530a commit 71b215f

File tree

1 file changed

+3
-1
lines changed
  • drivers/net/ethernet/hisilicon/hns3/hns3pf

1 file changed

+3
-1
lines changed

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,9 @@ static void hclge_tm_vport_tc_info_update(struct hclge_vport *vport)
681681
kinfo->num_tqps = hclge_vport_get_tqp_num(vport);
682682
vport->dwrr = 100; /* 100 percent as init */
683683
vport->bw_limit = hdev->tm_info.pg_info[0].bw_limit;
684-
hdev->rss_cfg.rss_size = kinfo->rss_size;
684+
685+
if (vport->vport_id == PF_VPORT_ID)
686+
hdev->rss_cfg.rss_size = kinfo->rss_size;
685687

686688
/* when enable mqprio, the tc_info has been updated. */
687689
if (kinfo->tc_info.mqprio_active)

0 commit comments

Comments
 (0)