sys-kernel/*: fix mtu regression on aws on 4.14.47

Upstream commit f599c64fdf7d9c108e8717fb04bc41c680120da4 introduced a
regression preventing setting jumbo frames on aws.
This commit is contained in:
Andrew Jeddeloh 2018-05-30 18:09:56 -07:00
parent fb361e5501
commit 027067922e
11 changed files with 174 additions and 16 deletions

View File

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=5
COREOS_SOURCE_REVISION=""
COREOS_SOURCE_REVISION="-r1"
inherit coreos-kernel
DESCRIPTION="CoreOS Linux kernel"

View File

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=5
COREOS_SOURCE_REVISION=""
COREOS_SOURCE_REVISION="-r1"
inherit coreos-kernel savedconfig
DESCRIPTION="CoreOS Linux kernel modules"

View File

@ -38,4 +38,5 @@ UNIPATCH_LIST="
${PATCH_DIR}/z0005-tools-objtool-Makefile-Don-t-fail-on-fallthrough-wit.patch \
${PATCH_DIR}/z0006-Revert-random-use-a-different-mixing-algorithm-for-a.patch \
${PATCH_DIR}/z0007-Revert-random-fix-crng_ready-test.patch \
${PATCH_DIR}/z0008-Revert-xen-netfront-Fix-race-between-device-setup-an.patch \
"

View File

@ -1,7 +1,7 @@
From ebe77e49431ed55367d45a455b82709a788d2d80 Mon Sep 17 00:00:00 2001
From: Vito Caputo <vito.caputo@coreos.com>
Date: Wed, 25 Nov 2015 02:59:45 -0800
Subject: [PATCH 1/7] kbuild: derive relative path for KBUILD_SRC from CURDIR
Subject: [PATCH 1/8] kbuild: derive relative path for KBUILD_SRC from CURDIR
This enables relocating source and build trees to different roots,
provided they stay reachable relative to one another. Useful for
@ -26,5 +26,5 @@ index d6db01a02252..1fee669eaba0 100644
# Leave processing to above invocation of make
--
2.14.3
2.14.1

View File

@ -1,7 +1,7 @@
From 906a60f26ea8061753a612dbf1c844e1fc1dee09 Mon Sep 17 00:00:00 2001
From: Geoff Levand <geoff@infradead.org>
Date: Fri, 11 Nov 2016 17:28:52 -0800
Subject: [PATCH 2/7] Add arm64 coreos verity hash
Subject: [PATCH 2/8] Add arm64 coreos verity hash
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
@ -25,5 +25,5 @@ index 613fc3000677..fdaf86c78332 100644
/*
* The debug table is referenced via its Relative Virtual Address (RVA),
--
2.14.3
2.14.1

View File

@ -1,7 +1,7 @@
From d7c042bd38706d4c41fb06d6a56caf772da9e614 Mon Sep 17 00:00:00 2001
From: Ilya Dryomov <idryomov@gmail.com>
Date: Mon, 16 Oct 2017 15:59:09 +0200
Subject: [PATCH 3/7] block: factor out __blkdev_issue_zero_pages()
Subject: [PATCH 3/8] block: factor out __blkdev_issue_zero_pages()
blkdev_issue_zeroout() will use this in !BLKDEV_ZERO_NOFALLBACK case.
@ -103,5 +103,5 @@ index 63fb971d6574..9e86a4871b0f 100644
EXPORT_SYMBOL(__blkdev_issue_zeroout);
--
2.14.3
2.14.1

View File

@ -1,7 +1,7 @@
From aa7a9c30b548aaa40701ec594bc9b98063234c78 Mon Sep 17 00:00:00 2001
From: Ilya Dryomov <idryomov@gmail.com>
Date: Mon, 16 Oct 2017 15:59:10 +0200
Subject: [PATCH 4/7] block: cope with WRITE ZEROES failing in
Subject: [PATCH 4/8] block: cope with WRITE ZEROES failing in
blkdev_issue_zeroout()
sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to
@ -106,5 +106,5 @@ index 9e86a4871b0f..2bc544ce3d2e 100644
return ret;
}
--
2.14.3
2.14.1

View File

@ -1,7 +1,7 @@
From 72647c1acff99e07729e11c97972d5199d535dde Mon Sep 17 00:00:00 2001
From: David Michael <david.michael@coreos.com>
Date: Thu, 8 Feb 2018 21:23:12 -0500
Subject: [PATCH 5/7] tools/objtool/Makefile: Don't fail on fallthrough with
Subject: [PATCH 5/8] tools/objtool/Makefile: Don't fail on fallthrough with
new GCCs
---
@ -23,5 +23,5 @@ index 95563b8e1ad7..307652c42a7b 100644
CFLAGS += -I$(srctree)/tools/include/
--
2.14.3
2.14.1

View File

@ -1,7 +1,7 @@
From af08120ff4a248fe9ff4ffbc0e361451ba8bf598 Mon Sep 17 00:00:00 2001
From: Jeremy Cline <jeremy@jcline.org>
Date: Wed, 2 May 2018 15:16:29 -0400
Subject: [PATCH 6/7] Revert "random: use a different mixing algorithm for
Subject: [PATCH 6/8] Revert "random: use a different mixing algorithm for
add_device_randomness()"
This reverts commit 7b6b1f3a192372937164d1293b432c640ffc7c8f.
@ -90,5 +90,5 @@ index ddc493d976fd..42ed176c4bfd 100644
trace_add_device_randomness(size, _RET_IP_);
spin_lock_irqsave(&input_pool.lock, flags);
--
2.14.3
2.14.1

View File

@ -1,7 +1,7 @@
From a21f8f1c1c820f41e12eab396783b23027232cdc Mon Sep 17 00:00:00 2001
From: Jeremy Cline <jeremy@jcline.org>
Date: Wed, 2 May 2018 15:18:03 -0400
Subject: [PATCH 7/7] Revert "random: fix crng_ready() test"
Subject: [PATCH 7/8] Revert "random: fix crng_ready() test"
This reverts commit 6e513bc20ca63f594632eca4e1968791240b8f18.
---
@ -58,5 +58,5 @@ index 42ed176c4bfd..0bb3d0cd7d2d 100644
return;
}
--
2.14.3
2.14.1

View File

@ -0,0 +1,157 @@
From 9358851f273063e5e52e54c6356f4f1c81fcb058 Mon Sep 17 00:00:00 2001
From: Andrew Jeddeloh <andrew.jeddeloh@coreos.com>
Date: Wed, 30 May 2018 17:45:35 -0700
Subject: [PATCH 8/8] Revert "xen-netfront: Fix race between device setup and
open"
This reverts commit 70f3461c23ffb394676cb53c2eb1095208a52327.
This causes failures to set mtu > 1500 on some aws instances.
---
drivers/net/xen-netfront.c | 46 ++++++++++++++++++++++------------------------
1 file changed, 22 insertions(+), 24 deletions(-)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index f07b9c9bb5ba..a9ba9fe263ca 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -351,9 +351,6 @@ static int xennet_open(struct net_device *dev)
unsigned int i = 0;
struct netfront_queue *queue = NULL;
- if (!np->queues)
- return -ENODEV;
-
for (i = 0; i < num_queues; ++i) {
queue = &np->queues[i];
napi_enable(&queue->napi);
@@ -1361,8 +1358,18 @@ static int netfront_probe(struct xenbus_device *dev,
#ifdef CONFIG_SYSFS
info->netdev->sysfs_groups[0] = &xennet_dev_group;
#endif
+ err = register_netdev(info->netdev);
+ if (err) {
+ pr_warn("%s: register_netdev err=%d\n", __func__, err);
+ goto fail;
+ }
return 0;
+
+ fail:
+ xennet_free_netdev(netdev);
+ dev_set_drvdata(&dev->dev, NULL);
+ return err;
}
static void xennet_end_access(int ref, void *page)
@@ -1731,6 +1738,8 @@ static void xennet_destroy_queues(struct netfront_info *info)
{
unsigned int i;
+ rtnl_lock();
+
for (i = 0; i < info->netdev->real_num_tx_queues; i++) {
struct netfront_queue *queue = &info->queues[i];
@@ -1739,6 +1748,8 @@ static void xennet_destroy_queues(struct netfront_info *info)
netif_napi_del(&queue->napi);
}
+ rtnl_unlock();
+
kfree(info->queues);
info->queues = NULL;
}
@@ -1754,6 +1765,8 @@ static int xennet_create_queues(struct netfront_info *info,
if (!info->queues)
return -ENOMEM;
+ rtnl_lock();
+
for (i = 0; i < *num_queues; i++) {
struct netfront_queue *queue = &info->queues[i];
@@ -1762,7 +1775,7 @@ static int xennet_create_queues(struct netfront_info *info,
ret = xennet_init_queue(queue);
if (ret < 0) {
- dev_warn(&info->xbdev->dev,
+ dev_warn(&info->netdev->dev,
"only created %d queues\n", i);
*num_queues = i;
break;
@@ -1776,8 +1789,10 @@ static int xennet_create_queues(struct netfront_info *info,
netif_set_real_num_tx_queues(info->netdev, *num_queues);
+ rtnl_unlock();
+
if (*num_queues == 0) {
- dev_err(&info->xbdev->dev, "no queues\n");
+ dev_err(&info->netdev->dev, "no queues\n");
return -EINVAL;
}
return 0;
@@ -1814,7 +1829,6 @@ static int talk_to_netback(struct xenbus_device *dev,
goto out;
}
- rtnl_lock();
if (info->queues)
xennet_destroy_queues(info);
@@ -1825,7 +1839,6 @@ static int talk_to_netback(struct xenbus_device *dev,
info->queues = NULL;
goto out;
}
- rtnl_unlock();
/* Create shared ring, alloc event channel -- for each queue */
for (i = 0; i < num_queues; ++i) {
@@ -1922,10 +1935,8 @@ static int talk_to_netback(struct xenbus_device *dev,
xenbus_transaction_end(xbt, 1);
destroy_ring:
xennet_disconnect_backend(info);
- rtnl_lock();
xennet_destroy_queues(info);
out:
- rtnl_unlock();
device_unregister(&dev->dev);
return err;
}
@@ -1955,15 +1966,6 @@ static int xennet_connect(struct net_device *dev)
netdev_update_features(dev);
rtnl_unlock();
- if (dev->reg_state == NETREG_UNINITIALIZED) {
- err = register_netdev(dev);
- if (err) {
- pr_warn("%s: register_netdev err=%d\n", __func__, err);
- device_unregister(&np->xbdev->dev);
- return err;
- }
- }
-
/*
* All public and private state should now be sane. Get
* ready to start sending and receiving packets and give the driver
@@ -2154,14 +2156,10 @@ static int xennet_remove(struct xenbus_device *dev)
xennet_disconnect_backend(info);
- if (info->netdev->reg_state == NETREG_REGISTERED)
- unregister_netdev(info->netdev);
+ unregister_netdev(info->netdev);
- if (info->queues) {
- rtnl_lock();
+ if (info->queues)
xennet_destroy_queues(info);
- rtnl_unlock();
- }
xennet_free_netdev(info->netdev);
return 0;
--
2.14.1