lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <058001dbff65$85628e10$9027aa30$@trustnetic.com>
Date: Mon, 28 Jul 2025 10:15:42 +0800
From: Jiawen Wu <jiawenwu@...stnetic.com>
To: "'Jakub Kicinski'" <kuba@...nel.org>
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 Sat, Jul 26, 2025 8:34 AM, Jakub Kicinski wrote:
> 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 ?!

I hope RX and TX can share ITR value, because they share the interrupt.
Once adaptive RX coalesce is on, use the smallest value got from RX sample and TX sample.
If adaptive TX flag is also set, how should I properly set it? Cooperate with RX?

> 
> > +		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

Powered by Openwall GNU/*/Linux Powered by OpenVZ