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 7184CA0093 for ; Thu, 28 May 2020 18:24:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5F2AC1DC22; Thu, 28 May 2020 18:24:48 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 4529C1DC28 for ; Thu, 28 May 2020 18:24:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590683084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dqTkd/WWBvHUddTdkqH5+HGS/D0VWJH5MpFFmrDK5QU=; b=hLal/vam0mbuJhTMex6zyeqCALKgYI199I7Dcwrls6n4InT/7uNmDPiUK/OMgBTNEMfZAO Mr1MFGmE5Ve5RLCfLsQt5fDd9+d44g07F8mKNX3t5dPMt8nE3X8BOykhwWdHyaWfhKRKdt BTg23i7FOFAnDXPwfkCSymRAFYNBW5E= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-506-iyaRD3E3NDa4w-_mTey5rw-1; Thu, 28 May 2020 12:24:41 -0400 X-MC-Unique: iyaRD3E3NDa4w-_mTey5rw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B32861054F98; Thu, 28 May 2020 16:24:40 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.235]) by smtp.corp.redhat.com (Postfix) with ESMTP id CE4AB60C05; Thu, 28 May 2020 16:24:39 +0000 (UTC) From: Kevin Traynor To: Dekel Peled Cc: Matan Azrad , dpdk stable Date: Thu, 28 May 2020 17:22:07 +0100 Message-Id: <20200528162322.7863-20-ktraynor@redhat.com> In-Reply-To: <20200528162322.7863-1-ktraynor@redhat.com> References: <20200528162322.7863-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix CVLAN tag set in IP item translation' has been queued to LTS release 18.11.9 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 LTS release 18.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/03/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. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/87bfc24e13a80da6b40cd44c2d080f534f53a0dd Thanks. Kevin. --- >From 87bfc24e13a80da6b40cd44c2d080f534f53a0dd 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 54b8770ffc..2586728afa 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -1308,4 +1308,11 @@ flow_dv_translate_item_ipv4(void *matcher, void *key, MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0xf); 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; @@ -1335,10 +1342,4 @@ flow_dv_translate_item_ipv4(void *matcher, void *key, 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); } @@ -1400,4 +1401,11 @@ flow_dv_translate_item_ipv6(void *matcher, void *key, MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0xf); 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; @@ -1443,10 +1451,4 @@ flow_dv_translate_item_ipv6(void *matcher, void *key, 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.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-28 17:13:00.214273729 +0100 +++ 0020-net-mlx5-fix-CVLAN-tag-set-in-IP-item-translation.patch 2020-05-28 17:12:59.080556875 +0100 @@ -1 +1 @@ -From 1908cab425e4206321fb3f62688f9e1f92b36f6a Mon Sep 17 00:00:00 2001 +From 87bfc24e13a80da6b40cd44c2d080f534f53a0dd Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 1908cab425e4206321fb3f62688f9e1f92b36f6a ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index e2d6690fa8..20906318ee 100644 +index 54b8770ffc..2586728afa 100644 @@ -28,2 +29,2 @@ -@@ -5465,4 +5465,11 @@ flow_dv_translate_item_ipv4(void *matcher, void *key, - MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0x4); +@@ -1308,4 +1308,11 @@ flow_dv_translate_item_ipv4(void *matcher, void *key, + MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0xf); @@ -40,3 +41,3 @@ -@@ -5496,10 +5503,4 @@ flow_dv_translate_item_ipv4(void *matcher, void *key, - 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); +@@ -1335,10 +1342,4 @@ flow_dv_translate_item_ipv4(void *matcher, void *key, + MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol, + ipv4_v->hdr.next_proto_id & ipv4_m->hdr.next_proto_id); @@ -51,2 +52,2 @@ -@@ -5566,4 +5567,11 @@ flow_dv_translate_item_ipv6(void *matcher, void *key, - MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0x6); +@@ -1400,4 +1401,11 @@ flow_dv_translate_item_ipv6(void *matcher, void *key, + MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0xf); @@ -63,3 +64,3 @@ -@@ -5614,10 +5622,4 @@ flow_dv_translate_item_ipv6(void *matcher, void *key, - MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_ttl_hoplimit, - ipv6_v->hdr.hop_limits & ipv6_m->hdr.hop_limits); +@@ -1443,10 +1451,4 @@ flow_dv_translate_item_ipv6(void *matcher, void *key, + MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol, + ipv6_v->hdr.proto & ipv6_m->hdr.proto);