[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9e724101-bdef-4c14-926b-6e85722d8bee@intel.com>
Date: Fri, 20 Dec 2024 07:50:33 -0700
From: Ahmed Zaki <ahmed.zaki@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: <netdev@...r.kernel.org>, <intel-wired-lan@...ts.osuosl.org>,
<andrew+netdev@...n.ch>, <edumazet@...gle.com>, <pabeni@...hat.com>,
<davem@...emloft.net>, <michael.chan@...adcom.com>, <tariqt@...dia.com>,
<anthony.l.nguyen@...el.com>, <przemyslaw.kitszel@...el.com>,
<jdamato@...tly.com>, <shayd@...dia.com>, <akpm@...ux-foundation.org>
Subject: Re: [PATCH net-next v2 1/8] net: napi: add irq_flags to napi struct
On 2024-12-19 8:34 p.m., Jakub Kicinski wrote:
> On Wed, 18 Dec 2024 09:58:36 -0700 Ahmed Zaki wrote:
>> Add irq_flags to the napi struct. This will allow the drivers to choose
>> how the core handles the IRQ assigned to the napi via
>> netif_napi_set_irq().
>
> I haven't read all the code, but I think the flag should be for the
> netdev as a while, not NAPI by NAPI. In fact you can combine it with
> allocating the map, too.
>
> int netif_enable_cpu_rmap(dev, num_queues)
int netif_enable_cpu_rmap(dev, num_vectors)
> {
> #ifdef CONFIG_RFS_ACCEL
> WARN_ON(dev->rx_cpu_rmap);
>
> dev->rx_cpu_rmap = alloc_irq_cpu_rmap(adapter->num_queues);
> if ...
>
> dev->rx_cpu_rmap_auto = 1;
> return 0;
> #endif
> }
I was trying to avoid adding an extra function, but since this will
replace alloc_irq_cpu_rmap() I guess I can try. May be even use
dev->netdev_ops->ndo_rx_flow_steer
instead of dev->rx_cpu_rmap_auto.
I will keep the flag in patch 4 (NAPI_IRQ_AFFINITY) per NAPI since it is
used in netif_napi_set_irq().
Thanks for the review.
Powered by blists - more mailing lists