From: Sean Anderson <sean.anderson@linux.dev>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
Andrew Lunn <andrew+netdev@lunn.ch>,
linux-kernel@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next] net: cadence: macb: Implement BQL
Date: Thu, 20 Feb 2025 10:55:45 -0500 [thread overview]
Message-ID: <10a50a6c-a6be-4723-80b3-62119f667977@linux.dev> (raw)
In-Reply-To: <20250218175700.4493dc49@kernel.org>
On 2/18/25 20:57, Jakub Kicinski wrote:
> On Fri, 14 Feb 2025 16:16:43 -0500 Sean Anderson wrote:
>> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
>> index 48496209fb16..63c65b4bb348 100644
>> --- a/drivers/net/ethernet/cadence/macb_main.c
>> +++ b/drivers/net/ethernet/cadence/macb_main.c
>> @@ -1081,6 +1081,9 @@ static void macb_tx_error_task(struct work_struct *work)
>> tx_error_task);
>> bool halt_timeout = false;
>> struct macb *bp = queue->bp;
>> + u32 queue_index = queue - bp->queues;
>
> nit: breaking reverse xmas tree here
It has to happen here since bp isn't available earlier.
>> + u32 packets = 0;
>> + u32 bytes = 0;
>> struct macb_tx_skb *tx_skb;
>> struct macb_dma_desc *desc;
>> struct sk_buff *skb;
>
>
>> @@ -3019,6 +3033,7 @@ static int macb_close(struct net_device *dev)
>> netif_tx_stop_all_queues(dev);
>>
>> for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) {
>> + netdev_tx_reset_queue(netdev_get_tx_queue(dev, q));
>> napi_disable(&queue->napi_rx);
>> napi_disable(&queue->napi_tx);
>
> I think you should reset after napi_disable()?
> Lest NAPI runs after the reset and tries to complete on an empty queue..
OK.
--Sean
next prev parent reply other threads:[~2025-02-20 15:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 21:16 Sean Anderson
2025-02-19 1:57 ` Jakub Kicinski
2025-02-20 15:55 ` Sean Anderson [this message]
2025-02-20 16:51 ` Jakub Kicinski
2025-02-20 16:53 ` Sean Anderson
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=10a50a6c-a6be-4723-80b3-62119f667977@linux.dev \
--to=sean.anderson@linux.dev \
--cc=andrew+netdev@lunn.ch \
--cc=claudiu.beznea@tuxon.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--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 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®