From 9c030a21d043e623227dba4c12c0d80d7f55788d Mon Sep 17 00:00:00 2001 From: Sean Bruno Date: Fri, 17 Feb 2017 21:30:16 +0000 Subject: [PATCH] Push max_frame_len back into iflib so that jumbo frame sizes work. Reported by: pho --- sys/dev/e1000/if_em.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 818e2e411cf3..aa7da1fb2faf 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -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); }