svn commit: r315306 - head/sys/dev/e1000

Sean Bruno sbruno at FreeBSD.org
Wed Mar 15 14:45:01 UTC 2017


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 at 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);
 }
 


More information about the svn-src-head mailing list