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 BAD05A0351 for ; Thu, 6 Aug 2020 11:58:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B4E001C0AE; Thu, 6 Aug 2020 11:58:31 +0200 (CEST) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by dpdk.org (Postfix) with ESMTP id 2120D1C112 for ; Thu, 6 Aug 2020 11:58:31 +0200 (CEST) Received: by mail-wr1-f48.google.com with SMTP id f12so7549552wru.13 for ; Thu, 06 Aug 2020 02:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iWGZSjE5eXZgUwu9cnX45N9feUCagmJCRcVd1ZbxR4A=; b=umrY4yO8/3CNYbHJqsmCt81rbsnAvMGh/m6nr+dhQ5gjsDwEP4Veu8M17pVcEPcXSX SzYqgegbbpvSUgwDNgTkWYHbs+seFrlH8NNWheSgxZgX+h60H8sU/BXf8MXBjkoiz0l7 i7bplORXwwPAqRhg8GgkoW+E75nYGa5gK/0REj7dIAdYSCBVvOK7ztRKS4SYnN9fxzYM esI0wovh6K6aOIrXULPe6GeQFbteLON/iNuC+Lk3kxR++V0C2owHeWXtlUqLOeGxSag0 kj3aZPlDwQKNQ6fwzrJN7gbGurRo/iwYaKhpcCYpAiPrrbZNYWFqNFW7Rdgv5pxV2HM0 mZ2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iWGZSjE5eXZgUwu9cnX45N9feUCagmJCRcVd1ZbxR4A=; b=BW0FcRvJSjV2QMmQamEduQaUf+08IoFZL3Qd1JoNGwFbWG9wmaV4cnsmGqpNGsxGie UAmBw1MzjMefoUoDBZgtAXB/i4RdRmBoq3l4ZeJk8+ZB+MSr3nla2QZxaCV+FXBr5lzy t/LzySpm2OyL7YZBnxlf1b8iWAliWqco1lJD+RdmpvposuK9sLU1fkwtLLsQ11UALK+1 jL0tza/VFi58VgQGC4eldy2ZZMCFk8UOWOajwBaxff8QHjYOnjmN2EGfGL80RIk2Tu3q 6Pa88VR+JFkxVpfqEdKk4KJGMkC0FjpH8RIzQesbyYKIySyBxbsXwtht+PZHQm+2Q7ie 8F+A== X-Gm-Message-State: AOAM5339GOfHlvZc/i25lmMqXu2gOpc2qLO967wM2xYtn95Cc4FQTkgk +/b1zW6JhBTqoZ42sqmujrU= X-Google-Smtp-Source: ABdhPJzlQslhcMw5HrPMrHuGVJRqs/7zEKMYWkdMxAAsWeRzncT5moqV0ntXar1QiYaJ+QXWjo0YEQ== X-Received: by 2002:adf:f186:: with SMTP id h6mr6915583wro.144.1596707910858; Thu, 06 Aug 2020 02:58:30 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id y142sm6224991wmd.3.2020.08.06.02.58.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2020 02:58:30 -0700 (PDT) From: luca.boccassi@gmail.com To: Michael Baum Cc: Matan Azrad , dpdk stable Date: Thu, 6 Aug 2020 10:53:45 +0100 Message-Id: <20200806095411.774624-17-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200806095411.774624-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> <20200806095411.774624-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix unnecessary init in mark conversion' has been queued to stable release 19.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/08/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 20f72df8bd3f34822de495d6021943f66e31c703 Mon Sep 17 00:00:00 2001 From: Michael Baum Date: Tue, 21 Jul 2020 12:04:37 +0000 Subject: [PATCH] net/mlx5: fix unnecessary init in mark conversion [ upstream commit 7301d1923a7103974077577520511d15420c7407 ] The flow_dv_convert_action_mark function defines an array of field_modify_info structures and initializes the first entity. In the first entity id field, it initializes to 0, even though its type is an enum that has no value of 0. In fact, the function does not use this id field before assigning the appropriate register id into it, so the initialization is unnecessary. Moreover, this initialization is int into enum, and it would be better not to create a type conflict for no reason. Wait for the first entity initialization until the appropriate register id is already known. Fixes: 55deee1715f0 ("net/mlx5: extend flow mark support") Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_dv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 9cf38be7e..387036d0b 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -1147,8 +1147,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev, .mask = &mask, }; struct field_modify_info reg_c_x[] = { - {4, 0, 0}, /* dynamic instead of MLX5_MODI_META_REG_C_1. */ - {0, 0, 0}, + [1] = {0, 0, 0}, }; int reg; @@ -1168,7 +1167,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev, mask = rte_cpu_to_be_32(mask) & msk_c0; mask = rte_cpu_to_be_32(mask << shl_c0); } - reg_c_x[0].id = reg_to_field[reg]; + reg_c_x[0] = (struct field_modify_info){4, 0, reg_to_field[reg]}; return flow_dv_convert_modify_action(&item, reg_c_x, NULL, resource, MLX5_MODIFICATION_TYPE_SET, error); } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-08-06 10:53:16.454251004 +0100 +++ 0017-net-mlx5-fix-unnecessary-init-in-mark-conversion.patch 2020-08-06 10:53:15.764596689 +0100 @@ -1,8 +1,10 @@ -From 7301d1923a7103974077577520511d15420c7407 Mon Sep 17 00:00:00 2001 +From 20f72df8bd3f34822de495d6021943f66e31c703 Mon Sep 17 00:00:00 2001 From: Michael Baum Date: Tue, 21 Jul 2020 12:04:37 +0000 Subject: [PATCH] net/mlx5: fix unnecessary init in mark conversion +[ upstream commit 7301d1923a7103974077577520511d15420c7407 ] + The flow_dv_convert_action_mark function defines an array of field_modify_info structures and initializes the first entity. @@ -17,7 +19,6 @@ id is already known. Fixes: 55deee1715f0 ("net/mlx5: extend flow mark support") -Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Matan Azrad @@ -26,10 +27,10 @@ 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c -index 2ba320d2d..53399800f 100644 +index 9cf38be7e..387036d0b 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c -@@ -1152,8 +1152,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev, +@@ -1147,8 +1147,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev, .mask = &mask, }; struct field_modify_info reg_c_x[] = { @@ -39,7 +40,7 @@ }; int reg; -@@ -1173,7 +1172,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev, +@@ -1168,7 +1167,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev, mask = rte_cpu_to_be_32(mask) & msk_c0; mask = rte_cpu_to_be_32(mask << shl_c0); }