From: Jakub Kicinski <kuba@kernel.org>
To: Alexander Aring <alex.aring@gmail.com>
Cc: David Miller <davem@davemloft.net>,
kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org,
dav.lebrun@gmail.com, mcr@sandelman.ca,
stefan@datenfreihafen.org, kai.beckmann@hs-rm.de,
martin.gergeleit@hs-rm.de, robert.kaiser@hs-rm.de,
netdev@vger.kernel.org
Subject: Re: [PACTH net-next 5/5] net: ipv6: add rpl sr tunnel
Date: Wed, 19 Feb 2020 11:12:28 -0800 [thread overview]
Message-ID: <20200219111228.024ac5ae@kicinski-fedora-PC1C0HJN> (raw)
In-Reply-To: <20200219144137.omzmzgfs33fmb6yg@ryzen>
On Wed, 19 Feb 2020 09:41:37 -0500 Alexander Aring wrote:
> On Mon, Feb 17, 2020 at 09:47:13PM -0800, David Miller wrote:
> > From: Alexander Aring <alex.aring@gmail.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.
This seems risky, does C even allow empty structures like this?
What's sizeof(struct rpl_iptunnel_encap) going to be? :S
> 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.
next prev parent reply other threads:[~2020-02-19 19:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-17 22:35 [PACTH net-next 0/5] net: ipv6: add rpl source routing Alexander Aring
2020-02-17 22:35 ` [PACTH net-next 1/5] include: uapi: linux: add rpl sr header definition Alexander Aring
2020-02-17 22:35 ` [PACTH net-next 2/5] addrconf: add functionality to check on rpl requirements Alexander Aring
2020-02-17 22:35 ` [PACTH net-next 3/5] net: ipv6: add support for rpl sr exthdr Alexander Aring
2020-02-17 22:35 ` [PACTH net-next 4/5] net: add net available in build_state Alexander Aring
2020-02-17 22:35 ` [PACTH net-next 5/5] net: ipv6: add rpl sr tunnel Alexander Aring
2020-02-18 5:47 ` David Miller
2020-02-19 14:41 ` Alexander Aring
2020-02-19 19:12 ` Jakub Kicinski [this message]
2020-02-20 23:02 ` David Miller
2020-02-19 14:45 ` Alexander Aring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200219111228.024ac5ae@kicinski-fedora-PC1C0HJN \
--to=kuba@kernel.org \
--cc=alex.aring@gmail.com \
--cc=dav.lebrun@gmail.com \
--cc=davem@davemloft.net \
--cc=kai.beckmann@hs-rm.de \
--cc=kuznet@ms2.inr.ac.ru \
--cc=martin.gergeleit@hs-rm.de \
--cc=mcr@sandelman.ca \
--cc=netdev@vger.kernel.org \
--cc=robert.kaiser@hs-rm.de \
--cc=stefan@datenfreihafen.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).