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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <02ae01dbfab1$f30618a0$d91249e0$@trustnetic.com>
Date: Tue, 22 Jul 2025 10:40:12 +0800
From: Jiawen Wu <jiawenwu@...stnetic.com>
To: "'Jacob Keller'" <jacob.e.keller@...el.com>,
	<netdev@...r.kernel.org>,
	"'Andrew Lunn'" <andrew+netdev@...n.ch>,
	"'David S. Miller'" <davem@...emloft.net>,
	"'Eric Dumazet'" <edumazet@...gle.com>,
	"'Jakub Kicinski'" <kuba@...nel.org>,
	"'Paolo Abeni'" <pabeni@...hat.com>,
	"'Simon Horman'" <horms@...nel.org>
Cc: "'Mengyuan Lou'" <mengyuanlou@...-swift.com>
Subject: RE: [PATCH net-next v2 1/3] net: wangxun: change the default ITR setting

On Tue, Jul 22, 2025 7:56 AM, Jacob Keller wrote:
> On 7/21/2025 1:01 AM, Jiawen Wu wrote:
> > For various types of devices, change their default ITR settings
> > according to their hardware design.
> >
> 
> I would generally expect a change like this to have a commit message
> explaining the logic or reasoning behind the change from the old values
> to the new values. Do you see benefit? Is this cleanup for the other 2
> patches in the series to make more sense? Is there a good reason the new
> values make sense?
> 
> > Signed-off-by: Jiawen Wu <jiawenwu@...stnetic.com>
> > ---
> >  .../net/ethernet/wangxun/libwx/wx_ethtool.c   | 24 +++++++------------
> >  drivers/net/ethernet/wangxun/ngbe/ngbe_main.c |  5 ++--
> >  2 files changed, 10 insertions(+), 19 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/wangxun/libwx/wx_ethtool.c b/drivers/net/ethernet/wangxun/libwx/wx_ethtool.c
> > index c12a4cb951f6..85fb23b238d1 100644
> > --- a/drivers/net/ethernet/wangxun/libwx/wx_ethtool.c
> > +++ b/drivers/net/ethernet/wangxun/libwx/wx_ethtool.c
> > @@ -340,13 +340,19 @@ int wx_set_coalesce(struct net_device *netdev,
> >  	switch (wx->mac.type) {
> >  	case wx_mac_sp:
> >  		max_eitr = WX_SP_MAX_EITR;
> > +		rx_itr_param = WX_20K_ITR;
> > +		tx_itr_param = WX_12K_ITR;
> >  		break;
> >  	case wx_mac_aml:
> >  	case wx_mac_aml40:
> >  		max_eitr = WX_AML_MAX_EITR;
> > +		rx_itr_param = WX_20K_ITR;
> > +		tx_itr_param = WX_12K_ITR;
> >  		break;
> >  	default:
> >  		max_eitr = WX_EM_MAX_EITR;
> > +		rx_itr_param = WX_7K_ITR;
> > +		tx_itr_param = WX_7K_ITR;
> >  		break;
> >  	}
> >
> > @@ -359,9 +365,7 @@ int wx_set_coalesce(struct net_device *netdev,
> >  	else
> >  		wx->rx_itr_setting = ec->rx_coalesce_usecs;
> >
> > -	if (wx->rx_itr_setting == 1)
> > -		rx_itr_param = WX_20K_ITR;
> > -	else

default rx_itr_param here

> > +	if (wx->rx_itr_setting != 1)
> >  		rx_itr_param = wx->rx_itr_setting;
> >
> >  	if (ec->tx_coalesce_usecs > 1)
> > @@ -369,20 +373,8 @@ int wx_set_coalesce(struct net_device *netdev,
> >  	else
> >  		wx->tx_itr_setting = ec->tx_coalesce_usecs;
> >
> > -	if (wx->tx_itr_setting == 1) {
> > -		switch (wx->mac.type) {
> > -		case wx_mac_sp:
> > -		case wx_mac_aml:
> > -		case wx_mac_aml40:
> > -			tx_itr_param = WX_12K_ITR;
> > -			break;
> > -		default:
> > -			tx_itr_param = WX_20K_ITR;
> > -			break;
> 
> It looks like you previously set some of these values here, but now you
> set them higher up in the function.
> 
> Its a bit hard to tell whats actually being changed here because of that.

In fact, here it's just a change of default rx/tx itr for wx_mac_em from
20k to 7k. It's an experience value from out-of-tree ngbe driver, to get
higher performance on various platforms.

As for the other changes, just cleanup the code for the next patches.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ