HI Stephen BR Rongwei
> -----Original Message----- > From: Stephen Hemminger <[email protected]> > Sent: Tuesday, January 31, 2023 10:56 > To: Rongwei Liu <[email protected]> > Cc: Matan Azrad <[email protected]>; Slava Ovsiienko > <[email protected]>; Ori Kam <[email protected]>; NBU-Contact- > Thomas Monjalon (EXTERNAL) <[email protected]>; Aman Singh > <[email protected]>; Yuying Zhang <[email protected]>; > Ferruh Yigit <[email protected]>; Andrew Rybchenko > <[email protected]>; Olivier Matz <[email protected]>; > [email protected]; Raslan Darawsheh <[email protected]> > Subject: Re: [PATCH v3 1/8] ethdev: add IPv6 routing extension header > definition > > External email: Use caution opening links or attachments > > > On Tue, 31 Jan 2023 02:27:56 +0000 > Rongwei Liu <[email protected]> wrote: > > > HI Stephen > > > > BR > > Rongwei > > > > > -----Original Message----- > > > From: Stephen Hemminger <[email protected]> > > > Sent: Tuesday, January 31, 2023 00:48 > > > To: Rongwei Liu <[email protected]> > > > Cc: Matan Azrad <[email protected]>; Slava Ovsiienko > > > <[email protected]>; Ori Kam <[email protected]>; NBU-Contact- > > > Thomas Monjalon (EXTERNAL) <[email protected]>; Aman Singh > > > <[email protected]>; Yuying Zhang <[email protected]>; > > > Ferruh Yigit <[email protected]>; Andrew Rybchenko > > > <[email protected]>; Olivier Matz > > > <[email protected]>; [email protected]; Raslan Darawsheh > > > <[email protected]> > > > 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 <[email protected]> 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. > > Using flex array helps improve this network header definition but > > caused warning in the rte_flow_item_** struct > rte_flow_item_ipv6_routing_ext { > > struct rte_ipv6_routing_ext hdr; }; "invalid use of structure > > with flexible array member [-Werror=pedantic]" > > Not sure, only Nvidia/Mellanox messes with pedantic This is caused by failsafe driver. In file included from ../drivers/net/failsafe/failsafe_ether.c:8: ../lib/ethdev/rte_flow.h:892:44: error: invalid use of structure with flexible array member [-Werror=pedantic] __extension__ struct rte_ipv6_routing_ext hdr; ^~~

