Message ID | 20221109200442.143589-1-simon.horman@corigine.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 42ba9654acad33efe34e5125fb373889f46a3f1c |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] nfp: take numa node into account when setting irq affinity | expand |
Hello: This patch was applied to netdev/net-next.git (master) by David S. Miller <davem@davemloft.net>: On Wed, 9 Nov 2022 15:04:42 -0500 you wrote: > From: Yinjun Zhang <yinjun.zhang@corigine.com> > > Set irq affinity to cpus that belong to the same numa node with > NIC device first. > > Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com> > Reviewed-by: Louis Peens <louis.peens@corigine.com> > Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com> > Signed-off-by: Simon Horman <simon.horman@corigine.com> > > [...] Here is the summary with links: - [net-next] nfp: take numa node into account when setting irq affinity https://git.kernel.org/netdev/net-next/c/42ba9654acad You are awesome, thank you!
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c index 8c1a870bc0e5..184ffae2ac94 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c @@ -735,8 +735,9 @@ static unsigned int nfp_net_calc_fl_bufsz_xsk(struct nfp_net_dp *dp) */ static void nfp_net_vecs_init(struct nfp_net *nn) { + int numa_node = dev_to_node(&nn->pdev->dev); struct nfp_net_r_vector *r_vec; - int r; + unsigned int r; nn->lsc_handler = nfp_net_irq_lsc; nn->exn_handler = nfp_net_irq_exn; @@ -762,7 +763,7 @@ static void nfp_net_vecs_init(struct nfp_net *nn) tasklet_disable(&r_vec->tasklet); } - cpumask_set_cpu(r, &r_vec->affinity_mask); + cpumask_set_cpu(cpumask_local_spread(r, numa_node), &r_vec->affinity_mask); } }