From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EBBB4A0353; Wed, 13 Nov 2019 09:27:52 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9E1071BED9; Wed, 13 Nov 2019 09:27:52 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 9B8E01BED8 for ; Wed, 13 Nov 2019 09:27:50 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from viacheslavo@mellanox.com) with ESMTPS (AES256-SHA encrypted); 13 Nov 2019 10:27:48 +0200 Received: from pegasus11.mtr.labs.mlnx (pegasus11.mtr.labs.mlnx [10.210.16.104]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id xAD8Rmhn015950; Wed, 13 Nov 2019 10:27:48 +0200 Received: from pegasus11.mtr.labs.mlnx (localhost [127.0.0.1]) by pegasus11.mtr.labs.mlnx (8.14.7/8.14.7) with ESMTP id xAD8RmFS010565; Wed, 13 Nov 2019 08:27:48 GMT Received: (from viacheslavo@localhost) by pegasus11.mtr.labs.mlnx (8.14.7/8.14.7/Submit) id xAD8Rmnj010564; Wed, 13 Nov 2019 08:27:48 GMT X-Authentication-Warning: pegasus11.mtr.labs.mlnx: viacheslavo set sender to viacheslavo@mellanox.com using -f From: Viacheslav Ovsiienko To: dev@dpdk.org Cc: matan@mellanox.com, rasland@mellanox.com, orika@mellanox.com Date: Wed, 13 Nov 2019 08:27:45 +0000 Message-Id: <1573633665-10519-1-git-send-email-viacheslavo@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] net/mlx5: fix suffix flow creation in metadata split 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The variable cleanup was erroneously done before pointer usage. The cleanup is moved to appropriate place, comment is clarified. Fixes: 8d72fa668964 ("net/mlx5: share tag between meter and metadata") Reported-by: Eli Britstein Signed-off-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 14a89e2..d677de8 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -3862,16 +3862,18 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority, }, }; uint64_t hash_fields = dev_flow->hash_fields; - dev_flow = NULL; + /* - * Configure the tag action only if we are not the meter sub - * flow. Since tag is already marked in the meter suffix sub - * flow. + * Configure the tag item only if there is no meter subflow. + * Since tag is already marked in the meter suffix subflow + * we can just use the meter suffix items as is. */ if (qrss_id) { + /* Not meter subflow. */ + assert(!mtr_sfx); /* * Put unique id in prefix flow due to it is destroyed - * after prefix flow and id will be freed after there + * after suffix flow and id will be freed after there * is no actual flows with this id and identifier * reallocation becomes possible (for example, for * other flows in other threads). @@ -3884,6 +3886,7 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority, goto exit; q_tag_spec.id = ret; } + dev_flow = NULL; /* Add suffix subflow to execute Q/RSS. */ ret = flow_create_split_inner(dev, flow, &dev_flow, &q_attr, mtr_sfx ? items : -- 1.8.3.1