From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [hail patch 2/3] fix 32/64 wire interoperability Date: Thu, 05 Aug 2010 17:25:30 -0400 Message-ID: <4C5B2C4A.8000808@garzik.org> References: <20100804171649.10861679@lembas.zaitcev.lan> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=LEDrw8m5mETkCkOpAr/2jJsnpCRjHLgwqLPS7VzqVj8=; b=ss5/JHH3MUAYu+69tvnmZh+y1EgJv8AZ3rYZUk9uJlmIINzEei+jrny+0YtpqpCOIo D/+sJDsKxAmEBGZkxBR2hZpmB7SbF0Xa97+auwwoDPy51zSWOGQepBwYtkt0PTgOSCk7 jTncZe5HofzjWhZOiDDKupX0MLsMR4/b/P9hw= In-Reply-To: <20100804171649.10861679@lembas.zaitcev.lan> Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Pete Zaitcev Cc: Project Hail List On 08/04/2010 07:16 PM, Pete Zaitcev wrote: > Testing found that tabled and chunkd running on CPUs with different > word length cannot talk to each other. > > The bug was introduced by commit ea5d20bc22aeed077312c9c1824e84651af17a16. > > The fix is to add named padding that takes the place of the invisible > padding, thus making the layout platform-neutral. > > Signed-off-by: Pete Zaitcev > > --- > include/chunk_msg.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/chunk_msg.h b/include/chunk_msg.h > index a34fc21..4c170e4 100644 > --- a/include/chunk_msg.h > +++ b/include/chunk_msg.h > @@ -91,6 +91,7 @@ struct chunksrv_resp { > uint32_t nonce; /* txn id, copied from request */ > uint64_t data_len; /* len of addn'l data */ > unsigned char hash[CHD_CSUM_SZ]; /* SHA1 checksum */ > + unsigned char rsv2[4]; /* pad for 64 bits */ > }; good catch. applied 1-3, and pushed out. I wonder if we shouldn't switch to attribute(packed) for safety, though.