From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH] app/testpmd: fix flow list command Date: Wed, 10 Oct 2018 18:35:43 +0200 Message-ID: <20181010163542.GO18937@6wind.com> References: <20181009225124.25513-1-johndale@cisco.com> <20181010083754.GL18937@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: John Daley , "dev@dpdk.org" , Ferruh Yigit To: Mordechay Haimovsky Return-path: Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id AA0D51B715 for ; Wed, 10 Oct 2018 18:36:01 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id 61-v6so6469417wrb.6 for ; Wed, 10 Oct 2018 09:36:01 -0700 (PDT) Content-Disposition: inline In-Reply-To: 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 Wed, Oct 10, 2018 at 04:27:59PM +0000, Mordechay Haimovsky wrote: > Hi Adrien, > You are correct, the bug is not where we thought it is, moreover the fix breaks > the CLI and should be rejected. > We investigated more and found that the bug is in the port_flow_query routine > Which passes an incorrect argument to rte_flow_conv as follows: > ret = rte_flow_conv(RTE_FLOW_CONV_OP_ACTION_NAME_PTR, > &name, sizeof(name), action, &error); > While it should pass onlt the action type as follows: > ret = rte_flow_conv(RTE_FLOW_CONV_OP_ACTION_NAME_PTR, > &name, sizeof(name), > (void *)(uintptr_t)action->type, &error); > As done in port_flow_list routine (which works) > if (rte_flow_conv(RTE_FLOW_CONV_OP_ACTION_NAME_PTR, > &name, sizeof(name), > (void *)(uintptr_t)action->type, > NULL) <= 0) > And according to the parameters description of rte_flow_conv_name (called by rte_flow_conv): > * @param[in] src > * Depending on @p is_action, source pattern item or action type cast as a > * pointer. > > Modifying port_flow_query accordingly solves the issue. > I will issue a new patch tonight. Indeed, I confirm this is the right bug to address (and seems like I did not validate rte_flow_query() properly.) Thanks for taking care of it! -- Adrien Mazarguil 6WIND