]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb4d9076dd79d3932be134dbfe0f74dd275250e71
treec0f36ca14b1358e10fa87cecc25eec933cf0b2f1
parentccafb2e5e2161c40a7de835cef513a4a638034cb
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: efa29b6d502b ("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