Patch "net: hns3: fix VF RSS failed problem after PF enable multi-TCs" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: hns3: fix VF RSS failed problem after PF enable multi-TCs

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-hns3-fix-vf-rss-failed-problem-after-pf-enable-m.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1d64495e194b658e856057858d7bd1c118994fc3
Author: Guangbin Huang <huangguangbin2@xxxxxxxxxx>
Date:   Fri Nov 26 20:03:15 2021 +0800

    net: hns3: fix VF RSS failed problem after PF enable multi-TCs
    
    [ Upstream commit 8d2ad993aa05c0768f00c886c9d369cd97a337ac ]
    
    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@xxxxxxxxxx>
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
index fd5375b5991bb..a257bf635bc24 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
@@ -451,9 +451,9 @@ static int hclgevf_set_rss_tc_mode(struct hclgevf_dev *hdev,  u16 rss_size)
 	roundup_size = ilog2(roundup_size);
 
 	for (i = 0; i < HCLGEVF_MAX_TC_NUM; i++) {
-		tc_valid[i] = !!(hdev->hw_tc_map & BIT(i));
+		tc_valid[i] = 1;
 		tc_size[i] = roundup_size;
-		tc_offset[i] = rss_size * i;
+		tc_offset[i] = (hdev->hw_tc_map & BIT(i)) ? rss_size * i : 0;
 	}
 
 	hclgevf_cmd_setup_basic_desc(&desc, HCLGEVF_OPC_RSS_TC_MODE, false);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux