]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Dec 2021 08:04:53 +0000 (09:04 +0100)
commitc8b7bd8440a56d3a03a888bd92899520f3a0c91e
tree4c75227e4496534bc2c57577975314a2e8ee2c10
parenta9f053f6448ff0321c0817d126e96eebd75dacaf
net: hns3: fix VF RSS failed problem after PF enable multi-TCs

[ Upstream commit b4d9076dd79d3932be134dbfe0f74dd275250e71 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c