]> 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)
commitf815dfbe3e0f6fbdeaa0a0637a5c617504d919b3
treec0f36ca14b1358e10fa87cecc25eec933cf0b2f1
parent1f8b0c08e40c2b138921e10f4a3f5c79ed8803d3
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: 8d24118d4958 ("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