[PATCH net-next 2/2] net: xilinx: axienet: Enable adaptive IRQ coalescing with DIM

Eric Dumazet edumazet at google.com
Wed Sep 4 10:04:15 PDT 2024


On Tue, Sep 3, 2024 at 9:25 PM Sean Anderson <sean.anderson at linux.dev> 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;
> +}
>



More information about the linux-arm-kernel mailing list