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 5F86AA0561 for ; Thu, 27 Feb 2020 18:38:57 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 587212C02; Thu, 27 Feb 2020 18:38:57 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 2FB762C02 for ; Thu, 27 Feb 2020 18:38:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582825135; 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=5zgaXXDwa1jXUWy7In2oB1svq7qQ8CGGEwSEndjd3Nc=; b=P//gv5/MF1YgbvqM6hQcW4kF6p2db0hCY9fwOXswjg0CepygKfQzydi2lUJ7BQ5hwxecah elvqYQrqXodOgDZwFkh3L+gOP1Q6ZEWfpIoT1umJGwObrlk+gJZcr3s7Lg200tFQrBEzOQ MQn7+IBQ1TUg8QUpcI/wZJx4cNcn2lM= 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-10-Qow99wNSMu2JZo0jz0-JBA-1; Thu, 27 Feb 2020 12:38:51 -0500 X-MC-Unique: Qow99wNSMu2JZo0jz0-JBA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9349C107ACC4; Thu, 27 Feb 2020 17:38:50 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.123]) by smtp.corp.redhat.com (Postfix) with ESMTP id 227188C07F; Thu, 27 Feb 2020 17:38:47 +0000 (UTC) From: Kevin Traynor To: Matan Azrad Cc: Ori Kam , dpdk stable Date: Thu, 27 Feb 2020 17:37:57 +0000 Message-Id: <20200227173807.28004-6-ktraynor@redhat.com> In-Reply-To: <20200227173807.28004-1-ktraynor@redhat.com> References: <20200227173807.28004-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/mlx5: fix tunnel flow priority' has been queued to LTS release 18.11.7 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.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/02/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 rebasi= ng (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/06766aca3e52c7681a= 270f5030e2c6bb852037fd Thanks. Kevin. --- >From 06766aca3e52c7681a270f5030e2c6bb852037fd Mon Sep 17 00:00:00 2001 From: Matan Azrad Date: Thu, 13 Feb 2020 13:03:25 +0000 Subject: [PATCH] net/mlx5: fix tunnel flow priority [ upstream commit 050bfe033c2dcaff1f6cfb3110aa90bf80071513 ] The PMD manages internally the priority of the flows in addition to the user configured priority. So, 2 flows with the same user priority may get different priority. The method: As much as the flow is more specific it gets higher priority (higher means first to be matched). In addition, When the user creates a RSS flow the PMD splits the flows according to the flow RSS layers as the HW requests for RSS TIR. The internal priority for each flow is decided by the flow last layer. L2, L3 and L4 (L2 low and L4 high). The tunnel layer was wrongly decided to be L4 all the time, even when the flow is configured with inner-RSS. Hence, the first RSS split which takes the tunnel layer priority all the time will be matched before the more specific splits. Change the priority of tunnel layer to be L2 when inner-RSS is configured. Fixes: d4a405186b73 ("net/mlx5: support tunnel RSS level") Signed-off-by: Matan Azrad Acked-by: Ori Kam --- drivers/net/mlx5/mlx5_flow_dv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_d= v.c index a6c9137079..bc24c7cd56 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -2219,4 +2219,6 @@ flow_dv_translate(struct rte_eth_dev *dev, =09=09=09flow_dv_translate_item_gre(match_mask, match_value, =09=09=09=09=09=09 items, tunnel); +=09=09=09matcher.priority =3D flow->rss.level >=3D 2 ? +=09=09=09=09 MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4; =09=09=09last_item =3D MLX5_FLOW_LAYER_GRE; =09=09=09break; @@ -2224,4 +2226,6 @@ flow_dv_translate(struct rte_eth_dev *dev, =09=09=09flow_dv_translate_item_nvgre(match_mask, match_value, =09=09=09=09=09=09 items, tunnel); +=09=09=09matcher.priority =3D flow->rss.level >=3D 2 ? +=09=09=09=09 MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4; =09=09=09last_item =3D MLX5_FLOW_LAYER_GRE; =09=09=09break; @@ -2229,4 +2233,6 @@ flow_dv_translate(struct rte_eth_dev *dev, =09=09=09flow_dv_translate_item_vxlan(match_mask, match_value, =09=09=09=09=09=09 items, tunnel); +=09=09=09matcher.priority =3D flow->rss.level >=3D 2 ? +=09=09=09=09 MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4; =09=09=09last_item =3D MLX5_FLOW_LAYER_VXLAN; =09=09=09break; @@ -2235,4 +2241,6 @@ flow_dv_translate(struct rte_eth_dev *dev, =09=09=09=09=09=09=09 match_value, items, =09=09=09=09=09=09=09 tunnel); +=09=09=09matcher.priority =3D flow->rss.level >=3D 2 ? +=09=09=09=09 MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4; =09=09=09last_item =3D MLX5_FLOW_LAYER_VXLAN_GPE; =09=09=09break; @@ -2240,4 +2248,6 @@ flow_dv_translate(struct rte_eth_dev *dev, =09=09=09flow_dv_translate_item_mpls(match_mask, match_value, =09=09=09=09=09=09 items, last_item, tunnel); +=09=09=09matcher.priority =3D flow->rss.level >=3D 2 ? +=09=09=09=09 MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4; =09=09=09last_item =3D MLX5_FLOW_LAYER_MPLS; =09=09=09break; --=20 2.21.1 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092020-02-27 17:26:24.022545483 +0000 +++ 0006-net-mlx5-fix-tunnel-flow-priority.patch=092020-02-27 17:26:23.6278= 31576 +0000 @@ -1 +1 @@ -From 050bfe033c2dcaff1f6cfb3110aa90bf80071513 Mon Sep 17 00:00:00 2001 +From 06766aca3e52c7681a270f5030e2c6bb852037fd Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 050bfe033c2dcaff1f6cfb3110aa90bf80071513 ] + @@ -30 +31,0 @@ -Cc: stable@dpdk.org @@ -35,2 +36,2 @@ - drivers/net/mlx5/mlx5_flow_dv.c | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) + drivers/net/mlx5/mlx5_flow_dv.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) @@ -39 +40 @@ -index a9bb0b4f10..a8c8a585a4 100644 +index a6c9137079..bc24c7cd56 100644 @@ -42 +43 @@ -@@ -7621,4 +7621,6 @@ cnt_err: +@@ -2219,4 +2219,6 @@ flow_dv_translate(struct rte_eth_dev *dev, @@ -49 +50 @@ -@@ -7631,4 +7633,6 @@ cnt_err: +@@ -2224,4 +2226,6 @@ flow_dv_translate(struct rte_eth_dev *dev, @@ -56 +57 @@ -@@ -7636,4 +7640,6 @@ cnt_err: +@@ -2229,4 +2233,6 @@ flow_dv_translate(struct rte_eth_dev *dev, @@ -63 +64 @@ -@@ -7642,4 +7648,6 @@ cnt_err: +@@ -2235,4 +2241,6 @@ flow_dv_translate(struct rte_eth_dev *dev, @@ -70,8 +71 @@ -@@ -7647,4 +7655,6 @@ cnt_err: - =09=09=09flow_dv_translate_item_geneve(match_mask, match_value, - =09=09=09=09=09=09 items, tunnel); -+=09=09=09matcher.priority =3D flow->rss.level >=3D 2 ? -+=09=09=09=09 MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4; - =09=09=09last_item =3D MLX5_FLOW_LAYER_GENEVE; - =09=09=09break; -@@ -7652,4 +7662,6 @@ cnt_err: +@@ -2240,4 +2248,6 @@ flow_dv_translate(struct rte_eth_dev *dev, @@ -83,7 +76,0 @@ - =09=09=09break; -@@ -7693,4 +7705,6 @@ cnt_err: - =09=09=09flow_dv_translate_item_gtp(match_mask, match_value, - =09=09=09=09=09=09 items, tunnel); -+=09=09=09matcher.priority =3D flow->rss.level >=3D 2 ? -+=09=09=09=09 MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4; - =09=09=09last_item =3D MLX5_FLOW_LAYER_GTP;