mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Wei Fang <wei.fang@nxp.com>
Cc: Jonas Rebmann <jre@pengutronix.de>,
	"imx@lists.linux.dev" <imx@lists.linux.dev>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	Shenwei Wang <shenwei.wang@nxp.com>,
	Clark Wang <xiaoning.wang@nxp.com>,
	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>
Subject: Re: [PATCH] net: fec: allow disable coalescing
Date: Thu, 26 Jun 2025 10:12:07 +0200	[thread overview]
Message-ID: <d60808b3-eb20-40ab-b952-d9cd8d8d68a7@lunn.ch> (raw)
In-Reply-To: <PAXPR04MB8510C17E1980D456FD9F094F887AA@PAXPR04MB8510.eurprd04.prod.outlook.com>

On Thu, Jun 26, 2025 at 02:36:37AM +0000, Wei Fang wrote:
> >  static void fec_enet_itr_coal_set(struct net_device *ndev)
> >  {
> >         struct fec_enet_private *fep = netdev_priv(ndev);
> > -       int rx_itr, tx_itr;
> > +       int rx_itr = 0, tx_itr = 0;
> 
> Since you modified this line, it would be a good idea to change
> the type to u32.
> 
> > 
> > -       /* Must be greater than zero to avoid unpredictable behavior */
> > -       if (!fep->rx_time_itr || !fep->rx_pkts_itr ||
> > -           !fep->tx_time_itr || !fep->tx_pkts_itr)
> > -               return;

Hi Wei

When i see a comment like this being removed, i wounder if there is
any danger of side effects? Do you know what is being done here is
actually safe, for all the different versions of the FEC which support
coalescence?

Thanks
	Andrew

  reply	other threads:[~2025-06-26  8:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-25 14:21 Jonas Rebmann
2025-06-26  2:36 ` Wei Fang
2025-06-26  8:12   ` Andrew Lunn [this message]
2025-06-26  8:33     ` Jonas Rebmann
2025-06-26  8:40       ` Wei Fang
2025-06-26  8:59       ` Andrew Lunn

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=d60808b3-eb20-40ab-b952-d9cd8d8d68a7@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=imx@lists.linux.dev \
    --cc=jre@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shenwei.wang@nxp.com \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.wang@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®