]> git.baikalelectronics.ru Git - kernel.git/commit
s390/qeth: simplify RX buffer tracking
authorJulian Wiedmann <jwi@linux.ibm.com>
Wed, 25 Mar 2020 09:34:57 +0000 (10:34 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Mar 2020 19:07:15 +0000 (12:07 -0700)
commit13db39616949cd1009d03191e8b0a8fdf02bcf32
treebd42e8da429767c02521eefd0abb61fdcc175787
parenta7d05703c8760b2a25c76c2b630f69dba5a0dd7b
s390/qeth: simplify RX buffer tracking

Since RX buffers may contain multiple packets, qeth's NAPI poll code can
exhaust its budget in the middle of an RX buffer. Thus we keep track of
our current position within the active RX buffer, so we can resume
processing here in the next NAPI poll period.

Clean up that code by tracking the index of the active buffer element,
instead of a pointer to it.
Also simplify the code that advances to the next RX buffer when the
current buffer has been fully processed.

v2: - remove QDIO_ELEMENT_NO() macro (davem)

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