From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v4 8/8] net/mlx5: support new flow counter API Date: Wed, 24 Oct 2018 17:35:55 +0100 Message-ID: <0aca8d6e-01eb-2518-5c89-962e02a800f7@intel.com> References: <1539962470-10950-1-git-send-email-viacheslavo@mellanox.com> <1540289032-29628-1-git-send-email-viacheslavo@mellanox.com> <1540289032-29628-9-git-send-email-viacheslavo@mellanox.com> <61c99e8e-b802-1ae6-99ed-a67fac652ad8@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" , Thomas Monjalon To: Slava Ovsiienko , Shahaf Shuler Return-path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id AB7E71B0F8 for ; Wed, 24 Oct 2018 18:36:09 +0200 (CEST) In-Reply-To: <61c99e8e-b802-1ae6-99ed-a67fac652ad8@intel.com> Content-Language: en-US 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 10/24/2018 5:31 PM, Ferruh Yigit wrote: > On 10/23/2018 11:04 AM, Slava Ovsiienko wrote: >> @@ -1012,9 +1079,12 @@ >> " context."); >> } >> *action_flags |= MLX5_FLOW_ACTION_COUNT; >> -#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_V42 >> +#if defined(HAVE_IBV_DEVICE_COUNTERS_SET_V42) >> counter.counter_set_handle = flow->counter->cs->handle; >> flow_verbs_spec_add(dev_flow, &counter, size); >> +#elif defined(HAVE_IBV_DEVICE_COUNTERS_SET_V45) >> + counter.counters = flow->counter->cs; >> + flow_verbs_spec_add(dev_flow, &counter, size); >> #endif >> return 0; >> } > > Hi Slava, Shahaf, > > There is something wrong related above code. > In next-net-mlx the above code is different than the patch itself [1] and > causing build error. > > This can be because of merge/conflict issues. Please fix issue on next-net-mlx, > I will drop the patches I have pulled and wait until this is fixed. > > But my concern is what would be if this doesn't cause a build error! > If this is because of merge/conflict, this data is lost, we really should > consider using git merge. > If this is because of you updated the code in the tree, I think that is worse, > we shouldn't change code in the tree, please ask for changes in mail list. > > [1] @@ -1012,10 +1077,12 @@ flow_verbs_translate_action_count(struct rte_eth_dev *dev, " context."); } *action_flags |= MLX5_FLOW_ACTION_COUNT; -#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_V42 +#if defined(HAVE_IBV_DEVICE_COUNTERS_SET_V42) counter.counter_set_handle = flow->counter->cs->handle; - flow_verbs_spec_add(dev_flow, &counter, size); +#elif defined(HAVE_IBV_DEVICE_COUNTERS_SET_V45) + counter.counters = flow->counter->cs; #endif + flow_verbs_spec_add(dev_flow, &counter, size); return 0; }