[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Avoid embedding struct mbuf in other structures
From: |
Samuel Thibault |
Subject: |
Re: [Qemu-devel] [PATCH] Avoid embedding struct mbuf in other structures |
Date: |
Thu, 25 Feb 2016 16:29:36 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Peter Maydell, on Thu 25 Feb 2016 15:22:25 +0000, wrote:
> On 22 February 2016 at 21:29, Samuel Thibault
> <address@hidden> wrote:
> > struct mbuf uses a C99 open char array to allow inlining data.
>
> At the moment it doesn't, it uses a 1 byte array :-) Turning that
> into a C99 flexible array is what we'd like to do...
I know :)
> It's a slight shame that we end up having to have the extra casts,
> but I guess it can't be helped.
Yes.
> Converting the code to use one of the qemu/queue.h data structures
> doesn't seem worth the effort and risk of introducing bugs.
Yes :)
> (Does this pass checkpatch.pl? I wasn't sure about the spacing
> round some of the casts...)
It does, except warnings about indent, which we probably don't want to
fix here.
Samuel