From owner-svn-src-stable@freebsd.org Mon Nov 5 06:59:43 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4458C10FA668; Mon, 5 Nov 2018 06:59:43 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC6AB72599; Mon, 5 Nov 2018 06:59:42 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9296014415; Mon, 5 Nov 2018 06:59:42 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wA56xge6070507; Mon, 5 Nov 2018 06:59:42 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wA56xgMK070505; Mon, 5 Nov 2018 06:59:42 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201811050659.wA56xgMK070505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Mon, 5 Nov 2018 06:59:42 +0000 (UTC) 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 X-SVN-Group: stable-11 X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: stable/11/sys/dev/e1000 X-SVN-Commit-Revision: 340148 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BC6AB72599 X-Spamd-Result: default: False [-0.96 / 200.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.25)[-0.249,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; DMARC_NA(0.00)[FreeBSD.org]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[cached: mx1.FreeBSD.org]; NEURAL_HAM_SHORT(-0.60)[-0.601,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Nov 2018 06:59:43 -0000 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)) {