lan78xx: Introduce Rx URB processing improvements
authorJohn Efstathiades <john.efstathiades@pebblebay.com>
Thu, 18 Nov 2021 11:01:36 +0000 (11:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Nov 2021 12:11:50 +0000 (12:11 +0000)
commitc450a8eb187a4d7ebe92e0afec54ac31ce403e79
tree03436227d347c1173edcf4d530ed67abad9cf283
parentd383216a7efec3b38b8bd4925a208383b2492d84
lan78xx: Introduce Rx URB processing improvements

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

A pool of Rx URBs is created during driver instantiation. All the
URBs are initially submitted to the USB host controller for
processing.

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.

Completed URBs are processed in the driver bottom half. The URB
buffer contents are copied to a dynamically allocated SKB, which is
then passed to the network stack. The URB is then re-submitted to
the USB host controller.

NOTE: the call to skb_copy() in rx_process() that copies the URB
contents to a new SKB is a temporary change to make this patch work
in its own right. This call will be removed when the NAPI processing
is introduced by patch 6 in this patch set.

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