diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2019-08-23 12:48:50 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-25 02:39:18 +0300 |
commit | e53edf743d26b39dfd78af43ff97620a4ac13ffc (patch) | |
tree | 7296d1e7e7f8f8caadf0b8251fb1154fdc9ee2e5 /arch/s390/include/asm/qdio.h | |
parent | eeac0e20a173dd9407e7092b3ddb45917249d68d (diff) | |
download | linux-e53edf743d26b39dfd78af43ff97620a4ac13ffc.tar.xz |
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>
Diffstat (limited to 'arch/s390/include/asm/qdio.h')
-rw-r--r-- | arch/s390/include/asm/qdio.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/include/asm/qdio.h b/arch/s390/include/asm/qdio.h index 556d3e703fae..78e8a888306d 100644 --- a/arch/s390/include/asm/qdio.h +++ b/arch/s390/include/asm/qdio.h @@ -16,6 +16,7 @@ #define QDIO_MAX_QUEUES_PER_IRQ 4 #define QDIO_MAX_BUFFERS_PER_Q 128 #define QDIO_MAX_BUFFERS_MASK (QDIO_MAX_BUFFERS_PER_Q - 1) +#define QDIO_BUFNR(num) ((num) & QDIO_MAX_BUFFERS_MASK) #define QDIO_MAX_ELEMENTS_PER_BUFFER 16 #define QDIO_SBAL_SIZE 256 |