[dpdk-dev] [PATCH v2 4/4] ethdev: Add metadata flow and action items support

Adrien Mazarguil adrien.mazarguil at 6wind.com
Fri Apr 6 14:20:12 CEST 2018


On Thu, Apr 05, 2018 at 06:49:32PM +0200, Thomas Monjalon wrote:
> 05/04/2018 15:51, Declan Doherty:
> > +struct rte_flow_item_metadata {
> > +       uint32_t id;            /**< field identifier */
> > +       uint32_t size;          /**< field size */
> > +       uint8_t bytes[];        /**< field value */
> > +};
> 
> Spotted C99 syntax of flexible array.
> Are we OK with all supported compilers?

I also thought they were a good idea at first but got rid of them in
rte_flow [1] for the following reasons:

- Not valid/standard C++.
- Can't be statically initialized.

Both can be overcome by relying on compiler extensions, however their use
should be restricted to a minimum in public APIs for portability reasons.

[1] http://dpdk.org/ml/archives/dev/2018-April/095307.html

-- 
Adrien Mazarguil
6WIND


More information about the dev mailing list