Date: Fri, 17 Feb 2017 21:30:16 +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: r313900 - head/sys/dev/e1000 Message-ID: <201702172130.v1HLUGnp020958@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sbruno Date: Fri Feb 17 21:30:16 2017 New Revision: 313900 URL: https://svnweb.freebsd.org/changeset/base/313900 Log: Push max_frame_len back into iflib so that jumbo frame sizes work. Reported by: pho Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Fri Feb 17 21:25:24 2017 (r313899) +++ head/sys/dev/e1000/if_em.c Fri Feb 17 21:30:16 2017 (r313900) @@ -920,7 +920,7 @@ em_if_attach_pre(if_ctx_t ctx) * Set the frame limits assuming * standard ethernet sized frames. */ - adapter->hw.mac.max_frame_size = + scctx->isc_max_frame_size = adapter->hw.mac.max_frame_size = ETHERMTU + ETHER_HDR_LEN + ETHERNET_FCS_SIZE; /* @@ -1117,6 +1117,7 @@ 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)"); @@ -1147,7 +1148,8 @@ em_if_mtu_set(if_ctx_t ctx, uint32_t mtu return (EINVAL); } - adapter->hw.mac.max_frame_size = if_getmtu(ifp) + ETHER_HDR_LEN + ETHER_CRC_LEN; + scctx->isc_max_frame_size = adapter->hw.mac.max_frame_size = + if_getmtu(ifp) + 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?201702172130.v1HLUGnp020958>