Date: Mon, 5 Nov 2018 06:59:42 +0000 (UTC) From: Matt Macy <mmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r340148 - stable/11/sys/dev/e1000 Message-ID: <201811050659.wA56xgMK070505@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mmacy Date: Mon Nov 5 06:59:41 2018 New Revision: 340148 URL: https://svnweb.freebsd.org/changeset/base/340148 Log: e1000: Don't use 9k jumbo clusters Backported to 11-STABLE from 12-CURRENT. Avoids the issue with 9k jumbo cluster fragmentation by maxing out at page size jumbo clusters for RX mbufs. Submitted by: Ryan Moeller Reviewed by: erj@ Differential Revision: https://reviews.freebsd.org/D16534 Modified: stable/11/sys/dev/e1000/if_em.c stable/11/sys/dev/e1000/if_igb.c Modified: stable/11/sys/dev/e1000/if_em.c ============================================================================== --- stable/11/sys/dev/e1000/if_em.c Mon Nov 5 01:53:20 2018 (r340147) +++ stable/11/sys/dev/e1000/if_em.c Mon Nov 5 06:59:41 2018 (r340148) @@ -1429,10 +1429,15 @@ em_init_locked(struct adapter *adapter) */ 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 /* Prepare receive descriptors and buffers */ if (em_setup_receive_structures(adapter)) { Modified: stable/11/sys/dev/e1000/if_igb.c ============================================================================== --- stable/11/sys/dev/e1000/if_igb.c Mon Nov 5 01:53:20 2018 (r340147) +++ stable/11/sys/dev/e1000/if_igb.c Mon Nov 5 06:59:41 2018 (r340148) @@ -1324,10 +1324,15 @@ igb_init_locked(struct adapter *adapter) */ if (adapter->max_frame_size <= 2048) adapter->rx_mbuf_sz = MCLBYTES; +#ifndef CONTIGMALLOC_WORKS + else + adapter->rx_mbuf_sz = MJUMPAGESIZE; +#else else if (adapter->max_frame_size <= 4096) adapter->rx_mbuf_sz = MJUMPAGESIZE; else adapter->rx_mbuf_sz = MJUM9BYTES; +#endif /* Prepare receive descriptors and buffers */ if (igb_setup_receive_structures(adapter)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811050659.wA56xgMK070505>