From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 8B6722C01 for ; Wed, 4 Jan 2017 18:49:48 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP; 04 Jan 2017 09:49:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,459,1477983600"; d="scan'208";a="1107953494" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.38]) ([10.237.220.38]) by fmsmga002.fm.intel.com with ESMTP; 04 Jan 2017 09:49:47 -0800 To: Nelio Laranjeiro , dev@dpdk.org References: <025e66266f9baba7515ad4ba54a4a6addc9e2345.1483022600.git.nelio.laranjeiro@6wind.com> Cc: Adrien Mazarguil From: Ferruh Yigit Message-ID: <2973bbd2-8db3-f9e4-da9a-359e399527b3@intel.com> Date: Wed, 4 Jan 2017 17:49:46 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <025e66266f9baba7515ad4ba54a4a6addc9e2345.1483022600.git.nelio.laranjeiro@6wind.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v5 2/6] net/mlx5: support basic flow items and actions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 17:49:50 -0000 Hi Nelio, A quick question. On 12/29/2016 3:15 PM, Nelio Laranjeiro wrote: > Introduce initial software for rte_flow rules. > > VLAN, VXLAN are still not supported. > > Signed-off-by: Nelio Laranjeiro > Acked-by: Adrien Mazarguil <...> > +static int > +priv_flow_validate(struct priv *priv, > + const struct rte_flow_attr *attr, > + const struct rte_flow_item items[], > + const struct rte_flow_action actions[], > + struct rte_flow_error *error, > + struct mlx5_flow *flow) > +{ > + const struct mlx5_flow_items *cur_item = mlx5_flow_items; <...> > + for (; items->type != RTE_FLOW_ITEM_TYPE_END; ++items) { <...> > + } > + for (; actions->type != RTE_FLOW_ACTION_TYPE_END; ++actions) { <...> > + } Is it guarantied in somewhere that items or actions terminated with TYPE_END? And these fields are direct inputs from user. Is there a way to verify user provided values are with TYPE_END terminated? <...>