From owner-svn-src-all@freebsd.org Thu Aug 3 07:28:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2644DCE627; Thu, 3 Aug 2017 07:28:55 +0000 (UTC) (envelope-from kib@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 mx1.freebsd.org (Postfix) with ESMTPS id 6BD1F6AEA3; Thu, 3 Aug 2017 07:28:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v737SsCT090215; Thu, 3 Aug 2017 07:28:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v737SsZd090213; Thu, 3 Aug 2017 07:28:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201708030728.v737SsZd090213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 3 Aug 2017 07:28:54 +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: r321977 - in stable/11/sys: kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys: kern sys X-SVN-Commit-Revision: 321977 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 07:28:55 -0000 Author: kib Date: Thu Aug 3 07:28:54 2017 New Revision: 321977 URL: https://svnweb.freebsd.org/changeset/base/321977 Log: MFC r321625: Make the number of children for pctrie node available outside subr_pctrie.c. Modified: stable/11/sys/kern/subr_pctrie.c stable/11/sys/sys/pctrie.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_pctrie.c ============================================================================== --- stable/11/sys/kern/subr_pctrie.c Thu Aug 3 07:20:19 2017 (r321976) +++ stable/11/sys/kern/subr_pctrie.c Thu Aug 3 07:28:54 2017 (r321977) @@ -58,18 +58,6 @@ __FBSDID("$FreeBSD$"); #include #endif -/* - * These widths should allow the pointers to a node's children to fit within - * a single cache line. The extra levels from a narrow width should not be - * a problem thanks to path compression. - */ -#ifdef __LP64__ -#define PCTRIE_WIDTH 4 -#else -#define PCTRIE_WIDTH 3 -#endif - -#define PCTRIE_COUNT (1 << PCTRIE_WIDTH) #define PCTRIE_MASK (PCTRIE_COUNT - 1) #define PCTRIE_LIMIT (howmany(sizeof(uint64_t) * NBBY, PCTRIE_WIDTH) - 1) Modified: stable/11/sys/sys/pctrie.h ============================================================================== --- stable/11/sys/sys/pctrie.h Thu Aug 3 07:20:19 2017 (r321976) +++ stable/11/sys/sys/pctrie.h Thu Aug 3 07:28:54 2017 (r321977) @@ -133,5 +133,18 @@ pctrie_is_empty(struct pctrie *ptree) return (ptree->pt_root == 0); } +/* + * These widths should allow the pointers to a node's children to fit within + * a single cache line. The extra levels from a narrow width should not be + * a problem thanks to path compression. + */ +#ifdef __LP64__ +#define PCTRIE_WIDTH 4 +#else +#define PCTRIE_WIDTH 3 +#endif + +#define PCTRIE_COUNT (1 << PCTRIE_WIDTH) + #endif /* _KERNEL */ #endif /* !_SYS_PCTRIE_H_ */