Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932390AbdCFVl5 (ORCPT ); Mon, 6 Mar 2017 16:41:57 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:31082 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752726AbdCFVln (ORCPT ); Mon, 6 Mar 2017 16:41:43 -0500 Subject: Re: [PATCH 2/7] xen: introduce the header file for the Xen 9pfs transport protocol To: Stefano Stabellini 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> Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, Stefano Stabellini , konrad.wilk@oracle.com, jgross@suse.com From: Boris Ostrovsky Message-ID: <3c6439e1-5331-d7dc-92e8-6665942dfd6d@oracle.com> Date: Mon, 6 Mar 2017 16:42:13 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 905 Lines: 26 On 03/06/2017 04:36 PM, Stefano Stabellini wrote: > 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: Oh, I thought it was Xen-specific (because it's described in 9pfs.markdown). Nevermind then. -boris > > 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