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 E07F6A0093 for ; Tue, 19 May 2020 14:59:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D6E3F1C1E4; Tue, 19 May 2020 14:59:24 +0200 (CEST) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id C76F71C1E4 for ; Tue, 19 May 2020 14:59:23 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id e1so15813630wrt.5 for ; Tue, 19 May 2020 05:59:23 -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=45/H0DmWVH2xKlana82lpuLul2f8M5EtcgssIZZNFW8=; b=lJiCn59940LaSnvKoJ/RjZUBC2p3M14Wr+Zhk8D5lG67lx2XU38i5ABlLTAh6blc4q rlciGIgFVElIlNniHVJz53FBFw8d1MGI1mmrM6UbTDfj6nfOEPE2+KXTkGu7wywQppHy Nquk5K5qhOwo7XJFHcrxTKshTcNc/Jk7DdFnZrcNNg5H2ff0Ilq6ZvVk1tgvB6yC61Uh SbVdFNrAQlLPDRwZI6iW4FEiQt27k5oCzFrPQfmql7qe7DGfElZjFwbStZj2ko6SnP3a ZUPg50X08upPdalHhsW/P8nkx2WiO40qTqKgvKubW2jLzcwgaO5T3ol8SdcTXw3RleRf yDEQ== 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=45/H0DmWVH2xKlana82lpuLul2f8M5EtcgssIZZNFW8=; b=uakiYWA+BP4qIenHXdliVM1XYGs1s8bl50mzzrcSweJfPGegK1i/TdvlXFZl8D35RQ dyOGlWgMrHxiTxbSCa9wwQXUc4yQsr4EydoVUKn9MYdCwgtSKCFSYSQQ3X3V5QsL5Vwa xGicfVl+EcZoETCDRbPTEnzz/WdNlKoHnAki9uaGJpISFwLRHT+sNoPydDZyuf3ZZU8w 3zpFbw0PcCVy0UX2M7xfHq7ozVrH8o6GaPe6ctK6BTKPDmCgmUZVXEpIsHK6EB98A2aI 8y07ELo2XSvCt3/ZmCe5F3SNR7I9+OLtnDTzLX6bnqcuM2fS82O6Lurbe3ZnOOaICxAm bwLw== X-Gm-Message-State: AOAM530qEYe2Zfca+qGjL9Liv+wLiJCe/M1rLpWUyrz+1/I4wqEHTIdB qPekI+UhZE9DuSHvtXCIHZzIUlnpXTPpSFkD X-Google-Smtp-Source: ABdhPJygK41ZVg3Zwfia5G29RW7ugBubIa1Iq5MaPMrlEpd/prJm9noIC3mGOXecDz8/SNdSQqGwkw== X-Received: by 2002:a5d:526f:: with SMTP id l15mr25299385wrc.367.1589893163548; Tue, 19 May 2020 05:59:23 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id z124sm3789455wmg.20.2020.05.19.05.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 05:59:23 -0700 (PDT) From: luca.boccassi@gmail.com To: Dekel Peled Cc: Matan Azrad , dpdk stable Date: Tue, 19 May 2020 13:53:41 +0100 Message-Id: <20200519125804.104349-31-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 mask used for IPv6 item validation' 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 5cdff304196a09783a6aa7e7d8edb27999924f50 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 1070b87709..4e957d9862 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1621,7 +1621,6 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item, "\xff\xff\xff\xff\xff\xff\xff\xff", .vtc_flow = RTE_BE32(0xffffffff), .proto = 0xff, - .hop_limits = 0xff, }, }; const int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL); diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c index 72fb1e4669..c162527a5e 100644 --- a/drivers/net/mlx5/mlx5_flow_verbs.c +++ b/drivers/net/mlx5/mlx5_flow_verbs.c @@ -493,14 +493,12 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow, ipv6.val.traffic_class = (vtc_flow_val & RTE_IPV6_HDR_TC_MASK) >> RTE_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 & RTE_IPV6_HDR_FL_MASK) >> RTE_IPV6_HDR_FL_SHIFT); ipv6.mask.traffic_class = (vtc_flow_mask & RTE_IPV6_HDR_TC_MASK) >> RTE_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) { ipv6.val.src_ip[i] &= ipv6.mask.src_ip[i]; @@ -509,7 +507,6 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow, ipv6.val.flow_label &= ipv6.mask.flow_label; 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.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 13:56:20.092466130 +0100 +++ 0031-net-mlx5-fix-mask-used-for-IPv6-item-validation.patch 2020-05-19 13:56:18.223501891 +0100 @@ -1,8 +1,10 @@ -From 6bd5efb23db9e419dec51fbea7f71c2fd3703d75 Mon Sep 17 00:00:00 2001 +From 5cdff304196a09783a6aa7e7d8edb27999924f50 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 @@ -29,7 +31,6 @@ Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function") Fixes: 84c406e74524 ("net/mlx5: add flow translate function") -Cc: stable@dpdk.org Signed-off-by: Dekel Peled Acked-by: Matan Azrad @@ -39,10 +40,10 @@ 2 files changed, 4 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c -index 16c1ef3532..41072da6df 100644 +index 1070b87709..4e957d9862 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c -@@ -1640,7 +1640,6 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item, +@@ -1621,7 +1621,6 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item, "\xff\xff\xff\xff\xff\xff\xff\xff", .vtc_flow = RTE_BE32(0xffffffff), .proto = 0xff, @@ -51,10 +52,10 @@ }; const int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL); diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c -index 04845f8f4c..459e7b6483 100644 +index 72fb1e4669..c162527a5e 100644 --- a/drivers/net/mlx5/mlx5_flow_verbs.c +++ b/drivers/net/mlx5/mlx5_flow_verbs.c -@@ -494,14 +494,12 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow, +@@ -493,14 +493,12 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow, ipv6.val.traffic_class = (vtc_flow_val & RTE_IPV6_HDR_TC_MASK) >> RTE_IPV6_HDR_TC_SHIFT; ipv6.val.next_hdr = spec->hdr.proto; @@ -69,7 +70,7 @@ /* Remove unwanted bits from values. */ for (i = 0; i < RTE_DIM(ipv6.val.src_ip); ++i) { ipv6.val.src_ip[i] &= ipv6.mask.src_ip[i]; -@@ -510,7 +508,6 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow, +@@ -509,7 +507,6 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow, ipv6.val.flow_label &= ipv6.mask.flow_label; ipv6.val.traffic_class &= ipv6.mask.traffic_class; ipv6.val.next_hdr &= ipv6.mask.next_hdr;