HI Stephen: BR Rongwei
> -----Original Message----- > From: Stephen Hemminger <step...@networkplumber.org> > Sent: Tuesday, January 31, 2023 00:48 > To: Rongwei Liu <rongw...@nvidia.com> > Cc: Matan Azrad <ma...@nvidia.com>; Slava Ovsiienko > <viachesl...@nvidia.com>; Ori Kam <or...@nvidia.com>; NBU-Contact- > Thomas Monjalon (EXTERNAL) <tho...@monjalon.net>; Aman Singh > <aman.deep.si...@intel.com>; Yuying Zhang <yuying.zh...@intel.com>; > Ferruh Yigit <ferruh.yi...@amd.com>; Andrew Rybchenko > <andrew.rybche...@oktetlabs.ru>; Olivier Matz <olivier.m...@6wind.com>; > dev@dpdk.org; Raslan Darawsheh <rasl...@nvidia.com> > Subject: Re: [PATCH v3 1/8] ethdev: add IPv6 routing extension header > definition > > External email: Use caution opening links or attachments > > > On Mon, 30 Jan 2023 05:59:33 +0200 > Rongwei Liu <rongw...@nvidia.com> wrote: > > > > > +/** > > + * IPv6 Routing Extension Header > > + */ > > +struct rte_ipv6_routing_ext { > > + uint8_t next_hdr; /**< Protocol, next header. */ > > + uint8_t hdr_len; /**< Header length. */ > > + uint8_t type; /**< Extension header type. */ > > + uint8_t segments_left; /**< Valid segments number. */ > > + __extension__ > > + union { > > + rte_be32_t flags; > > + struct { > > + uint8_t last_entry; /**< The last_entry field of > > SRH */ > > + uint8_t flag; /**< Packet flag. */ > > + rte_be16_t tag; /**< Packet tag. */ > > + }; > > + }; > > + __extension__ > > + rte_be32_t segments[0]; /**< Each hop IPv6 address. */ > > Use flex array rather than zero size. > Zero size arrays cause warnings with later compilers. Sure. Thanks.