]> git.baikalelectronics.ru Git - kernel.git/commit
lan78xx: Introduce Tx URB processing improvements
authorJohn Efstathiades <john.efstathiades@pebblebay.com>
Thu, 18 Nov 2021 11:01:35 +0000 (11:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Nov 2021 12:11:50 +0000 (12:11 +0000)
commit447e57606ca9e211d2ae9d4cc273eefb268fb935
treeb80909b1dd05f9792fd6fe01438de36425d966e3
parent3cd046c1a2937db42be1e858b25f4cd53b4fc9a9
lan78xx: Introduce Tx URB processing improvements

This patch introduces a new approach to allocating and managing
Tx URBs that contributes to improving driver throughput and reducing
CPU load.

A pool of Tx URBs is created during driver instantiation. A URB is
allocated from the pool when there is data to transmit. The URB is
released back to the pool when the data has been transmitted by the
device.

The default URB buffer size is different for each USB bus speed.
The chosen sizes provide good USB utilisation with little impact on
overall packet latency.

SKBs to be transmitted are added to a pending queue for processing.
The driver tracks the available Tx URB buffer space and copies as
much pending data as possible into each free URB. Each full URB
is then submitted to the USB host controller for transmission.

Signed-off-by: John Efstathiades <john.efstathiades@pebblebay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/lan78xx.c