Re: [PATCH net-next 2/2] net: xilinx: axienet: Enable adaptive IRQ coalescing with DIM
From: Eric Dumazet
Date: Wed Sep 04 2024 - 13:04:56 EST
On Tue, Sep 3, 2024 at 9:25 PM Sean Anderson <sean.anderson@xxxxxxxxx> wrote:
>
> +
> +/**
> + * axienet_rx_dim_work() - Adjust RX DIM settings
> + * @work: The work struct
> + */
> +static void axienet_rx_dim_work(struct work_struct *work)
> +{
> + struct axienet_local *lp =
> + container_of(work, struct axienet_local, rx_dim.work);
> +
> + rtnl_lock();
Why do you need rtnl ?
This is very dangerous, because cancel_work_sync(&lp->rx_dim.work)
might deadlock.
> + axienet_dim_coalesce_rx(lp);
> + axienet_update_coalesce_rx(lp);
> + rtnl_unlock();
> +
> + lp->rx_dim.state = DIM_START_MEASURE;
> +}
>