From: Parvathi Pudi <parvathi@couthit.com>
To: kuba <kuba@kernel.org>
Cc: pratheesh <pratheesh@ti.com>,
Vignesh Raghavendra <vigneshr@ti.com>, praneeth <praneeth@ti.com>,
edumazet <edumazet@google.com>, glaroque <glaroque@baylibre.com>,
pmohan <pmohan@couthit.com>, diogo ivo <diogo.ivo@siemens.com>,
robh <robh@kernel.org>,
javier carrasco cruz <javier.carrasco.cruz@gmail.com>,
saikrishnag <saikrishnag@marvell.com>,
m-karicheri2 <m-karicheri2@ti.com>,
Bastien Curutchet <bastien.curutchet@bootlin.com>,
mohan <mohan@couthit.com>,
jacob e keller <jacob.e.keller@intel.com>,
pabeni <pabeni@redhat.com>, s hauer <s.hauer@pengutronix.de>,
devicetree <devicetree@vger.kernel.org>,
conor+dt <conor+dt@kernel.org>,
ALOK TIWARI <alok.a.tiwari@oracle.com>,
richardcochran <richardcochran@gmail.com>,
johan@kernel.org, Prajith Jayarajan <prajith@ti.com>,
rogerq <rogerq@kernel.org>, basharath <basharath@couthit.com>,
ssantosh <ssantosh@kernel.org>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
rogerq <rogerq@ti.com>, srk <srk@ti.com>,
kory maincent <kory.maincent@bootlin.com>,
m-malladi <m-malladi@ti.com>, netdev <netdev@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
danishanwar <danishanwar@ti.com>, afd <afd@ti.com>,
andrew+netdev <andrew+netdev@lunn.ch>,
parvathi <parvathi@couthit.com>, horms <horms@kernel.org>,
krishna <krishna@couthit.com>, krzk+dt <krzk+dt@kernel.org>,
davem <davem@davemloft.net>
Subject: Re: [PATCH net-next v13 4/5] net: ti: prueth: Adds link detection, RX and TX support.
Date: Mon, 18 Aug 2025 18:39:37 +0530 (IST) [thread overview]
Message-ID: <1969814282.190581.1755522577590.JavaMail.zimbra@couthit.local> (raw)
In-Reply-To: <20250815115956.0f36ae06@kernel.org>
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.
WARNING: multiple messages have this Message-ID (diff)
From: Parvathi Pudi <parvathi@couthit.com>
To: kuba <kuba@kernel.org>
Cc: parvathi <parvathi@couthit.com>, danishanwar <danishanwar@ti.com>,
rogerq <rogerq@kernel.org>,
andrew+netdev <andrew+netdev@lunn.ch>,
davem <davem@davemloft.net>, edumazet <edumazet@google.com>,
pabeni <pabeni@redhat.com>, robh <robh@kernel.org>,
krzk+dt <krzk+dt@kernel.org>, conor+dt <conor+dt@kernel.org>,
ssantosh <ssantosh@kernel.org>,
richardcochran <richardcochran@gmail.com>,
m-malladi <m-malladi@ti.com>, s hauer <s.hauer@pengutronix.de>,
afd <afd@ti.com>, jacob e keller <jacob.e.keller@intel.com>,
horms <horms@kernel.org>,
johan@kernel.org, m-karicheri2 <m-karicheri2@ti.com>,
s-anna <s-anna@ti.com>, glaroque <glaroque@baylibre.com>,
saikrishnag <saikrishnag@marvell.com>,
kory maincent <kory.maincent@bootlin.com>,
diogo ivo <diogo.ivo@siemens.com>,
javier carrasco cruz <javier.carrasco.cruz@gmail.com>,
basharath <basharath@couthit.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
netdev <netdev@vger.kernel.org>,
devicetree <devicetree@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>,
ALOK TIWARI <alok.a.tiwari@oracle.com>,
Bastien Curutchet <bastien.curutchet@bootlin.com>,
pratheesh <pratheesh@ti.com>, Prajith Jayarajan <prajith@ti.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
praneeth <praneeth@ti.com>, srk <srk@ti.com>,
rogerq <rogerq@ti.com>, krishna <krishna@couthit.com>,
pmohan <pmohan@couthit.com>, mohan <mohan@couthit.com>
Subject: Re: [PATCH net-next v13 4/5] net: ti: prueth: Adds link detection, RX and TX support.
Date: Mon, 18 Aug 2025 18:39:37 +0530 (IST) [thread overview]
Message-ID: <1969814282.190581.1755522577590.JavaMail.zimbra@couthit.local> (raw)
In-Reply-To: <20250815115956.0f36ae06@kernel.org>
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.
next prev parent reply other threads:[~2025-08-18 14:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-12 11:05 [PATCH net-next v13 0/5] PRU-ICSSM Ethernet Driver Parvathi Pudi
2025-08-12 11:05 ` [PATCH net-next v13 1/5] dt-bindings: net: ti: Adds DUAL-EMAC mode support on PRU-ICSS2 for AM57xx, AM43xx and AM33xx SOCs Parvathi Pudi
2025-08-12 11:05 ` [PATCH net-next v13 2/5] net: ti: prueth: Adds ICSSM Ethernet driver Parvathi Pudi
2025-08-12 11:05 ` [PATCH net-next v13 3/5] net: ti: prueth: Adds PRUETH HW and SW configuration Parvathi Pudi
2025-08-12 13:34 ` [PATCH net-next v13 4/5] net: ti: prueth: Adds link detection, RX and TX support Parvathi Pudi
2025-08-15 18:59 ` Jakub Kicinski
2025-08-15 18:59 ` Jakub Kicinski
2025-08-18 13:09 ` Parvathi Pudi [this message]
2025-08-18 13:09 ` Parvathi Pudi
2025-08-18 15:40 ` Jakub Kicinski
2025-08-18 15:40 ` Jakub Kicinski
2025-08-20 13:08 ` Parvathi Pudi
2025-08-20 13:08 ` Parvathi Pudi
2025-08-20 15:17 ` Jakub Kicinski
2025-08-20 15:17 ` Jakub Kicinski
2025-08-21 10:22 ` Parvathi Pudi
2025-08-21 10:22 ` Parvathi Pudi
2025-08-12 13:34 ` [PATCH net-next v13 5/5] net: ti: prueth: Adds IEP support for PRUETH on AM33x, AM43x and AM57x SOCs Parvathi Pudi
2025-08-18 15:59 ` [PATCH net-next v13 0/5] PRU-ICSSM Ethernet Driver Anwar, Md Danish
2025-08-20 13:12 ` Parvathi Pudi
2025-08-20 13:12 ` Parvathi Pudi
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=1969814282.190581.1755522577590.JavaMail.zimbra@couthit.local \
--to=parvathi@couthit.com \
--cc=afd@ti.com \
--cc=alok.a.tiwari@oracle.com \
--cc=andrew+netdev@lunn.ch \
--cc=basharath@couthit.com \
--cc=bastien.curutchet@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=diogo.ivo@siemens.com \
--cc=edumazet@google.com \
--cc=glaroque@baylibre.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=johan@kernel.org \
--cc=kory.maincent@bootlin.com \
--cc=krishna@couthit.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m-karicheri2@ti.com \
--cc=m-malladi@ti.com \
--cc=mohan@couthit.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pmohan@couthit.com \
--cc=prajith@ti.com \
--cc=praneeth@ti.com \
--cc=pratheesh@ti.com \
--cc=richardcochran@gmail.com \
--cc=robh@kernel.org \
--cc=rogerq@kernel.org \
--cc=rogerq@ti.com \
--cc=s.hauer@pengutronix.de \
--cc=saikrishnag@marvell.com \
--cc=srk@ti.com \
--cc=ssantosh@kernel.org \
--cc=vadim.fedorenko@linux.dev \
--cc=vigneshr@ti.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.