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 5E965A051C for ; Tue, 11 Feb 2020 12:40:53 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 56D4B1BFCA; Tue, 11 Feb 2020 12:40:53 +0100 (CET) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id A52AE1BFCA for ; Tue, 11 Feb 2020 12:40:51 +0100 (CET) Received: by mail-wm1-f68.google.com with SMTP id a9so3127971wmj.3 for ; Tue, 11 Feb 2020 03:40:51 -0800 (PST) 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=EQed6fUZBmNLScoOdQ6QK3Y1fxvQCOPGoxXApZYGupI=; b=BDikOMUXXpjY103tlUqvAe9jbzjxCODWLFILmbyApTxTp7SdzYInlDO0HgrLy/C2ao Xkpy0QQlZwNmVnqEVIkHTUKRqnpRQrmDuzIeWu1Rvvpeo9jnWE1eZAqA/0kWeeZQfxXc Cc+jWpTbXFDB1fJ7T5Y9f4/VS0cCPC4KolV3JwKHXkFe1g2wT6O2O9tBSzEqKqwmzr7o qSqoxrxu++5PDPj2aPynATvXTPI6pF+FBDPR7DPXJhdNgFCyd2bsSVX50ZpWgu8lmzRQ HK5GKG4qrpSdLrx0+p0D6VjxELYAV/4de3pVkZLtjlu7W1hgKAo+uc5Bmger8cfK33ln EU9w== 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=EQed6fUZBmNLScoOdQ6QK3Y1fxvQCOPGoxXApZYGupI=; b=RdBeRp2D4aVeUIF6XJpvLRAIKEipKeH6i5JNREOwsfYhsJlvqKQsC4Kz3DMISx8vZz svSBQDOMlz5/jqVVM5+sMJ8x5FnXXU6MfZItxIwCbdLusZQJM7247Q8Fr/Ji1EDs4Xi4 CCl167ACf6qx2mHTfFJWe7Ej097u/+8SIxPaOfuurcHvknzl+7EBJMb5n9H5KvivpqI9 ES81OtejWg3+jj5mvtNwxsTTGtslv+NvVqm5I/PDulIMgdtgjEefGc77/dm8L3JoO+// LxTUAsR0H/S3JYx9PTQ90/Vv8hLpngf7+g2tU1jmix3JhxEupbyPAE2dFnUsX2x0S7EB WNmQ== X-Gm-Message-State: APjAAAWhNa9YsLGA3ZyAdmk9RLZSenYu1cvPtG0S6rcwEQmploWeAWNW DbzL6PXfLWYHrs2QycHy9dw= X-Google-Smtp-Source: APXvYqxTzU/aP56fFERyjQKb0fpJKULPE8xa0BaSbWFp3yRjl1aU8pjDqNjwiQrKT1AKisoV/9Wk0Q== X-Received: by 2002:a05:600c:230d:: with SMTP id 13mr5462597wmo.13.1581421251277; Tue, 11 Feb 2020 03:40:51 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id y131sm3454688wmc.13.2020.02.11.03.40.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:40:50 -0800 (PST) From: luca.boccassi@gmail.com To: Matan Azrad Cc: dpdk stable Date: Tue, 11 Feb 2020 11:21:38 +0000 Message-Id: <20200211112216.3929-152-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix build with clang 3.4.2' has been queued to stable release 19.11.1 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.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/13/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 3fb7f5d152739852a8e1d0919df0c9576f61e059 Mon Sep 17 00:00:00 2001 From: Matan Azrad Date: Wed, 22 Jan 2020 14:36:10 +0000 Subject: [PATCH] net/mlx5: fix build with clang 3.4.2 [ upstream commit 99d49f47b38e9caee4886797f6c6db5e4023b213 ] Compilation massage example: "dpdk/drivers/net/mlx5/mlx5_flow_dv.c:1087:10: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare] if (reg < 0) ~~~ ^ ~ " enum modify_reg holds only non-negative integers and in some places in the code it was used to be compared with negative value, hence compilation was failed. Change all thus places to use integer instead of enum modify_reg. Fixes: 3e8edd0ef848 ("net/mlx5: update metadata register ID query") Fixes: 55deee1715f0 ("net/mlx5: extend flow mark support") Signed-off-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.c | 2 +- drivers/net/mlx5/mlx5_flow.h | 2 +- drivers/net/mlx5/mlx5_flow_dv.c | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index e4c661d7ca..a18cdb918a 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -336,7 +336,7 @@ static struct mlx5_flow_tunnel_info tunnels_info[] = { * The request register on success, a negative errno * value otherwise and rte_errno is set. */ -enum modify_reg +int mlx5_flow_get_reg_id(struct rte_eth_dev *dev, enum mlx5_feature_name feature, uint32_t id, diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 1213b21426..6eccd441d5 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -759,7 +759,7 @@ uint64_t mlx5_flow_hashfields_adjust(struct mlx5_flow *dev_flow, int tunnel, uint64_t hash_fields); uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority, uint32_t subpriority); -enum modify_reg mlx5_flow_get_reg_id(struct rte_eth_dev *dev, +int mlx5_flow_get_reg_id(struct rte_eth_dev *dev, enum mlx5_feature_name feature, uint32_t id, struct rte_flow_error *error); diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 8a9a872ac6..3fa34f5e8c 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -1074,7 +1074,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev, {4, 0, 0}, /* dynamic instead of MLX5_MODI_META_REG_C_1. */ {0, 0, 0}, }; - enum modify_reg reg; + int reg; if (!mask) return rte_flow_error_set(error, EINVAL, @@ -1116,7 +1116,7 @@ flow_dv_get_metadata_reg(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, struct rte_flow_error *error) { - enum modify_reg reg = + int reg = mlx5_flow_get_reg_id(dev, attr->transfer ? MLX5_METADATA_FDB : attr->egress ? @@ -1164,7 +1164,7 @@ flow_dv_convert_action_set_meta struct field_modify_info reg_c_x[] = { [1] = {0, 0, 0}, }; - enum modify_reg reg = flow_dv_get_metadata_reg(dev, attr, error); + int reg = flow_dv_get_metadata_reg(dev, attr, error); if (reg < 0) return reg; @@ -1291,7 +1291,7 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused, struct rte_flow_item_meta nic_mask = { .data = UINT32_MAX }; - enum modify_reg reg; + int reg; int ret; if (!spec) @@ -1887,7 +1887,7 @@ flow_dv_validate_action_set_meta(struct rte_eth_dev *dev, { const struct rte_flow_action_set_meta *conf; uint32_t nic_mask = UINT32_MAX; - enum modify_reg reg; + int reg; if (!mlx5_flow_ext_mreg_supported(dev)) return rte_flow_error_set(error, ENOTSUP, @@ -5867,7 +5867,7 @@ flow_dv_translate_item_meta(struct rte_eth_dev *dev, meta_m = &rte_flow_item_meta_mask; meta_v = (const void *)item->spec; if (meta_v) { - enum modify_reg reg; + int reg; uint32_t value = meta_v->data; uint32_t mask = meta_m->data; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:43.916498403 +0000 +++ 0152-net-mlx5-fix-build-with-clang-3.4.2.patch 2020-02-11 11:17:38.720007330 +0000 @@ -1,8 +1,10 @@ -From 99d49f47b38e9caee4886797f6c6db5e4023b213 Mon Sep 17 00:00:00 2001 +From 3fb7f5d152739852a8e1d0919df0c9576f61e059 Mon Sep 17 00:00:00 2001 From: Matan Azrad Date: Wed, 22 Jan 2020 14:36:10 +0000 Subject: [PATCH] net/mlx5: fix build with clang 3.4.2 +[ upstream commit 99d49f47b38e9caee4886797f6c6db5e4023b213 ] + Compilation massage example: "dpdk/drivers/net/mlx5/mlx5_flow_dv.c:1087:10: error: comparison of unsigned enum expression < 0 is always false @@ -19,7 +21,6 @@ Fixes: 3e8edd0ef848 ("net/mlx5: update metadata register ID query") Fixes: 55deee1715f0 ("net/mlx5: extend flow mark support") -Cc: stable@dpdk.org Signed-off-by: Matan Azrad --- @@ -29,10 +30,10 @@ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c -index 7738cb2499..36bbb49dcb 100644 +index e4c661d7ca..a18cdb918a 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c -@@ -341,7 +341,7 @@ static struct mlx5_flow_tunnel_info tunnels_info[] = { +@@ -336,7 +336,7 @@ static struct mlx5_flow_tunnel_info tunnels_info[] = { * The request register on success, a negative errno * value otherwise and rte_errno is set. */ @@ -42,10 +43,10 @@ enum mlx5_feature_name feature, uint32_t id, diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h -index f771cac42e..aaacf5c255 100644 +index 1213b21426..6eccd441d5 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h -@@ -760,7 +760,7 @@ uint64_t mlx5_flow_hashfields_adjust(struct mlx5_flow *dev_flow, int tunnel, +@@ -759,7 +759,7 @@ uint64_t mlx5_flow_hashfields_adjust(struct mlx5_flow *dev_flow, int tunnel, uint64_t hash_fields); uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority, uint32_t subpriority); @@ -55,10 +56,10 @@ uint32_t id, struct rte_flow_error *error); diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c -index 059d03f6f6..fc156a348f 100644 +index 8a9a872ac6..3fa34f5e8c 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c -@@ -1077,7 +1077,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev, +@@ -1074,7 +1074,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev, {4, 0, 0}, /* dynamic instead of MLX5_MODI_META_REG_C_1. */ {0, 0, 0}, }; @@ -67,7 +68,7 @@ if (!mask) return rte_flow_error_set(error, EINVAL, -@@ -1119,7 +1119,7 @@ flow_dv_get_metadata_reg(struct rte_eth_dev *dev, +@@ -1116,7 +1116,7 @@ flow_dv_get_metadata_reg(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, struct rte_flow_error *error) { @@ -76,7 +77,7 @@ mlx5_flow_get_reg_id(dev, attr->transfer ? MLX5_METADATA_FDB : attr->egress ? -@@ -1167,7 +1167,7 @@ flow_dv_convert_action_set_meta +@@ -1164,7 +1164,7 @@ flow_dv_convert_action_set_meta struct field_modify_info reg_c_x[] = { [1] = {0, 0, 0}, }; @@ -85,7 +86,7 @@ if (reg < 0) return reg; -@@ -1370,7 +1370,7 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused, +@@ -1291,7 +1291,7 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused, struct rte_flow_item_meta nic_mask = { .data = UINT32_MAX }; @@ -94,7 +95,7 @@ int ret; if (!spec) -@@ -2004,7 +2004,7 @@ flow_dv_validate_action_set_meta(struct rte_eth_dev *dev, +@@ -1887,7 +1887,7 @@ flow_dv_validate_action_set_meta(struct rte_eth_dev *dev, { const struct rte_flow_action_set_meta *conf; uint32_t nic_mask = UINT32_MAX; @@ -103,7 +104,7 @@ if (!mlx5_flow_ext_mreg_supported(dev)) return rte_flow_error_set(error, ENOTSUP, -@@ -6081,7 +6081,7 @@ flow_dv_translate_item_meta(struct rte_eth_dev *dev, +@@ -5867,7 +5867,7 @@ flow_dv_translate_item_meta(struct rte_eth_dev *dev, meta_m = &rte_flow_item_meta_mask; meta_v = (const void *)item->spec; if (meta_v) {