Hi,
I compiled igb for kernel 4.13 and noticed that setting MTU doesn't work as
expected. I think it has been broken since
introducing HAVE_NETDEVICE_MIN_MAX_MTU. The attached patch fixes things for
me.
--
Best regards,
Dmitry Ivanov
A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?
--- igb-5.3.5.15/src/igb_main.c 2018-01-11 21:06:06.247692628 +0300
+++ igb/src/igb_main.c 2018-01-11 21:07:22.838815707 +0300
@@ -5850,9 +5850,9 @@
struct igb_adapter *adapter = netdev_priv(netdev);
struct e1000_hw *hw = &adapter->hw;
struct pci_dev *pdev = adapter->pdev;
-#ifndef HAVE_NETDEVICE_MIN_MAX_MTU
int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN;
+#ifndef HAVE_NETDEVICE_MIN_MAX_MTU
if ((new_mtu < 68) || (max_frame > MAX_JUMBO_FRAME_SIZE)) {
dev_err(pci_dev_to_dev(pdev), "Invalid MTU setting\n");
return -EINVAL;
@@ -5874,10 +5874,8 @@
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);
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit
http://communities.intel.com/community/wired