]>
Commit | Line | Data |
---|---|---|
97229657 TL |
1 | diff --git a/src/ixgbe_main.c b/src/ixgbe_main.c |
2 | index 83c6250..fe226cd 100644 | |
3 | --- a/src/ixgbe_main.c | |
4 | +++ b/src/ixgbe_main.c | |
5 | @@ -6379,11 +6379,6 @@ static void ixgbe_free_all_rx_resources(struct ixgbe_adapter *adapter) | |
6 | static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu) | |
7 | { | |
8 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | |
9 | - int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN; | |
10 | - | |
11 | - /* MTU < 68 is an error and causes problems on some kernels */ | |
12 | - if ((new_mtu < 68) || (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE)) | |
13 | - return -EINVAL; | |
14 | ||
15 | /* | |
16 | * For 82599EB we cannot allow legacy VFs to enable their receive | |
17 | @@ -6392,7 +6387,7 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu) | |
18 | */ | |
19 | if ((adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) && | |
20 | (adapter->hw.mac.type == ixgbe_mac_82599EB) && | |
21 | - (max_frame > (ETH_FRAME_LEN + ETH_FCS_LEN))) | |
22 | + (new_mtu > ETH_DATA_LEN)) | |
23 | e_warn(probe, "Setting MTU > 1500 will disable legacy VFs\n"); | |
24 | ||
25 | e_info(probe, "changing MTU from %d to %d\n", netdev->mtu, new_mtu); | |
26 | @@ -10134,6 +10129,11 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |
27 | #ifdef IFF_SUPP_NOFCS | |
28 | netdev->priv_flags |= IFF_SUPP_NOFCS; | |
29 | #endif | |
30 | + | |
31 | + /* MTU range: 68 - 9710 */ | |
32 | + netdev->min_mtu = ETH_MIN_MTU; | |
33 | + netdev->max_mtu = IXGBE_MAX_JUMBO_FRAME_SIZE - (ETH_HLEN + ETH_FCS_LEN); | |
34 | + | |
35 | #if IS_ENABLED(CONFIG_DCB) | |
36 | if (adapter->flags & IXGBE_FLAG_DCB_CAPABLE) | |
37 | netdev->dcbnl_ops = &dcbnl_ops; |