Linux-HyperV List
 help / color / mirror / Atom feed
* [PATCH net] net: mana: Handle CPU-less NUMA nodes when assigning IRQ affinity
@ 2026-12-02  3:06 Avi Weiss
  2026-12-02  3:09 ` netdev-bot+sinfo
  0 siblings, 1 reply; 2+ messages in thread
From: Avi Weiss @ 2026-12-02  3:06 UTC (permalink / raw)
  To: netdev
  Cc: linux-hyperv, haiyangz, wei.liu, decui, andrew+netdev, davem,
	edumazet, kuba, pabeni, Avi Weiss

mana_irq_setup_numa_aware() uses the device NUMA node as the starting
point for for_each_numa_hop_mask(). The scheduler only builds hop
masks for nodes containing CPUs. If the device is associated with
a memory-only node, the first mask is NULL, so the loop assigns no
IRQ affinities and the function still returns success.

For such a node, use numa_nearest_node() to select the closest node
with CPUs before iterating the hop masks. Leave CPU-bearing nodes,
NUMA_NO_NODE, and invalid node values on their existing paths.

Fixes: 8afefc361209 ("net: mana: Assigning IRQ affinity on HT cores")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
 drivers/net/ethernet/microsoft/mana/gdma_pci.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ethernet/microsoft/mana/gdma_pci.c b/drivers/net/ethernet/microsoft/mana/gdma_pci.c
index edfadfd89829..887e5db6d461 100644
--- a/drivers/net/ethernet/microsoft/mana/gdma_pci.c
+++ b/drivers/net/ethernet/microsoft/mana/gdma_pci.c
@@ -8,6 +8,7 @@
 #include <linux/list.h>
 #include <linux/module.h>
 #include <linux/msi.h>
+#include <linux/numa.h>
 #include <linux/pci.h>
 #include <linux/slab.h>
 #include <linux/topology.h>
@@ -308,6 +309,12 @@ static int mana_irq_setup_numa_aware(unsigned int *irqs, unsigned int len,
 	if (!alloc_cpumask_var(&cpus, GFP_KERNEL))
 		return -ENOMEM;
 
+#ifdef CONFIG_NUMA
+	if (node >= 0 && node < MAX_NUMNODES && node_online(node) &&
+	    !node_state(node, N_CPU))
+		node = numa_nearest_node(node, N_CPU);
+#endif
+
 	rcu_read_lock();
 	for_each_numa_hop_mask(next, node) {
 		weight = cpumask_weight_andnot(next, prev);
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] net: mana: Handle CPU-less NUMA nodes when assigning IRQ affinity
  2026-12-02  3:06 [PATCH net] net: mana: Handle CPU-less NUMA nodes when assigning IRQ affinity Avi Weiss
@ 2026-12-02  3:09 ` netdev-bot+sinfo
  0 siblings, 0 replies; 2+ messages in thread
From: netdev-bot+sinfo @ 2026-12-02  3:09 UTC (permalink / raw)
  To: Avi Weiss
  Cc: netdev, linux-hyperv, haiyangz, wei.liu, decui, andrew+netdev,
	davem, edumazet, kuba, pabeni

Hi!

This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:

 - How the issue was discovered, e.g. hit in production, hit during
   development, syzbot report, manual code inspection, LLM or static
   analysis tool scan.

 - Whether the issue was actually triggered, or is only theoretical
   (e.g. found by LLM and not proven at runtime). If it was triggered
   please include the symptoms, like the stack trace or kernel messages.

 - What hardware the change was tested on. For driver fixes please
   mention the device (and if relevant firmware version) used for
   testing, or say that the change was not tested on real hardware.

Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account.

*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
-- 
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-02  3:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02  3:06 [PATCH net] net: mana: Handle CPU-less NUMA nodes when assigning IRQ affinity Avi Weiss
2026-12-02  3:09 ` netdev-bot+sinfo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox