[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250820081713.2d243c55@kernel.org>
Date: Wed, 20 Aug 2025 08:17:13 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Parvathi Pudi <parvathi@...thit.com>
Cc: danishanwar <danishanwar@...com>, rogerq <rogerq@...nel.org>,
andrew+netdev <andrew+netdev@...n.ch>, davem <davem@...emloft.net>,
edumazet <edumazet@...gle.com>, pabeni <pabeni@...hat.com>, robh
<robh@...nel.org>, krzk+dt <krzk+dt@...nel.org>, conor+dt
<conor+dt@...nel.org>, ssantosh <ssantosh@...nel.org>, richardcochran
<richardcochran@...il.com>, m-malladi <m-malladi@...com>, s hauer
<s.hauer@...gutronix.de>, afd <afd@...com>, jacob e keller
<jacob.e.keller@...el.com>, horms <horms@...nel.org>, johan
<johan@...nel.org>, m-karicheri2 <m-karicheri2@...com>, s-anna
<s-anna@...com>, glaroque <glaroque@...libre.com>, saikrishnag
<saikrishnag@...vell.com>, kory maincent <kory.maincent@...tlin.com>, diogo
ivo <diogo.ivo@...mens.com>, javier carrasco cruz
<javier.carrasco.cruz@...il.com>, basharath <basharath@...thit.com>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>, netdev
<netdev@...r.kernel.org>, devicetree <devicetree@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>, Vadim Fedorenko
<vadim.fedorenko@...ux.dev>, ALOK TIWARI <alok.a.tiwari@...cle.com>,
Bastien Curutchet <bastien.curutchet@...tlin.com>, pratheesh
<pratheesh@...com>, Prajith Jayarajan <prajith@...com>, Vignesh Raghavendra
<vigneshr@...com>, praneeth <praneeth@...com>, srk <srk@...com>, rogerq
<rogerq@...com>, krishna <krishna@...thit.com>, pmohan
<pmohan@...thit.com>, mohan <mohan@...thit.com>
Subject: Re: [PATCH net-next v13 4/5] net: ti: prueth: Adds link detection,
RX and TX support.
On Wed, 20 Aug 2025 18:38:17 +0530 (IST) Parvathi Pudi wrote:
> > On Mon, 18 Aug 2025 18:39:37 +0530 (IST) Parvathi Pudi wrote:
> >> + if (num_rx_packets < budget && napi_complete_done(napi, num_rx_packets))
> >> enable_irq(emac->rx_irq);
> >> - }
> >>
> >> return num_rx_packets;
> >> }
> >>
> >> We will address this in the next version.
> >
> > Ideally:
> >
> > if (num_rx < budget && napi_complete_done()) {
> > enable_irq();
> > return num_rx;
> > }
> >
> > return budget;
>
> However, if num_rx < budget and if napi_complete_done() is false, then
> instead of returning the num_rx the above code will return budget.
>
> So, unless I am missing something, the previous logic seems correct to me.
> Please let me know otherwise.
IIRC either way is fine, as long as num_rx doesn't go over budget.
Powered by blists - more mailing lists