net: hns3: fix VF RSS failed problem after PF enable multi-TCs
authorGuangbin Huang <huangguangbin2@huawei.com>
Fri, 26 Nov 2021 12:03:15 +0000 (20:03 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 26 Nov 2021 19:36:29 +0000 (11:36 -0800)
commit8d2ad993aa05c0768f00c886c9d369cd97a337ac
treec0f36ca14b1358e10fa87cecc25eec933cf0b2f1
parent0435a4d08032c8fba2966cebdac870e22238cacc
net: hns3: fix VF RSS failed problem after PF enable multi-TCs

When PF is set to multi-TCs and configured mapping relationship between
priorities and TCs, the hardware will active these settings for this PF
and its VFs.

In this case when VF just uses one TC and its rx packets contain priority,
and if the priority is not mapped to TC0, as other TCs of VF is not valid,
hardware always put this kind of packets to the queue 0. It cause this kind
of packets of VF can not be used RSS function.

To fix this problem, set tc mode of all unused TCs of VF to the setting of
TC0, then rx packet with priority which map to unused TC will be direct to
TC0.

Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c