Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Mar 2017 14:44:59 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r315306 - head/sys/dev/e1000
Message-ID:  <201703151444.v2FEixfZ086033@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Wed Mar 15 14:44:59 2017
New Revision: 315306
URL: https://svnweb.freebsd.org/changeset/base/315306

Log:
  Actually set the MTU to the requested value and fixup handling of jumbo
  frames.
  
  Submitted by:	Matt Macy <mmacy@nextbsd.org>
  Reported by:	pho
  Sponsored by:	Limelight Networks

Modified:
  head/sys/dev/e1000/if_em.c

Modified: head/sys/dev/e1000/if_em.c
==============================================================================
--- head/sys/dev/e1000/if_em.c	Wed Mar 15 13:36:35 2017	(r315305)
+++ head/sys/dev/e1000/if_em.c	Wed Mar 15 14:44:59 2017	(r315306)
@@ -1116,7 +1116,6 @@ em_if_mtu_set(if_ctx_t ctx, uint32_t mtu
 {
 	int max_frame_size;
 	struct adapter *adapter = iflib_get_softc(ctx);
-	struct ifnet *ifp = iflib_get_ifp(ctx);
 	if_softc_ctx_t scctx = iflib_get_softc_ctx(ctx);
 
 	 IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)");
@@ -1154,7 +1153,7 @@ em_if_mtu_set(if_ctx_t ctx, uint32_t mtu
 	}
 
 	scctx->isc_max_frame_size = adapter->hw.mac.max_frame_size =
-	    if_getmtu(ifp) + ETHER_HDR_LEN + ETHER_CRC_LEN;
+	    mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
 	return (0);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703151444.v2FEixfZ086033>