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 E061AA0093 for ; Thu, 28 May 2020 18:24:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D72341DC1E; Thu, 28 May 2020 18:24:42 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 335D61DC18 for ; Thu, 28 May 2020 18:24:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590683080; 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=3KGI5cFx/MIyk0zxbw7gYSxWe944LchgXRDPXuSSuJU=; b=K3YHMHyHI4nJZSpK067bk1FNM/mvXy2YYV5FowgW9ihn3JYi9THY13qr3SSomc3Ep7FeQm O/RMXlQLOOfzHXtbD6MNtBQdrbntctCpKkS4pW7l1vKczaZA5lzjo4+qJ/LlkzzFCRA+QC QfvFlUmsou3aQsj5YWg64esre7Ooy04= 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-39-0bzOVyzpOWW3NlUYAfNMVg-1; Thu, 28 May 2020 12:24:34 -0400 X-MC-Unique: 0bzOVyzpOWW3NlUYAfNMVg-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 29B4D805731; Thu, 28 May 2020 16:24:33 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.235]) by smtp.corp.redhat.com (Postfix) with ESMTP id 45956610AB; Thu, 28 May 2020 16:24:32 +0000 (UTC) From: Kevin Traynor To: Dekel Peled Cc: Matan Azrad , dpdk stable Date: Thu, 28 May 2020 17:22:01 +0100 Message-Id: <20200528162322.7863-14-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 mask used for IPv6 item validation' 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/a7e766dd7824d50489820192298700e67150cd93 Thanks. Kevin. --- >From a7e766dd7824d50489820192298700e67150cd93 Mon Sep 17 00:00:00 2001 From: Dekel Peled Date: Tue, 3 Mar 2020 14:37:30 +0200 Subject: [PATCH] net/mlx5: fix mask used for IPv6 item validation [ upstream commit 6bd5efb23db9e419dec51fbea7f71c2fd3703d75 ] The nic_mask struct in function mlx5_flow_validate_item_ipv6() includes hop_limits field. This is redundant since matching on this item is not supported using Verbs flow engine (dv_flow_en=0). (Separate patch will be sent to handle this issue for DV flow engine.) Setting a rule including match on this field will fail: testpmd> flow create 0 ingress pattern eth / ipv6 hop is 1 / end actions drop / end port_flow_complain(): Caught PMD error type 1 (cause unspecified): hardware refuses to create flow: Operation not supported This patch removes the redundant field from nic_mask, to ensure that such flow rules will be rejected by PMD validation: testpmd> flow create 0 ingress pattern eth / ipv6 hop is 1 / end actions drop / end port_flow_complain(): Caught PMD error type 13 (specific pattern item): cause: 0x7fffffffa2c8, mask enables non supported bits: Operation not supported The related lines in function flow_verbs_translate_item_ipv6() are removed as well, since they are redundant. Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function") Fixes: 84c406e74524 ("net/mlx5: add flow translate function") Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.c | 1 - drivers/net/mlx5/mlx5_flow_verbs.c | 3 --- 2 files changed, 4 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 7f518fcd26..362fae56c4 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1267,5 +1267,4 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item, .vtc_flow = RTE_BE32(0xffffffff), .proto = 0xff, - .hop_limits = 0xff, }, }; diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c index 1a8a9e63ca..05a3db501f 100644 --- a/drivers/net/mlx5/mlx5_flow_verbs.c +++ b/drivers/net/mlx5/mlx5_flow_verbs.c @@ -480,5 +480,4 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow, IPV6_HDR_TC_SHIFT; ipv6.val.next_hdr = spec->hdr.proto; - ipv6.val.hop_limit = spec->hdr.hop_limits; ipv6.mask.flow_label = rte_cpu_to_be_32((vtc_flow_mask & IPV6_HDR_FL_MASK) >> @@ -487,5 +486,4 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow, IPV6_HDR_TC_SHIFT; ipv6.mask.next_hdr = mask->hdr.proto; - ipv6.mask.hop_limit = mask->hdr.hop_limits; /* Remove unwanted bits from values. */ for (i = 0; i < RTE_DIM(ipv6.val.src_ip); ++i) { @@ -496,5 +494,4 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow, ipv6.val.traffic_class &= ipv6.mask.traffic_class; ipv6.val.next_hdr &= ipv6.mask.next_hdr; - ipv6.val.hop_limit &= ipv6.mask.hop_limit; } flow_verbs_spec_add(&dev_flow->verbs, &ipv6, size); -- 2.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-28 17:12:59.897711990 +0100 +++ 0014-net-mlx5-fix-mask-used-for-IPv6-item-validation.patch 2020-05-28 17:12:59.056557419 +0100 @@ -1 +1 @@ -From 6bd5efb23db9e419dec51fbea7f71c2fd3703d75 Mon Sep 17 00:00:00 2001 +From a7e766dd7824d50489820192298700e67150cd93 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 6bd5efb23db9e419dec51fbea7f71c2fd3703d75 ] + @@ -32 +33,0 @@ -Cc: stable@dpdk.org @@ -42 +43 @@ -index 16c1ef3532..41072da6df 100644 +index 7f518fcd26..362fae56c4 100644 @@ -45 +46 @@ -@@ -1641,5 +1641,4 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item, +@@ -1267,5 +1267,4 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item, @@ -52 +53 @@ -index 04845f8f4c..459e7b6483 100644 +index 1a8a9e63ca..05a3db501f 100644 @@ -55,2 +56,2 @@ -@@ -495,5 +495,4 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow, - RTE_IPV6_HDR_TC_SHIFT; +@@ -480,5 +480,4 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow, + IPV6_HDR_TC_SHIFT; @@ -60,3 +61,3 @@ - rte_cpu_to_be_32((vtc_flow_mask & RTE_IPV6_HDR_FL_MASK) >> -@@ -502,5 +501,4 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow, - RTE_IPV6_HDR_TC_SHIFT; + rte_cpu_to_be_32((vtc_flow_mask & IPV6_HDR_FL_MASK) >> +@@ -487,5 +486,4 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow, + IPV6_HDR_TC_SHIFT; @@ -67 +68 @@ -@@ -511,5 +509,4 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow, +@@ -496,5 +494,4 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow,