Re: [PATCH net-next v2 4/8] net: napi: add CPU affinity to napi->config

From
Jakub Kicinski <kuba@kernel.org>
Date
2024-12-20 17:23:57
Also in
intel-wired-lan
Reply to
Ahmed Zaki, 2024-12-20
On Fri, 20 Dec 2024 07:51:09 -0700 Ahmed Zaki wrote:
On 2024-12-19 8:42 p.m., Jakub Kicinski wrote:
quoted
On Wed, 18 Dec 2024 09:58:39 -0700 Ahmed Zaki wrote:  
quoted
+	if (!glue_created && flags & NAPIF_IRQ_AFFINITY) {
+		glue = kzalloc(sizeof(*glue), GFP_KERNEL);
+		if (!glue)
+			return;
+		glue->notify.notify = netif_irq_cpu_rmap_notify;
+		glue->notify.release = netif_napi_affinity_release;
+		glue->data = napi;
+		glue->rmap = NULL;
+		napi->irq_flags |= NAPIF_IRQ_NORMAP;  
Why allocate the glue? is it not possible to add the fields:

	struct irq_affinity_notify notify;
	u16 index;

to struct napi_struct ?  
In the first branch of "if", the cb function netif_irq_cpu_rmap_notify() 
is also passed to irq_cpu_rmap_add() where the irq notifier is embedded 
in "struct irq_glue".
I don't understand what you're trying to say, could you rephrase?
I think this cannot be changed as long as some drivers are directly 
calling irq_cpu_rmap_add() instead of the proposed API.
Drivers which are not converted shouldn't matter if we have our own
notifier and call cpu_rmap_update() directly, no?

Drivers which are converted should not call irq_cpu_rmap_add().
Thread (23 messages) 23 messages, 4 authors, last reply 2025-01-02
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help