
From: Yufeng Mo <moyufeng@huawei.com> driver inclusion category: bugfix bugzilla: NA CVE: NA DTS:DTS202107060S2FXIP1300 ---------------------------- Currently, affinity_mask is set to a single value. As a result, irqbalance becomes invalid in SUBSET or EXACT mode. To solve this problem, change affinity_mask to a value range. In this way, irqbalance can be performed on the CPU of the NUMA node. Signed-off-by: Yufeng Mo <moyufeng@huawei.com> Signed-off-by: Yonglong Liu <liuyonglong@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index e9a04e72ae02..90dd2a2ebd38 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -1452,15 +1452,12 @@ static int hclge_configure(struct hclge_dev *hdev) hclge_init_kdump_kernel_config(hdev); - /* Set the init affinity based on pci func number */ + /* Set the affinity based on numa node */ node = dev_to_node(&hdev->pdev->dev); if (node != NUMA_NO_NODE) cpumask = cpumask_of_node(node); - i = cpumask_weight(cpumask); - i = i ? PCI_FUNC(hdev->pdev->devfn) % i : 0; - cpumask_set_cpu(cpumask_local_spread(i, dev_to_node(&hdev->pdev->dev)), - &hdev->affinity_mask); + cpumask_copy(&hdev->affinity_mask, cpumask); return ret; } -- 2.33.0