OSDN Git Service

s390/qeth: clean up fill_buffer() offset logic
authorJulian Wiedmann <jwi@linux.vnet.ibm.com>
Tue, 15 Aug 2017 15:02:44 +0000 (17:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Aug 2017 17:58:39 +0000 (10:58 -0700)
commitcc309f83d16e0229d3c4051e1bb53579bfd2d3a8
tree66d87cee5747abaa1f68f1e3a4290db27a2ac0d5
parent384d2ef145062fcbd3993d80456155e27418cbf2
s390/qeth: clean up fill_buffer() offset logic

For some xmit paths we pass down a data offset to qeth_fill_buffer(),
to indicate that the first k bytes of the skb should be skipped when
mapping it into buffer elements.
Commit acd9776b5c45 ("s390/qeth: no ETH header for outbound AF_IUCV")
recently switched the offset for the IUCV-over-HiperSockets path
from 0 to ETH_HLEN, and now we have

device offset
OSA = 0
IQD > 0

for all xmit paths.

OSA would previously pass down -1 from do_send_packet(), to distinguish
between 1) OSA and 2) IQD with offset 0. That's no longer needed now,
so have it pass 0, make the offset unsigned and clean up how we apply
the offset in __qeth_fill_buffer().

No change of behaviour for any of our current xmit paths.

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