All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Jacob Keller'" <jacob.e.keller@intel.com>,
	<netdev@vger.kernel.org>, "'Andrew Lunn'" <andrew+netdev@lunn.ch>,
	"'David S. Miller'" <davem@davemloft.net>,
	"'Eric Dumazet'" <edumazet@google.com>,
	"'Jakub Kicinski'" <kuba@kernel.org>,
	"'Paolo Abeni'" <pabeni@redhat.com>,
	"'Simon Horman'" <horms@kernel.org>
Cc: "'Mengyuan Lou'" <mengyuanlou@net-swift.com>
Subject: RE: [PATCH net-next v2 1/3] net: wangxun: change the default ITR setting
Date: Tue, 22 Jul 2025 10:40:12 +0800	[thread overview]
Message-ID: <02ae01dbfab1$f30618a0$d91249e0$@trustnetic.com> (raw)
In-Reply-To: <d45910fb-f479-4991-85c8-7dd5e2642ff0@intel.com>

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@trustnetic.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.



  reply	other threads:[~2025-07-22  2:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-21  8:01 [PATCH net-next v2 0/3] net: wangxun: complete ethtool coalesce options Jiawen Wu
2025-07-21  8:01 ` [PATCH net-next v2 1/3] net: wangxun: change the default ITR setting Jiawen Wu
2025-07-21 23:55   ` Jacob Keller
2025-07-22  2:40     ` Jiawen Wu [this message]
2025-07-22 21:46       ` Jacob Keller
2025-07-21  8:01 ` [PATCH net-next v2 2/3] net: wangxun: limit tx_max_coalesced_frames_irq Jiawen Wu
2025-07-21 23:57   ` Jacob Keller
2025-07-24  7:40     ` Jiawen Wu
2025-07-21  8:01 ` [PATCH net-next v2 3/3] net: wangxun: support to use adaptive RX coalescing Jiawen Wu
2025-07-22  0:02   ` Jacob Keller
2025-07-22 23:00     ` Jakub Kicinski
2025-07-22 23:07       ` Jacob Keller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='02ae01dbfab1$f30618a0$d91249e0$@trustnetic.com' \
    --to=jiawenwu@trustnetic.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=kuba@kernel.org \
    --cc=mengyuanlou@net-swift.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.