From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH v2 4/4] ethdev: Add metadata flow and action items support Date: Fri, 6 Apr 2018 14:20:12 +0200 Message-ID: <20180406122012.GQ4957@6wind.com> References: <20180405135148.16388-1-declan.doherty@intel.com> <20180405135148.16388-5-declan.doherty@intel.com> <2392634.y0Dprd7BRi@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Declan Doherty , dev@dpdk.org, Alex Rosenbaum , Ferruh Yigit , Shahaf Shuler , Qi Zhang , Alejandro Lucero , Andrew Rybchenko , Mohammad Abdul Awal , Remy Horton , John McNamara , Rony Efraim , Jingjing Wu , Wenzhuo Lu , Yuanhan Liu , Bruce Richardson To: Thomas Monjalon Return-path: Received: from mail-wr0-f175.google.com (mail-wr0-f175.google.com [209.85.128.175]) by dpdk.org (Postfix) with ESMTP id E995A1CF92 for ; Fri, 6 Apr 2018 14:20:28 +0200 (CEST) Received: by mail-wr0-f175.google.com with SMTP id s12so1575787wrc.8 for ; Fri, 06 Apr 2018 05:20:28 -0700 (PDT) Content-Disposition: inline In-Reply-To: <2392634.y0Dprd7BRi@xps> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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