s390/qeth: drop unwanted packets earlier in RX path
authorJulian Wiedmann <jwi@linux.ibm.com>
Thu, 14 Nov 2019 10:19:16 +0000 (11:19 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Nov 2019 02:16:51 +0000 (18:16 -0800)
commit7d4faee7c6db9ddfb2b4de637dc6f1576f780bd7
treeadba9e4c897b8135ef41e1020358b407b7b7e6ba
parent5fd3fcbb8af8f9bc82afd84937393c193b95c204
s390/qeth: drop unwanted packets earlier in RX path

Packets with an unexpected HW format are currently first extracted from
the RX buffer, passed upwards to the layer-specific driver and only then
finally dropped.

Enhance the RX path so that we can drop such packets before even
allocating an skb. For this, add some additional logic so that when a
packet is meant to be dropped, we can still walk along the packet's data
chunks in the RX buffer. This allows us to extract the following
packet(s) from the buffer.

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