Re: [RFC net-next v4 5/9] net: napi: Add napi_config
From: Jakub Kicinski
Date: Tue Oct 08 2024 - 18:17:14 EST
On Tue, 1 Oct 2024 23:52:36 +0000 Joe Damato wrote:
> static inline void netdev_set_defer_hard_irqs(struct net_device *netdev,
> u32 defer)
> {
> + unsigned int count = max(netdev->num_rx_queues,
> + netdev->num_tx_queues);
> struct napi_struct *napi;
> + int i;
>
> WRITE_ONCE(netdev->napi_defer_hard_irqs, defer);
> list_for_each_entry(napi, &netdev->napi_list, dev_list)
> napi_set_defer_hard_irqs(napi, defer);
> +
> + if (netdev->napi_config)
Could this ever be NULL ?
> + for (i = 0; i < count; i++)
> + netdev->napi_config[i].defer_hard_irqs = defer;
> }