s390/qeth: increase GSO max size for eligible L3 devices
authorJulian Wiedmann <jwi@linux.ibm.com>
Wed, 11 Jul 2018 15:42:44 +0000 (17:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Jul 2018 23:42:39 +0000 (16:42 -0700)
When a L3 device doesn't offer TSO, allow the stack to build full-size
GSO skbs.

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

index 7b4de46bf6e3654a243c77243cfa7e03e2e2d8f2..d07803df460ba1b1c07c80a8f2e4f84b73540387 100644 (file)
@@ -2536,8 +2536,9 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)
                                NETIF_F_HW_VLAN_CTAG_RX |
                                NETIF_F_HW_VLAN_CTAG_FILTER;
        netif_keep_dst(card->dev);
-       netif_set_gso_max_size(card->dev, (QETH_MAX_BUFFER_ELEMENTS(card) - 1) *
-                                         PAGE_SIZE);
+       if (card->dev->hw_features & NETIF_F_TSO)
+               netif_set_gso_max_size(card->dev,
+                                      PAGE_SIZE * (QETH_MAX_BUFFER_ELEMENTS(card) - 1));
 
        SET_NETDEV_DEV(card->dev, &card->gdev->dev);
        netif_napi_add(card->dev, &card->napi, qeth_poll, QETH_NAPI_WEIGHT);