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: <d45910fb-f479-4991-85c8-7dd5e2642ff0@intel.com>
Date: Mon, 21 Jul 2025 16:55:45 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Jiawen Wu <jiawenwu@...stnetic.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 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
> +	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.



Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (237 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ