Date: Wed, 17 Apr 2019 22:45:19 +0000 (UTC) From: Eric Joyner <erj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r346336 - in stable/12/sys: dev/e1000 net Message-ID: <201904172245.x3HMjJpn066530@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: erj Date: Wed Apr 17 22:45:19 2019 New Revision: 346336 URL: https://svnweb.freebsd.org/changeset/base/346336 Log: MFC r344817 Remove references to CONTIGMALLOC_WORKS in iflib and em From Jake: "The iflib_fl_setup() function tries to pick various buffer sizes based on the max_frame_size value defined by the parent driver. However, this code was wrapped under CONTIGMALLOC_WORKS, which was never actually defined anywhere. This same code pattern was used in if_em.c, likely trying to match what iflib uses. Since CONTIGMALLOC_WORKS is not defined, remove this dead code from iflib_fl_setup and if_em.c Given that various iflib drivers appear to be using a similar calculation, it might be worth making this buffer size a value that the driver can peek at in the future." Submitted by: Jacob Keller <jacob.e.keller@intel.com> Reviewed by: shurd@ Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D19199 Modified: stable/12/sys/dev/e1000/if_em.c stable/12/sys/net/iflib.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/e1000/if_em.c ============================================================================== --- stable/12/sys/dev/e1000/if_em.c Wed Apr 17 22:41:27 2019 (r346335) +++ stable/12/sys/dev/e1000/if_em.c Wed Apr 17 22:45:19 2019 (r346336) @@ -1276,15 +1276,8 @@ em_if_init(if_ctx_t ctx) */ if (adapter->hw.mac.max_frame_size <= 2048) adapter->rx_mbuf_sz = MCLBYTES; -#ifndef CONTIGMALLOC_WORKS else adapter->rx_mbuf_sz = MJUMPAGESIZE; -#else - else if (adapter->hw.mac.max_frame_size <= 4096) - adapter->rx_mbuf_sz = MJUMPAGESIZE; - else - adapter->rx_mbuf_sz = MJUM9BYTES; -#endif em_initialize_receive_unit(ctx); /* Use real VLAN Filter support? */ Modified: stable/12/sys/net/iflib.c ============================================================================== --- stable/12/sys/net/iflib.c Wed Apr 17 22:41:27 2019 (r346335) +++ stable/12/sys/net/iflib.c Wed Apr 17 22:45:19 2019 (r346336) @@ -2182,17 +2182,8 @@ iflib_fl_setup(iflib_fl_t fl) */ if (sctx->isc_max_frame_size <= 2048) fl->ifl_buf_size = MCLBYTES; -#ifndef CONTIGMALLOC_WORKS else fl->ifl_buf_size = MJUMPAGESIZE; -#else - else if (sctx->isc_max_frame_size <= 4096) - fl->ifl_buf_size = MJUMPAGESIZE; - else if (sctx->isc_max_frame_size <= 9216) - fl->ifl_buf_size = MJUM9BYTES; - else - fl->ifl_buf_size = MJUM16BYTES; -#endif if (fl->ifl_buf_size > ctx->ifc_max_fl_buf_size) ctx->ifc_max_fl_buf_size = fl->ifl_buf_size; fl->ifl_cltype = m_gettype(fl->ifl_buf_size);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904172245.x3HMjJpn066530>