From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id D27B12935 for ; Fri, 28 Apr 2017 10:56:57 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4763F20A63; Fri, 28 Apr 2017 04:56:57 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Fri, 28 Apr 2017 04:56:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=o8VMGZaOXX8XOao RPmPc6Lzj/1RZQRcASZbpHkvgBq0=; b=hjeAWxWahyq0m9odS2h+/hp/qAGQGtT Logx/Ezv5eX78mtTAQ4nN7xNhq1s5PlCzPiv8HiqEAaUhAHNhnPzYtXB3GPOMtAi qRENORqqkSaFC6O21J9gO2ieLecFaafOpoAT4UNfAVfJskaKkPHDkWXhc3D+/b1s FvH6VKN2/Y5g= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=o8VMGZaOXX8XOaoRPmPc6Lzj/1RZQRcASZbpHkvgBq0=; b=U719RzMD w7FGeJg7c5fcefn7Saf0VyIODZpT0fDYL8XgzfTrt/yhTAMC+nUKDqYIKlImWt1e ItkoEc4Kf3KKUdGItxEC5GYkjCnGRppQlJd8XTAnd/a3FKMB6TW1c2tcxSgAVzPK jt2A0uhAygjmLifjc0yK519UEoEFkT8yAVqMoPVzGOUV3wRCvRhVhMbBGEQOu5YQ q0qkOqvA7XS1Io3mPDU3/hxLmxC/79dBpM6udc8lzC7aR8sKom3r2ki0N6NIXFvU ozn1cBKoIxRviGyFfDAOLlAh2PYg7FB4ORL7WXTb5pVVgHnDKTcd/3JLJ34x1AqU bztoLf3zNsQEBg== X-ME-Sender: X-Sasl-enc: ExP8D9+RXL5oXaTIbdwM2HzulLrUrLra+LmWoogGayHK 1493369816 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id EF3767E8C5; Fri, 28 Apr 2017 04:56:56 -0400 (EDT) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org Date: Fri, 28 Apr 2017 10:56:56 +0200 Message-ID: <1797441.atIi8ZZIaG@xps> In-Reply-To: <20170428081551.28954-1-bruce.richardson@intel.com> References: <20170428081551.28954-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] eal: fix 64bit address alignment in 32-bit builds X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2017 08:56:58 -0000 28/04/2017 10:15, Bruce Richardson: > On i686 builds, the uint64_t type is 64-bits in size but is aligned to > 32-bits only. This causes mbuf fields for rearm_data to not be 16-byte > aligned on 32-bit builds, which causes errors with some vector PMDs which > expect the rearm data to be aligned as on 64-bit. > > Given that we cannot use the extra space in the data structures anyway, as > it's already used on 64-bit builds, we can just force alignment of physical > address structure members to 8-bytes in all cases. This has no effect on > 64-bit systems, but fixes the updated PMDs on 32-bit. I agree to align on 64-bit in mbuf. > Fixes: f4356d7ca168 ("net/i40e: eliminate mbuf write on rearm") > Fixes: f160666a1073 ("net/ixgbe: eliminate mbuf write on rearm") [...] > --- a/lib/librte_eal/common/include/rte_memory.h > +++ b/lib/librte_eal/common/include/rte_memory.h > -typedef uint64_t phys_addr_t; /**< Physical address definition. */ > +/** Physical address definition. */ > +typedef uint64_t phys_addr_t __rte_aligned(sizeof(uint64_t)); Why setting this constraint for everyone?