From: Jeff Kirsher Subject: [RESEND][NET-NEXT PATCH 07/29] ixgbe: limit small mtu to minimum for ipv4 support Date: Thu, 11 Sep 2008 19:56:28 -0700 Message-ID: <20080912025617.6234.35543.stgit@jtkirshe-mobile.jf.intel.com> References: <20080912025404.6234.83037.stgit@jtkirshe-mobile.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: davem@davemloft.net, netdev@vger.kernel.org, akpm@linux-foundation.org, Jesse Brandeburg , Jeff Kirsher To: jeff@garzik.org Return-path: Received: from wf-out-1314.google.com ([209.85.200.170]:15725 "EHLO wf-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754799AbYILC4a (ORCPT ); Thu, 11 Sep 2008 22:56:30 -0400 Received: by wf-out-1314.google.com with SMTP id 27so620997wfd.4 for ; Thu, 11 Sep 2008 19:56:30 -0700 (PDT) In-Reply-To: <20080912025404.6234.83037.stgit@jtkirshe-mobile.jf.intel.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Jesse Brandeburg Signed-off-by: Jesse Brandeburg Signed-off-by: Jeff Kirsher --- drivers/net/ixgbe/ixgbe_main.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index cfaa3ca..2c8895e 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -2839,8 +2839,8 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu) struct ixgbe_adapter *adapter = netdev_priv(netdev); int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN; - if ((max_frame < (ETH_ZLEN + ETH_FCS_LEN)) || - (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE)) + /* MTU < 68 is an error and causes problems on some kernels */ + if ((new_mtu < 68) || (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE)) return -EINVAL; DPRINTK(PROBE, INFO, "changing MTU from %d to %d\n",