From owner-freebsd-arm@FreeBSD.ORG Tue Aug 27 15:56:36 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3F44AAB2 for ; Tue, 27 Aug 2013 15:56:36 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-gh0-f169.google.com (mail-gh0-f169.google.com [209.85.160.169]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 000A1211E for ; Tue, 27 Aug 2013 15:56:35 +0000 (UTC) Received: by mail-gh0-f169.google.com with SMTP id r1so1239642ghr.14 for ; Tue, 27 Aug 2013 08:56:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=xkfrt6nr7SQZK0GzpZPWPIoK0gSy72Ji3Szg/7T2ASw=; b=YpacrRxgJLBYrGgQaqGH/xK0fAZXZ2Aob1mXxzz616O74NsLKUGcmVvtwSCU9JKNQT ZVsNYxsKeND+ceyRwRB5/bl+v9TENH/WwODBvmdFVQKRf6lSt4FtJZkWxYa9MHm+w+O3 1lisQgJ2m0ZRo0YqozKPDe/dIr/U5qN6GTwVAAR+PVylC5//8v1CLIzCH/OaiNUKMrDB RmRuYWvQp1PNltnwTm17BL5L4U1oeJPFFSC39+a7K1lMxw6M9X7C0Cv1VEiWGAeORDGs gczVpwk2PvckeTlV6exl4PNpJPkq45bZ5hE89+r/wumvOpujuW4mrl2aqzO6fF7B+Ihn bh5g== X-Gm-Message-State: ALoCoQnzK2J+4K7SJ9ZhLSmnSZn1G4UzHzgPkoqjYeDIw1fpgEOLRH09qbtB7EELp0TiqZdlFYGj X-Received: by 10.236.156.5 with SMTP id l5mr20704195yhk.5.1377618988824; Tue, 27 Aug 2013 08:56:28 -0700 (PDT) Received: from monkey-bot.int.fusionio.com ([209.117.142.2]) by mx.google.com with ESMTPSA id c7sm25053454yhk.23.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 Aug 2013 08:56:25 -0700 (PDT) Sender: Warner Losh Subject: Re: ARM network trouble after recent mbuf changes Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20130827164055.4a757a13@bender> Date: Tue, 27 Aug 2013 09:56:20 -0600 Content-Transfer-Encoding: 7bit Message-Id: References: <1377550636.1111.156.camel@revolution.hippie.lan> <521BC472.7040804@freebsd.org> <521BD531.4090104@sbcglobal.net> <521C4CD9.4050308@freebsd.org> <20130827102810.37e2dfc7@bender> <20130827164055.4a757a13@bender> To: Andrew Turner X-Mailer: Apple Mail (2.1085) Cc: freebsd-arm , Andre Oppermann X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 15:56:36 -0000 On Aug 27, 2013, at 9:40 AM, Andrew Turner wrote: > On Tue, 27 Aug 2013 07:26:03 -0600 > Warner Losh wrote: > >> >> On Aug 27, 2013, at 3:28 AM, Andrew Turner wrote: >> >>> On Tue, 27 Aug 2013 08:53:13 +0200 >>> Andre Oppermann wrote: >>>> Please try the patch below to confirm. If it fixes your problem >>>> for now I'm going to commit as an immediate fix while searching >>>> for a better long term stable solution. >>>> >>> >>> I tried this with a CTASSERT to check if struct m_hdr is the correct >>> length. In this test the size is incorrect. It appears __ILP32__ is >>> not defined on ARM. >>> >>> I have tested a fix suggested by Hans Petter Selasky where we mark >>> m_hdr with __aligned(8). With this change I can netboot a >>> PandaBoard. >> >> Isn't that a bug with our arm compiler then? > > No, on ARM EABI the definition of the size of a struct is to be the > smallest multiple of its alignment. As we are increasing the alignment > to 8-byte and the struct without this alignment is not a multiple of > 8-bytes adding this alignment will pad to struct to use the unused 4 > bytes between this and the next struct. Wrong bug :) Is it not a bug that __ILP32__ is undefined? Warner > Andrew >> >> Warner >> >> >