RE: [PATCH net] r8152: avoid the driver drops a lot of packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paolo Abeni <pabeni@xxxxxxxxxx>
> 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






[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux