From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1FONrwE0bIon7uVJSYoqGK/BSfmvKuT15AI4m1WNTHk=; b=jyN7oCPHt3DDIEjlUSzlHtoaNS9CWUYLBf9u10mxwFxzZuT+ovxPXhPJOZn6FO9buk 4fajwzdnPDUjhtSM9RCRVHWQ3CfKZG09NDzbpnLMmGF5a1ON0B7O36pgg8ZtSj6Z1PZt w7W6uAATnukxPKE1q5VhI3HK5GI7XbjMvEocLBhGswdym1nH91ewdd0Ny0X4KBzfRNac UmUVTzfhPsqpVKRkDv5dnyD+IITsGAHxKYD7tkcnGbq6ig1iSIuoqAhQ4i3M6U/9hpb+ 8TSTYjEXyISA6KNfw3uZ29yXRQGkXz/PkXt9uQyaYUXMy9zBd1wHfG+a5jzmuDl3C4PZ KDmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1FONrwE0bIon7uVJSYoqGK/BSfmvKuT15AI4m1WNTHk=; b=owM/YMb5Rl/Omo1phyCseWZ3VzIdzrPy9fpsw/jeryvhoZBZfqw5YzE8F3+fJPp4sg 2yB2CiNRr9ZrBlIftRIVFqhjEaMXXZLP+tNRQ6Uf9jXrrVC9hE7wZFbLnUurJspCvZfY GPaB77yMJI0DdEeUnlqbOhh5er9r37uFz8H0vgi1ne66lItbW4Z9bw2UiGhqIMCaRAgm gWfS+/TieVd7avih1ybGr/19lJSGz7RF/sgG9n0glSDmxgjLk7f492FOTj0WN79dO3U3 NXv24MDsTaJFs9X4XnpZc6Ezk4OqZaxUpciMnLmBbgngtpVr6I9qEuGM/6H4R581KNTv yauw== X-Gm-Message-State: ABuFfojLcK1IvyPps0enbp5pbeBlSKL2LRAIFjL0aUzkfYwukxZK4KED MjWcS+l/X1WW6qNy46l04WOfgg== X-Google-Smtp-Source: ACcGV61TBn7QsgwsA5rfuC9luvcsM/ZaF3KjFGp5Uibx9GiRkmGclMA9QAKTXq22AiqJoShaVe+euw== X-Received: by 2002:adf:bbc3:: with SMTP id z3-v6mr23883620wrg.183.1539189361296; Wed, 10 Oct 2018 09:36:01 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id h78-v6sm15898386wmd.4.2018.10.10.09.36.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Oct 2018 09:36:00 -0700 (PDT) Date: Wed, 10 Oct 2018 18:35:43 +0200 From: Adrien Mazarguil To: Mordechay Haimovsky Cc: John Daley , "dev@dpdk.org" , Ferruh Yigit 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 Content-Disposition: inline In-Reply-To: Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix flow list command 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, 10 Oct 2018 16:36:01 -0000 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