From: Hayes Wang <hayeswang@realtek.com>
To: Paolo Abeni <pabeni@redhat.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
nic_swsd <nic_swsd@realtek.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: RE: [PATCH net] r8152: avoid the driver drops a lot of packets
Date: Tue, 5 Sep 2023 12:58:18 +0000 [thread overview]
Message-ID: <d46e648ffb2846bea6d7066673135ca0@realtek.com> (raw)
In-Reply-To: <223569649ad4ded66786fcc424156b2115b8ccd8.camel@redhat.com>
Paolo Abeni <pabeni@redhat.com>
> Sent: Tuesday, September 5, 2023 7:21 PM
[...]
> I'm sorry, I have a very superficial knowledge of the USB layer, but it
> looks like that when such condition is reached, in the worst condition
> there could be up to urbs in flight. AFAICS each of them carries a 16K
> buffer, can be up to 10 standard-mtu packets - or much more small ones.
>
> Setting an upper limits to the rx_queue still looks like a reasonable
> safeguard.
I think it is very hard to queue more than 1000 packets. The NAPI continues
consuming the queued packets. And, the hardware wouldn't complete all
urbs at one time. However, I would add WARN_ON_ONCE() to observe if
any exception would occur.
> > Besides, if the flow control is disabled, the packets may be dropped by
> > the hardware when the FIFO of the device is full, after the driver stops
> > submitting rx.
>
> If the incoming rate exceeds the H/W processing capacity, packets are
> dropped: that is expected and unavoidable.
>
> Possibly exposing the root cause for such drops to user space via
> appropriate stats would be useful.
The number of packet which the device drops could be got through
ethtool.
Best Regards,
Hayes
prev parent reply other threads:[~2023-09-05 16:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-04 12:17 [PATCH net] r8152: avoid the driver drops a lot of packets Hayes Wang
2023-09-05 10:10 ` Paolo Abeni
2023-09-05 10:37 ` Hayes Wang
2023-09-05 11:21 ` Paolo Abeni
2023-09-05 12:58 ` Hayes Wang [this message]
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=d46e648ffb2846bea6d7066673135ca0@realtek.com \
--to=hayeswang@realtek.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.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