From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH DOCDAY] netif.h: describe request/response structures in terms of binary layout Date: Wed, 25 Feb 2015 12:23:40 +0000 Message-ID: <54EDBECC.5040106@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: Ian Campbell , xen-devel@lists.xen.org Cc: keir@xen.org, ian.jackson@eu.citrix.com, tim@xen.org, jbeulich@suse.com, Wei Liu , =?UTF-8?B?Um9nZXIgUGF1?= =?UTF-8?B?IE1vbm7DqQ==?= List-Id: xen-devel@lists.xenproject.org On 25/02/15 12:16, 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. > > I took the opportunity to also confirm that x86_32, x86_64, arm32 and > arm64 are all the same. > > This highlighted that struct netif_rx_request was missing some > explicit padding, which is added here. > > Lastly, fixup some struct names to allow the generated docs to > properly hyperlink, mainly by adding the _t to type names where > appropriate, but also s/netif_tx_extra/netif_extra_info_t/. > > [] http://stackoverflow.com/questions/9788679/how-to-get-the-relative-adress-of-a-field-in-a-structure-dump-c, `pahole` from the dwarves package is your friend. ~Andrew