Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932498AbdCFVgi (ORCPT ); Mon, 6 Mar 2017 16:36:38 -0500 Received: from mail.kernel.org ([198.145.29.136]:35446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932247AbdCFVg0 (ORCPT ); Mon, 6 Mar 2017 16:36:26 -0500 Date: Mon, 6 Mar 2017 13:36:17 -0800 (PST) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-X260 To: Boris Ostrovsky cc: Stefano Stabellini , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, Stefano Stabellini , konrad.wilk@oracle.com, jgross@suse.com Subject: Re: [PATCH 2/7] xen: introduce the header file for the Xen 9pfs transport protocol In-Reply-To: <20ed41c0-f275-58b6-229f-07f78adf1927@oracle.com> Message-ID: References: <1488830488-18506-1-git-send-email-sstabellini@kernel.org> <1488830488-18506-2-git-send-email-sstabellini@kernel.org> <20ed41c0-f275-58b6-229f-07f78adf1927@oracle.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 746 Lines: 22 On Mon, 6 Mar 2017, Boris Ostrovsky wrote: > > + uint32_t size; > > + uint8_t id; > > + uint16_t tag; > > I realize that this is in the spec now and it's probably too late to ask > this question but wouldn't it be better if id and tag were swapped? No > need to pack and potentially faster access to tag. I cannot do anything about it: that struct is defined by the 9pfs specification (not the Xen spec, the general 9pfs spec). See: https://www.usenix.org/legacy/event/usenix05/tech/freenix/full_papers/hensbergen/hensbergen.pdf > > +} __attribute__((packed)); > > + > > +#define XEN_9PFS_RING_ORDER 6 > > +#define XEN_9PFS_RING_SIZE XEN_FLEX_RING_SIZE(XEN_9PFS_RING_ORDER) > > +DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs); > > + > > +#endif >