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 307DAA055A for ; Thu, 27 Feb 2020 10:34:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 291DC1BFDD; Thu, 27 Feb 2020 10:34:30 +0100 (CET) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by dpdk.org (Postfix) with ESMTP id 546121BFDD for ; Thu, 27 Feb 2020 10:34:28 +0100 (CET) Received: by mail-wr1-f41.google.com with SMTP id r7so128256wro.2 for ; Thu, 27 Feb 2020 01:34:28 -0800 (PST) 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=By/dkBC4JoroYbCh/OsGQlr1G4jcEjop+GZR4B7ruIk=; b=kUMjywtlCGuyYe05Af0E/2lNZkD+T48/xUh26MoN5R6Ti7LROwTYvdvBU27BCiqWL2 54ILtKLffYFa48MmpCtimacJ2tbdLtoPVZ55UxdC6SftWSmNh/1KK2ZbJ2UKFwl1RLib /Ro9CxnNb/fMR8IQnZWw1EKKsp+QKp0sX6Ap/1/ss1zJSYS0O5BZ2pk8xgQHaXU0RXrQ ZjQcVhvdCIZAQuaJg9saDq202MVn7a733ou7vGGI8zK04iQkopYhB6eUJgYlU4EJLC5w lrioq09R7NsZpqyZxY8R+ZU9ooOEyhNYbnBMdNVewAyHnLWW8YyPO/8AedQ9hd52N/G/ I93A== 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=By/dkBC4JoroYbCh/OsGQlr1G4jcEjop+GZR4B7ruIk=; b=ULcrmfKtJRV7us47L7IoSj/9p6KRF548jZFVVeCqlucatfpgmw4hNfK7YdDyjfDYdx Qq+MaDbOWZwx+P37ECyqlXIIUrWVlLh5QFItxxQDaDFga5FedFelIE+g6zIja0+12DXd 3pwAmAYGpy/LdHJ5FM5qbDbZVabW7vIEIs6qZEc4YiiiouiwJpjuKwL3jF09znKAKYyU K90kLycIXU7P75M6cuDLCni1Z+Nm6phKdaA32KxynjoMCskELGxVnFUv9a6wtjkG/Ok3 7okKc6z/sHw3gPORZVUowkWjlm4bPnrXPOamNid+xS7F15mQm/aEDPPrzJPU52/L7Nbq tWjw== X-Gm-Message-State: APjAAAX/YS2EhzZFHBsUy153ayc6k0wKizvLRr0mYlj9vVUrqH5n7d/a C8hjSlgH+qJURidV7sGEFPo= X-Google-Smtp-Source: APXvYqySHeKrkTPgroXfy/TKP7JMuafTWYD9xBSvUby2XqA3dT8GHR4NNTE+j7Fc3O9kl4Ugb3lEfg== X-Received: by 2002:a5d:4902:: with SMTP id x2mr1858452wrq.301.1582796068049; Thu, 27 Feb 2020 01:34:28 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id t3sm7128775wrx.38.2020.02.27.01.34.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 01:34:27 -0800 (PST) From: luca.boccassi@gmail.com To: Matan Azrad Cc: Ori Kam , dpdk stable Date: Thu, 27 Feb 2020 09:33:29 +0000 Message-Id: <20200227093402.17690-9-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200227093402.17690-1-luca.boccassi@gmail.com> References: <20200217174546.25334-54-luca.boccassi@gmail.com> <20200227093402.17690-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix tunnel flow priority' has been queued to stable release 19.11.1 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.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/29/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 818e232a825a26d67a798cfa93566880857c82c7 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 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 0d902f89fe..57d3b1357d 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -7295,6 +7295,8 @@ cnt_err: case RTE_FLOW_ITEM_TYPE_GRE: flow_dv_translate_item_gre(match_mask, match_value, items, tunnel); + matcher.priority = flow->rss.level >= 2 ? + MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4; last_item = MLX5_FLOW_LAYER_GRE; break; case RTE_FLOW_ITEM_TYPE_GRE_KEY: @@ -7305,27 +7307,37 @@ cnt_err: case RTE_FLOW_ITEM_TYPE_NVGRE: flow_dv_translate_item_nvgre(match_mask, match_value, items, tunnel); + matcher.priority = flow->rss.level >= 2 ? + MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4; last_item = MLX5_FLOW_LAYER_GRE; break; case RTE_FLOW_ITEM_TYPE_VXLAN: flow_dv_translate_item_vxlan(match_mask, match_value, items, tunnel); + matcher.priority = flow->rss.level >= 2 ? + MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4; last_item = MLX5_FLOW_LAYER_VXLAN; break; case RTE_FLOW_ITEM_TYPE_VXLAN_GPE: flow_dv_translate_item_vxlan_gpe(match_mask, match_value, items, tunnel); + matcher.priority = flow->rss.level >= 2 ? + MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4; last_item = MLX5_FLOW_LAYER_VXLAN_GPE; break; case RTE_FLOW_ITEM_TYPE_GENEVE: flow_dv_translate_item_geneve(match_mask, match_value, items, tunnel); + matcher.priority = flow->rss.level >= 2 ? + MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4; last_item = MLX5_FLOW_LAYER_GENEVE; break; case RTE_FLOW_ITEM_TYPE_MPLS: flow_dv_translate_item_mpls(match_mask, match_value, items, last_item, tunnel); + matcher.priority = flow->rss.level >= 2 ? + MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4; last_item = MLX5_FLOW_LAYER_MPLS; break; case RTE_FLOW_ITEM_TYPE_MARK: -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-27 09:31:56.139405981 +0000 +++ 0009-net-mlx5-fix-tunnel-flow-priority.patch 2020-02-27 09:31:55.679945463 +0000 @@ -1,8 +1,10 @@ -From 050bfe033c2dcaff1f6cfb3110aa90bf80071513 Mon Sep 17 00:00:00 2001 +From 818e232a825a26d67a798cfa93566880857c82c7 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. @@ -27,19 +29,18 @@ configured. Fixes: d4a405186b73 ("net/mlx5: support tunnel RSS level") -Cc: stable@dpdk.org Signed-off-by: Matan Azrad Acked-by: Ori Kam --- - drivers/net/mlx5/mlx5_flow_dv.c | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) + drivers/net/mlx5/mlx5_flow_dv.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c -index a9bb0b4f10..a8c8a585a4 100644 +index 0d902f89fe..57d3b1357d 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c -@@ -7620,6 +7620,8 @@ cnt_err: +@@ -7295,6 +7295,8 @@ cnt_err: case RTE_FLOW_ITEM_TYPE_GRE: flow_dv_translate_item_gre(match_mask, match_value, items, tunnel); @@ -48,7 +49,7 @@ last_item = MLX5_FLOW_LAYER_GRE; break; case RTE_FLOW_ITEM_TYPE_GRE_KEY: -@@ -7630,27 +7632,37 @@ cnt_err: +@@ -7305,27 +7307,37 @@ cnt_err: case RTE_FLOW_ITEM_TYPE_NVGRE: flow_dv_translate_item_nvgre(match_mask, match_value, items, tunnel); @@ -86,15 +87,6 @@ last_item = MLX5_FLOW_LAYER_MPLS; break; case RTE_FLOW_ITEM_TYPE_MARK: -@@ -7692,6 +7704,8 @@ cnt_err: - case RTE_FLOW_ITEM_TYPE_GTP: - flow_dv_translate_item_gtp(match_mask, match_value, - items, tunnel); -+ matcher.priority = flow->rss.level >= 2 ? -+ MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4; - last_item = MLX5_FLOW_LAYER_GTP; - break; - default: -- 2.20.1