When you're willing to trust the USB host not to commit certain errors, the
CPPI "rndis" RX mode can be used with the peripheral side g_ether driver.
(In other cases, rndis rx mode tends to misbehave _very_ rudely ...)
This patch adds a heuristic to detect when the safe scenario is likely, and
a module parameter to disable the heuristic in contexts when it's likely
to fail; for example, users of gadgetfs will likely need to disable it.
This gave about a 60% improvement in throughput with CDC Ethernet (!!) and a
slight reduction in CPU load. That's measured with TTCP, which pushes a lot
of full size Ethernet frames and thus can see three IRQs per packet reduced
to just one, and also get I/O overlap when double buffering packets. That is,
net 10 MByte/sec sustained, using double buffering but no DMA transfer queues;
it's unclear why TX is still just 6 MByte/sec.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>