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 <mm...@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);
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to