From owner-svn-src-head@FreeBSD.ORG Wed May 15 05:02:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D38D1C20; Wed, 15 May 2013 05:02:12 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mail1.ozon.ru (mx4.ozon.ru [194.186.179.140]) by mx1.freebsd.org (Postfix) with ESMTP id 690C09D1; Wed, 15 May 2013 05:02:12 +0000 (UTC) Received: from intmail03msk.ozon (intmail03msk.ozon [10.18.18.171]) by mail1.ozon.ru (Postfix) with ESMTP id 1FF9971A5CE; Wed, 15 May 2013 09:02:10 +0400 (MSK) Received: from mail pickup service by intmail03msk.ozon with Microsoft SMTPSVC; Wed, 15 May 2013 09:00:49 +0400 Received: from intmail03msk.ozon ([10.18.18.171]) by intmail02msk.ozon with Microsoft SMTPSVC(6.0.3790.4675); Mon, 13 May 2013 00:44:50 +0400 Received: from mail1.ozon.ru ([194.186.179.140]) by intmail03msk.ozon with Microsoft SMTPSVC(6.0.3790.4675); Mon, 13 May 2013 00:44:49 +0400 Received: from localhost (localhost [127.0.0.1]) by mail1.ozon.ru (Postfix) with ESMTP id A2DB4719807 for ; Mon, 13 May 2013 00:44:49 +0400 (MSK) X-Virus-Scanned: amavisd-new at ozon.ru Received: from mail1.ozon.ru ([127.0.0.1]) by localhost (mx4.ozon.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cbAFtGldrqgw for ; Mon, 13 May 2013 00:44:41 +0400 (MSK) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received-SPF: pass (freebsd.org: 8.8.178.116 is authorized to use 'owner-svn-src-all@freebsd.org' in 'mfrom' identity (mechanism 'ip4:8.8.178.116' matched)) receiver=mx4.ozon.ru; identity=mfrom; envelope-from="owner-svn-src-all@freebsd.org"; helo=mx2.freebsd.org; client-ip=8.8.178.116 Received: from mx2.freebsd.org (mx2.FreeBSD.org [8.8.178.116]) by mail1.ozon.ru (Postfix) with ESMTP id C155A7196A8 for ; Mon, 13 May 2013 00:44:41 +0400 (MSK) Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by mx2.freebsd.org (Postfix) with ESMTP id C9907261B; Sun, 12 May 2013 20:44:40 +0000 (UTC) Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by hub.freebsd.org (Postfix) with ESMTP id C7488F96; Sun, 12 May 2013 20:44:40 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 15AC4E2E; Sun, 12 May 2013 20:44:29 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 08569DF9; Sun, 12 May 2013 20:44:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4CKiS9I069115; Sun, 12 May 2013 20:44:28 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4CKiSeR069114; Sun, 12 May 2013 20:44:28 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201305122044.r4CKiSeR069114@svn.freebsd.org> From: Jeff Roberson Date: Sun, 12 May 2013 20:44:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250578 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-OriginalArrivalTime: 12 May 2013 20:44:49.0458 (UTC) FILETIME=[8BAC1920:01CE4F51] X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 May 2013 05:02:12 -0000 Author: jeff Date: Sun May 12 20:44:28 2013 New Revision: 250578 URL: http://svnweb.freebsd.org/changeset/base/250578 Log: - pctrie really only requires two byte alignment so that there is a single bit available for a flag in the pointer. However, it felt more correct to enforce natural alignment of the key pointer. Unfortunately on 32bit architectures 64bit integers are not always naturally aligned. Change the assert to enforce only 32bit alignment of the 64bit key for now to fix the build. A more correct fix would be to properly sort the struct buf fields which definitely suffer from bloat due to padding. Modified: head/sys/sys/pctrie.h Modified: head/sys/sys/pctrie.h ============================================================================== --- head/sys/sys/pctrie.h Sun May 12 16:50:18 2013 (r250577) +++ head/sys/sys/pctrie.h Sun May 12 20:44:28 2013 (r250578) @@ -38,7 +38,11 @@ #define PCTRIE_DEFINE(name, type, field, allocfn, freefn) \ \ CTASSERT(sizeof(((struct type *)0)->field) == sizeof(uint64_t)); \ -CTASSERT((__offsetof(struct type, field) & (sizeof(uint64_t) - 1)) == 0); \ +/* \ + * XXX This assert protects flag bits, it does not enforce natural \ + * alignment. 32bit architectures do not naturally align 64bit fields. \ + */ \ +CTASSERT((__offsetof(struct type, field) & (sizeof(uint32_t) - 1)) == 0); \ \ static __inline struct type * \ name##_PCTRIE_VAL2PTR(uint64_t *val) \ _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"