]> git.proxmox.com Git - pve-kernel.git/commitdiff
igb: ensure setting MTU sets also max_frame_size
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 18 Jun 2018 15:06:45 +0000 (17:06 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 18 Jun 2018 15:07:01 +0000 (17:07 +0200)
This is a regression from the out-of-tree Intel IGB driver happened
between 5.3.5.10 and 5.3.5.18.
The condition here should be actually reveresed, but as we always can
be sure to have a MAX/MIN MTU defined we can just remove it,
essentially going back to the previous code state (which also works
with our current 4.15 kernel).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile
patches/intel/igb/igb_4.15_mtu.patch [new file with mode: 0644]

index 93d206ee9325ecfb3da7645ec4ae47a1a776c3ad..34b87b01a6890c2a3b8484e755ed0b05a12e5df3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -131,6 +131,7 @@ ${IGBDIR}.prepared: ${IGBSRC}
        rm -rf ${BUILD_DIR}/${MODULES}/${IGBDIR} $@
        mkdir -p ${BUILD_DIR}/${MODULES}/${IGBDIR}
        tar --strip-components=1 -C ${BUILD_DIR}/${MODULES}/${IGBDIR} -xf ${IGBSRC}
+       cd ${BUILD_DIR}/${MODULES}/${IGBDIR}; patch -p1 < ../../../patches/intel/igb/igb_4.15_mtu.patch
        touch $@
 
 ${IXGBEDIR}.prepared: ${IXGBESRC}
diff --git a/patches/intel/igb/igb_4.15_mtu.patch b/patches/intel/igb/igb_4.15_mtu.patch
new file mode 100644 (file)
index 0000000..522cf08
--- /dev/null
@@ -0,0 +1,15 @@
+diff --git a/src/igb_main.c.orig b/src/igb_main.c
+index 3ee1ec7..c8adf04 100644
+--- a/src/igb_main.c.orig
++++ b/src/igb_main.c
+@@ -5888,10 +5888,8 @@ static int igb_change_mtu(struct net_dev
+       while (test_and_set_bit(__IGB_RESETTING, &adapter->state))
+               usleep_range(1000, 2000);
+-#ifndef HAVE_NETDEVICE_MIN_MAX_MTU
+       /* igb_down has a dependency on max_frame_size */
+       adapter->max_frame_size = max_frame;
+-#endif
+       if (netif_running(netdev))
+               igb_down(adapter);