[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250725173428.1857c412@kernel.org>
Date: Fri, 25 Jul 2025 17:34:28 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jiawen Wu <jiawenwu@...stnetic.com>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew+netdev@...n.ch>, "David S.
Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo
Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, Jacob Keller
<jacob.e.keller@...el.com>, Mengyuan Lou <mengyuanlou@...-swift.com>
Subject: Re: [PATCH net-next v3 3/3] net: wangxun: support to use adaptive
RX coalescing
On Thu, 24 Jul 2025 16:05:48 +0800 Jiawen Wu wrote:
> Support to turn on/off adaptive RX coalesce. When adaptive RX coalesce
> is on, use DIM algorithm for a dynamic interrupt moderation.
you say Rx, and you add Rx as the flag
> + ETHTOOL_COALESCE_USE_ADAPTIVE_RX,
so far so good, but then you also have dim instances for Tx ?!
> + q_vector->tx.dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_CQE;
> +static void wx_tx_dim_work(struct work_struct *work)
I don't get it.
> @@ -363,10 +366,15 @@ int wx_set_coalesce(struct net_device *netdev,
> (ec->tx_coalesce_usecs > (max_eitr >> 2)))
> return -EINVAL;
>
> + if (ec->use_adaptive_rx_coalesce) {
> + wx->rx_itr_setting = 1;
> + return 0;
> + }
> +
> if (ec->rx_coalesce_usecs > 1)
> wx->rx_itr_setting = ec->rx_coalesce_usecs << 2;
> else
> - wx->rx_itr_setting = ec->rx_coalesce_usecs;
> + wx->rx_itr_setting = rx_itr_param;
looks racy, you should probably cancel the DIM works?
Otherwise if the work is in flight as the user sets the values
the work will overwrite user settings.
--
pw-bot: cr
Powered by blists - more mailing lists