OSDN Git Service

s390/qeth: add TX NAPI support for IQD devices
authorJulian Wiedmann <jwi@linux.ibm.com>
Fri, 23 Aug 2019 09:48:50 +0000 (11:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 24 Aug 2019 23:39:18 +0000 (16:39 -0700)
commite53edf743d26b39dfd78af43ff97620a4ac13ffc
tree7296d1e7e7f8f8caadf0b8251fb1154fdc9ee2e5
parenteeac0e20a173dd9407e7092b3ddb45917249d68d
s390/qeth: add TX NAPI support for IQD devices

Due to their large MTU and potentially low utilization of TX buffers,
IQD devices in particular require fast TX recycling. This makes them
a prime candidate for a TX NAPI path in qeth.

qeth_tx_poll() uses the recently introduced qdio_inspect_queue() helper
to poll the TX queue for completed buffers. To avoid hogging the CPU for
too long, we yield to the stack after completing an entire queue's worth
of buffers.
While IQD is expected to transfer its buffers synchronously (and thus
doesn't support TX interrupts), a timer covers for the odd case where a
TX buffer doesn't complete synchronously. Currently this timer should
only ever fire for
(1) the mcast queue,
(2) the occasional race, where the NAPI poll code observes an update to
    queue->used_buffers while the TX doorbell hasn't been issued yet.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/s390/include/asm/qdio.h
drivers/s390/net/qeth_core.h
drivers/s390/net/qeth_core_main.c
drivers/s390/net/qeth_ethtool.c