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 49A7AA0093 for ; Tue, 19 May 2020 14:59:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 418AD1D5DE; Tue, 19 May 2020 14:59:49 +0200 (CEST) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 1218E1D5DE for ; Tue, 19 May 2020 14:59:47 +0200 (CEST) Received: by mail-wr1-f67.google.com with SMTP id l17so15817516wrr.4 for ; Tue, 19 May 2020 05:59:47 -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=8g3RBtiW4Y+nCE8hoT5vYintFAiSFsvx+k/XJN6pUFs=; b=mG7RJhw/27gxG/L8KjJ/QQaJ8kmC/4rHebXNCThnx7NX+YHDr/unyXSX+6Zz0MJjG0 t0OeczxoBBN45DFhz7csPtbEemDygxS+PZ2oUchzdluz/cIBLedMXNCZ9jtNlz2W5xUF CziEa8W3LEkHJNYfeNnEirc2GWLP1EpFA2fnm6b6TPpCbYvwYtPbYPZXB4Wcjs4TQXHE R+W9r/9KLlfbsZmDoQxkjXcHMgO+vvPUeI2h89ddQP/fnvYJskQ9ktuHhRgtYqp3rVh0 tLNUHrZgOspoVobNICktLlQDj+JGl/TP5PkreUgTwnF9JZMte5c0YD0SOX1nFA/g+XNw uiKA== 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=8g3RBtiW4Y+nCE8hoT5vYintFAiSFsvx+k/XJN6pUFs=; b=j0VArsT3SqchpAwDTgRcZEWzNU69qWHJkc7Bu0lpjlWhCUHD+ZnwRVZrwUweRMn6iQ CrIloGz4HKWJrHzNRDxgUolQ35u1l9XNr3tC8ZRbi+58rP0jlTV+4sC9f0om168TxITv A1++PfFU0iRHuxkK2mUNV2v+zF+74Sb/vmpOfswqPMql6jrShWZGrtLsvqerT7z3B8dT zaNoNcp4Zy9XPmakx2XaseznL37l1Z6EAeCDFtz8NZhqZ/peQVL5nAGh1n49fawIZKrB TzyhbNCunxRvAMAu5K7I9DnEcaON1tqGOgY5CTIO/ZQhgJArLObm1q/p0tgfwfkiWXtq eqUQ== X-Gm-Message-State: AOAM533XYQBUTk1JpKjqdJTkcEyI3u5yqwV+f0COw6NHPe5b88NRI+0/ +WtNyI4yPYqx43o2/UkvXywmbtjbzsWcAW+/ X-Google-Smtp-Source: ABdhPJz3DnjWG8YObrfXvn+voormuO5tMNbugW2erby0DaUUVQOXEVNJuAQqvVaCcxWK9oqyBg8cjg== X-Received: by 2002:a5d:6ca7:: with SMTP id a7mr25615373wra.391.1589893186692; Tue, 19 May 2020 05:59:46 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id 81sm4224174wme.16.2020.05.19.05.59.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 05:59:45 -0700 (PDT) From: luca.boccassi@gmail.com To: Dekel Peled Cc: Matan Azrad , dpdk stable Date: Tue, 19 May 2020 13:53:56 +0100 Message-Id: <20200519125804.104349-46-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519125804.104349-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix CVLAN tag set in IP item translation' has been queued to stable release 19.11.3 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/21/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 307876a7478b0ba135e2b577e01838c3130693ba Mon Sep 17 00:00:00 2001 From: Dekel Peled Date: Mon, 16 Mar 2020 10:57:39 +0200 Subject: [PATCH] net/mlx5: fix CVLAN tag set in IP item translation [ upstream commit 1908cab425e4206321fb3f62688f9e1f92b36f6a ] Previous fix added, at the end of functions flow_dv_translate_item_ipv4() and flow_dv_translate_item_ipv6(), the setting of cvlan_tag mask. In the case of unspecified item (item->spec == null) these functions return, and the new code section is not reached. This patch moves the setting of cvlan_tag mask to be done before the check of item->spec, to make sure it is always executed. Fixes: 797329d6c4a1 ("net/mlx5: fix match on ethertype and CVLAN tag") Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_dv.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 868d01438d..b2e0365c1f 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -5203,6 +5203,13 @@ flow_dv_translate_item_ipv4(void *matcher, void *key, else MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0x4); MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_version, 4); + /* + * On outer header (which must contains L2), or inner header with L2, + * set cvlan_tag mask bit to mark this packet as untagged. + * This should be done even if item->spec is empty. + */ + if (!inner || item_flags & MLX5_FLOW_LAYER_INNER_L2) + MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1); if (!ipv4_v) return; if (!ipv4_m) @@ -5230,12 +5237,6 @@ flow_dv_translate_item_ipv4(void *matcher, void *key, ipv4_m->hdr.next_proto_id); MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol, ipv4_v->hdr.next_proto_id & ipv4_m->hdr.next_proto_id); - /* - * On outer header (which must contains L2), or inner header with L2, - * set cvlan_tag mask bit to mark this packet as untagged. - */ - if (!inner || item_flags & MLX5_FLOW_LAYER_INNER_L2) - MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1); } /** @@ -5300,6 +5301,13 @@ flow_dv_translate_item_ipv6(void *matcher, void *key, else MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0x6); MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_version, 6); + /* + * On outer header (which must contains L2), or inner header with L2, + * set cvlan_tag mask bit to mark this packet as untagged. + * This should be done even if item->spec is empty. + */ + if (!inner || item_flags & MLX5_FLOW_LAYER_INNER_L2) + MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1); if (!ipv6_v) return; if (!ipv6_m) @@ -5343,12 +5351,6 @@ flow_dv_translate_item_ipv6(void *matcher, void *key, ipv6_m->hdr.proto); MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol, ipv6_v->hdr.proto & ipv6_m->hdr.proto); - /* - * On outer header (which must contains L2), or inner header with L2, - * set cvlan_tag mask bit to mark this packet as untagged. - */ - if (!inner || item_flags & MLX5_FLOW_LAYER_INNER_L2) - MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1); } /** -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 13:56:20.730394169 +0100 +++ 0046-net-mlx5-fix-CVLAN-tag-set-in-IP-item-translation.patch 2020-05-19 13:56:18.271502755 +0100 @@ -1,8 +1,10 @@ -From 1908cab425e4206321fb3f62688f9e1f92b36f6a Mon Sep 17 00:00:00 2001 +From 307876a7478b0ba135e2b577e01838c3130693ba Mon Sep 17 00:00:00 2001 From: Dekel Peled Date: Mon, 16 Mar 2020 10:57:39 +0200 Subject: [PATCH] net/mlx5: fix CVLAN tag set in IP item translation +[ upstream commit 1908cab425e4206321fb3f62688f9e1f92b36f6a ] + Previous fix added, at the end of functions flow_dv_translate_item_ipv4() and flow_dv_translate_item_ipv6(), the setting of cvlan_tag mask. @@ -13,7 +15,6 @@ check of item->spec, to make sure it is always executed. Fixes: 797329d6c4a1 ("net/mlx5: fix match on ethertype and CVLAN tag") -Cc: stable@dpdk.org Signed-off-by: Dekel Peled Acked-by: Matan Azrad @@ -22,10 +23,10 @@ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c -index e2d6690fa8..20906318ee 100644 +index 868d01438d..b2e0365c1f 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c -@@ -5464,6 +5464,13 @@ flow_dv_translate_item_ipv4(void *matcher, void *key, +@@ -5203,6 +5203,13 @@ flow_dv_translate_item_ipv4(void *matcher, void *key, else MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0x4); MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_version, 4); @@ -39,10 +40,10 @@ if (!ipv4_v) return; if (!ipv4_m) -@@ -5495,12 +5502,6 @@ flow_dv_translate_item_ipv4(void *matcher, void *key, - ipv4_m->hdr.time_to_live); - MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_ttl_hoplimit, - ipv4_v->hdr.time_to_live & ipv4_m->hdr.time_to_live); +@@ -5230,12 +5237,6 @@ flow_dv_translate_item_ipv4(void *matcher, void *key, + ipv4_m->hdr.next_proto_id); + MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol, + ipv4_v->hdr.next_proto_id & ipv4_m->hdr.next_proto_id); - /* - * On outer header (which must contains L2), or inner header with L2, - * set cvlan_tag mask bit to mark this packet as untagged. @@ -52,7 +53,7 @@ } /** -@@ -5565,6 +5566,13 @@ flow_dv_translate_item_ipv6(void *matcher, void *key, +@@ -5300,6 +5301,13 @@ flow_dv_translate_item_ipv6(void *matcher, void *key, else MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0x6); MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_version, 6); @@ -66,10 +67,10 @@ if (!ipv6_v) return; if (!ipv6_m) -@@ -5613,12 +5621,6 @@ flow_dv_translate_item_ipv6(void *matcher, void *key, - ipv6_m->hdr.hop_limits); - MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_ttl_hoplimit, - ipv6_v->hdr.hop_limits & ipv6_m->hdr.hop_limits); +@@ -5343,12 +5351,6 @@ flow_dv_translate_item_ipv6(void *matcher, void *key, + ipv6_m->hdr.proto); + MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol, + ipv6_v->hdr.proto & ipv6_m->hdr.proto); - /* - * On outer header (which must contains L2), or inner header with L2, - * set cvlan_tag mask bit to mark this packet as untagged.