]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.9.70/s390-qeth-build-max-size-gso-skbs-on-l2-devices.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.9.70 / s390-qeth-build-max-size-gso-skbs-on-l2-devices.patch
1 From foo@baz Thu Dec 14 11:45:58 CET 2017
2 From: Julian Wiedmann <jwi@linux.vnet.ibm.com>
3 Date: Fri, 1 Dec 2017 10:14:51 +0100
4 Subject: s390/qeth: build max size GSO skbs on L2 devices
5
6 From: Julian Wiedmann <jwi@linux.vnet.ibm.com>
7
8
9 [ Upstream commit 0cbff6d4546613330a1c5f139f5c368e4ce33ca1 ]
10
11 The current GSO skb size limit was copy&pasted over from the L3 path,
12 where it is needed due to a TSO limitation.
13 As L2 devices don't offer TSO support (and thus all GSO skbs are
14 segmented before they reach the driver), there's no reason to restrict
15 the stack in how large it may build the GSO skbs.
16
17 Fixes: d52aec97e5bc ("qeth: enable scatter/gather in layer 2 mode")
18 Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
19 Signed-off-by: David S. Miller <davem@davemloft.net>
20 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 ---
22 drivers/s390/net/qeth_l2_main.c | 2 --
23 drivers/s390/net/qeth_l3_main.c | 4 ++--
24 2 files changed, 2 insertions(+), 4 deletions(-)
25
26 --- a/drivers/s390/net/qeth_l2_main.c
27 +++ b/drivers/s390/net/qeth_l2_main.c
28 @@ -1140,8 +1140,6 @@ static int qeth_l2_setup_netdev(struct q
29 }
30 card->info.broadcast_capable = 1;
31 qeth_l2_request_initial_mac(card);
32 - card->dev->gso_max_size = (QETH_MAX_BUFFER_ELEMENTS(card) - 1) *
33 - PAGE_SIZE;
34 SET_NETDEV_DEV(card->dev, &card->gdev->dev);
35 netif_napi_add(card->dev, &card->napi, qeth_l2_poll, QETH_NAPI_WEIGHT);
36 netif_carrier_off(card->dev);
37 --- a/drivers/s390/net/qeth_l3_main.c
38 +++ b/drivers/s390/net/qeth_l3_main.c
39 @@ -3147,8 +3147,8 @@ static int qeth_l3_setup_netdev(struct q
40 NETIF_F_HW_VLAN_CTAG_RX |
41 NETIF_F_HW_VLAN_CTAG_FILTER;
42 netif_keep_dst(card->dev);
43 - card->dev->gso_max_size = (QETH_MAX_BUFFER_ELEMENTS(card) - 1) *
44 - PAGE_SIZE;
45 + netif_set_gso_max_size(card->dev, (QETH_MAX_BUFFER_ELEMENTS(card) - 1) *
46 + PAGE_SIZE);
47
48 SET_NETDEV_DEV(card->dev, &card->gdev->dev);
49 netif_napi_add(card->dev, &card->napi, qeth_l3_poll, QETH_NAPI_WEIGHT);