[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1969814282.190581.1755522577590.JavaMail.zimbra@couthit.local>
Date: Mon, 18 Aug 2025 18:39:37 +0530 (IST)
From: Parvathi Pudi <parvathi@...thit.com>
To: kuba <kuba@...nel.org>
Cc: parvathi <parvathi@...thit.com>, 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@...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.
Hi,
> On Tue, 12 Aug 2025 19:04:19 +0530 Parvathi Pudi wrote:
>> +static irqreturn_t icssm_emac_rx_packets(struct prueth_emac *emac, int quota)
>
> Please stick to calling the budget budget rather than synonym terms
> like "quota". Makes it harder to review the code.
>
We will address this in the next version.
>> + /* search host queues for packets */
>> + for (i = start_queue; i <= end_queue; i++) {
>> + queue_desc = emac->rx_queue_descs + i;
>> + rxqueue = &queue_infos[PRUETH_PORT_HOST][i];
>
> budget can be 0, in which case the driver is not supposed to process
> Rx, just Tx (if the NAPI instance is used to serve completions).
>
We will add the following check to handle the case when NAPI
calls with a zero budget.
@@ -766,6 +766,10 @@ static irqreturn_t icssm_emac_rx_packets(struct prueth_emac *emac, int budget)
start_queue = emac->rx_queue_start;
end_queue = emac->rx_queue_end;
+ /* skip Rx if budget is 0 */
+ if (!budget)
+ return 0;
+
/* search host queues for packets */
for (i = start_queue; i <= end_queue; i++) {
queue_desc = emac->rx_queue_descs + i;
We will address this in the next version.
>> + num_rx_packets = icssm_emac_rx_packets(emac, budget);
>> + if (num_rx_packets < budget) {
>> + napi_complete_done(napi, num_rx_packets);
>
> don't ignore the return value of napi_complete_done()
> --
We will update the code to check the return value of napi_complete_done()
as shown below.
@@ -840,10 +844,9 @@ static int icssm_emac_napi_poll(struct napi_struct *napi, int budget)
int num_rx_packets;
num_rx_packets = icssm_emac_rx_packets(emac, budget);
- if (num_rx_packets < budget) {
- napi_complete_done(napi, num_rx_packets);
+
+ 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.
Thanks and Regards,
Parvathi.
Powered by blists - more mailing lists