From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH DOCDAY] netif.h: describe request/response structures in terms of binary layout Date: Wed, 25 Feb 2015 12:34:45 +0000 Message-ID: <1424867685.20243.87.camel@citrix.com> References: <1424866610-27163-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1424866610-27163-1-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: keir@xen.org, tim@xen.org, ian.jackson@eu.citrix.com, jbeulich@suse.com, Wei Liu , Roger Pau =?ISO-8859-1?Q?Monn=E9?= List-Id: xen-devel@lists.xenproject.org On Wed, 2015-02-25 at 12:16 +0000, Ian Campbell wrote: > In RFC style, rather than relying on the implicit assumptions of a > particular C ABI. > > I have also confirmed, using the Python gdb extension technique in > [0], that the struct offsets (in a Linux binary at least) are the same > as described here. [...] > [] http://stackoverflow.com/questions/9788679/how-to-get-the-relative-adress-of-a-field-in-a-structure-dump-c, I had intended after the cut to include for reference: struct xen_netif_tx_request { gref => 0 offset => 4 flags => 6 id => 8 size => 10 } struct xen_netif_extra_info { type => 0 flags => 1 u => 2 } struct xen_netif_tx_response { id => 0 status => 2 } struct xen_netif_rx_request { id => 0 gref => 4 } struct xen_netif_rx_response { id => 0 offset => 2 flags => 4 status => 6 } (same for all arches, of course) Ian.