s390/qeth: improve completion of pending TX buffers
authorJulian Wiedmann <jwi@linux.ibm.com>
Tue, 9 Mar 2021 16:52:19 +0000 (17:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:06:20 +0000 (17:06 +0100)
commitf7a7d3ede5f51c1d24d530d6d18fc4f6d8177f82
tree400f6dfb0173cc5d249e2a61d749eaf5a8c51ae5
parent144dbdf86c7acbed013b799f03e01dc14b1e222b
s390/qeth: improve completion of pending TX buffers

[ Upstream commit c20383ad1656b0f6354dd50e4acd894f9d94090d ]

The current design attaches a pending TX buffer to a custom
single-linked list, which is anchored at the buffer's slot on the
TX ring. The buffer is then checked for final completion whenever
this slot is processed during a subsequent TX NAPI poll cycle.

But if there's insufficient traffic on the ring, we might never make
enough progress to get back to this ring slot and discover the pending
buffer's final TX completion. In particular if this missing TX
completion blocks the application from sending further traffic.

So convert the custom single-linked list code to a per-queue list_head,
and scan this list on every TX NAPI cycle.

Fixes: 0da9581ddb0f ("qeth: exploit asynchronous delivery of storage blocks")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/s390/net/qeth_core.h
drivers/s390/net/qeth_core_main.c