aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_core_main.c
diff options
context:
space:
mode:
authorJulian Wiedmann <jwi@linux.ibm.com>2019-12-23 15:22:27 +0100
committerDavid S. Miller <davem@davemloft.net>2019-12-26 15:23:50 -0800
commit8ca8559ff3cefd78e12b9658f21cc8bcc02407ec (patch)
tree3a5ceaaa3424c9b753d98f51c25782e477b338e0 /drivers/s390/net/qeth_core_main.c
parents390/qeth: use napi_gro_frags() for SG skbs (diff)
downloadlinux-dev-8ca8559ff3cefd78e12b9658f21cc8bcc02407ec.tar.xz
linux-dev-8ca8559ff3cefd78e12b9658f21cc8bcc02407ec.zip
s390/qeth: remove QETH_RX_PULL_LEN
Since commit f677fcb9aeb6 ("s390/qeth: ensure linear access to packet headers"), the CQ-specific skbs are allocated with a slightly bigger linear part than necessary. Shrink it down to the maximum that's needed by qeth_extract_skb(). Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/s390/net/qeth_core_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index b32b50384c5c..3be3d13f8d65 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -2627,7 +2627,8 @@ static int qeth_init_input_buffer(struct qeth_card *card,
if ((card->options.cq == QETH_CQ_ENABLED) && (!buf->rx_skb)) {
buf->rx_skb = netdev_alloc_skb(card->dev,
- QETH_RX_PULL_LEN + ETH_HLEN);
+ ETH_HLEN +
+ sizeof(struct ipv6hdr));
if (!buf->rx_skb)
return 1;
}
@@ -5264,7 +5265,8 @@ next_packet:
if (use_rx_sg) {
/* QETH_CQ_ENABLED only: */
- if (qethbuffer->rx_skb) {
+ if (qethbuffer->rx_skb &&
+ skb_tailroom(qethbuffer->rx_skb) >= linear_len + headroom) {
skb = qethbuffer->rx_skb;
qethbuffer->rx_skb = NULL;
goto use_skb;