[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200219144137.omzmzgfs33fmb6yg@ryzen>
Date: Wed, 19 Feb 2020 09:41:37 -0500
From: Alexander Aring <alex.aring@...il.com>
To: David Miller <davem@...emloft.net>
Cc: kuznet@....inr.ac.ru, yoshfuji@...ux-ipv6.org, kuba@...nel.org,
dav.lebrun@...il.com, mcr@...delman.ca, stefan@...enfreihafen.org,
kai.beckmann@...rm.de, martin.gergeleit@...rm.de,
robert.kaiser@...rm.de, netdev@...r.kernel.org
Subject: Re: [PACTH net-next 5/5] net: ipv6: add rpl sr tunnel
Hi,
On Mon, Feb 17, 2020 at 09:47:13PM -0800, David Miller wrote:
> From: Alexander Aring <alex.aring@...il.com>
> Date: Mon, 17 Feb 2020 17:35:41 -0500
>
> > +struct rpl_iptunnel_encap {
> > + struct ipv6_rpl_sr_hdr srh[0];
> > +};
>
> We're supposed to use '[]' for zero length arrays these days.
When I do that I get with gcc 9.2.1:
linux/net/ipv6/rpl_iptunnel.c:16:25: error: flexible array member in a struct with no named members
16 | struct ipv6_rpl_sr_hdr srh[];
This struct is so defined that a simple memcmp() can decide if it's the
same tunnel or not. We don't have any "named members" _yet_ but possible
new UAPI can introduce them.
Can we make an exception here? I can remove it but then I need to
introduce the same code again when we introduce new fields in UAPI for
this tunnel.
- Alex
Powered by blists - more mailing lists