Message ID | 20180803220056.22840-1-yskoh@mellanox.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Shahaf Shuler |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 44DE71B5C4; Sat, 4 Aug 2018 00:01:16 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20073.outbound.protection.outlook.com [40.107.2.73]) by dpdk.org (Postfix) with ESMTP id B8EF71B5C3 for <dev@dpdk.org>; Sat, 4 Aug 2018 00:01:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=v4UHZGpRrWqDWpzHayx0hh9fJ1rVczl0v3xbHMjv/BQ=; b=i6GO2lGfEU/5gX55BKf/vul1ggxFW53lki7cqA9oSRug7AX31lZ6GtUUh4CYEsIF+mXmwHjwF7NlxIyfyYpyew62XSCQ+l8ya4Dkz83GRejwiZRnuZeqEX4gTbbQrpD4eEVIzkcImqVfBA0eMMfgftxNGn1hjNSsy8Bgj8/dNBQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from mellanox.com (209.116.155.178) by VI1PR0501MB2045.eurprd05.prod.outlook.com (2603:10a6:800:36::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.15; Fri, 3 Aug 2018 22:01:09 +0000 From: Yongseok Koh <yskoh@mellanox.com> To: shahafs@mellanox.com Cc: dev@dpdk.org, Yongseok Koh <yskoh@mellanox.com> Date: Fri, 3 Aug 2018 15:00:56 -0700 Message-Id: <20180803220056.22840-1-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: BL0PR02CA0076.namprd02.prod.outlook.com (2603:10b6:208:51::17) To VI1PR0501MB2045.eurprd05.prod.outlook.com (2603:10a6:800:36::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8aaff610-ff5e-44b4-5acc-08d5f98c9f0a X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2045; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2045; 3:0ffHmyrrWPZ5w2ZIv4TlUqmLs/gCsAaoySRmhpAKLsRucRhI6TAhi13+t7JXpbAN6hegCdnzL/RbpTHLFcg11udQXF9mmgi6yIZXTLcucxIKusCewXJDlTq1Jq2SWTGcULMJx8DvvdrxoMVE4OHKTAC11N7sAZe0JrT32VUib/UARxcLqCm987pvhZYUMhl5B8HiIKEvNIlxs27Zmlc07nKWC15Ty1PUQRT+5fPV0/9TTX0XPXGX042hdAdn1UHL; 25:Sxytz4P5eD8aqH5+C03gk+MyoNbatTu/VGKa3MLunAxnGji1CvhnXX/8mXDk1F8Pz0O+9ardNwL79/dcXJRw2N5fNCESk5jnMDNQYru9zEY9oaoXjJeiGA0IPqaQ9iLnuktA4Rt4gP02+iE5YbND3cp+BBIWOfQWHIkO8VybgrLaGbeTpPQg89Wd8rv5qWJYfkwe2JTapo0DkDiBHuWN3lrgIvKJS+d+0K46+wk4Wu0p5Og2oI/GIyw3KAXjHAwvofRB+RrkpmgtYNDrNXcnluJPzqYb8oUStetYv224JlQxZAMQ45zuAyfBxqk3KauVtROErOssQtCEGcjZ0pj0bw==; 31:h46wt6QiuFdXKr946EE+5/el57v/ZbMdeZTTaFk+5Ndasr9lD5Tp3QStbk2i6C6JiRc0yvWkMpvu1I4CZs+aMesvgE5vBlNfwsApqoOmmVgdurWRwyWI5n6fsWzua6Qf5/5lwcSiHm91igQX6Cmqv0JrlNsscWPIv8oTQAKmIFGA7fYzJAce8fv8HdaUgtaMqWtkYdwUuXbhxveRnGBG0OH+poTFH426H/JT0NosjzU= X-MS-TrafficTypeDiagnostic: VI1PR0501MB2045: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2045; 20:OB48gmpYopVeKSIg0+jilsH58MNV6N5bstm4TQE/5yjhBRFKskVm8cqcK0RF8h7qE8bsei6FXeoQKft2ULV3lK1AD3Wc+M1fmGGZIsE4xEsDaxdNZDRbnrWrcnuPa9mYC+y7p0sGtUX1Jy4wY7SCQQ8DmMNEfwJ7lwYmdPrDkxEShwg2w8RzE5v8xgXPfilxAXdeNy3Chcte1ITWWokL0KQnESMoEQztNgPCpGSTNriNMkiInv25sb5f/me0imYyriqIT17pbjqZbvBHkCmnb7HBE0jK8OnKDfinbenfOUb+Zig562p1RTse2KRtt0SK5/HmkBSEmZOi/W1uHVLykr/sgXEIbj2we9tuBGHGXYXvgwhAKEuvNUDD84vRtrid5tpANyQEtikJ3gAy1rF/5AJiHDnwcII6musgB5zrO0VrydPDgPdsPuK01b2jtUhaMmaUGfgGt0Nzz6ZBdQyMlVWsNsqcYJW9qE3g3xcPq2d0y+WQNkcpzQ+y+Z+MnPvt; 4:n88pZ0dLDihpnVAFqM0obklc/ircjTfsMnUDh6HWlwgFJwF73pjnMUYLvTnn1R0L2P1CfU+03lpj3YgCm+AWfUKmEl1dIFhapLeUalGYhdc1WbQgSta8fT+RdqnunaQucGwUHIQEPHbgCNrjb51uVAfTYRlfJn3MCv8Efh5akpypXhRHGJ+e8jfR4I7XTYkv1W1ppSc9osSCxWafty1N3IXBhjVcMEX3yp5RumLpQpVeWdWfKQoSN0uSZtJ2hRHCxdYJXN34Tyd8Rk71xwA0mQ== X-Microsoft-Antispam-PRVS: <VI1PR0501MB2045214FD1A11BCF33F68BF9C3230@VI1PR0501MB2045.eurprd05.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:VI1PR0501MB2045; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2045; X-Forefront-PRVS: 0753EA505A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(376002)(366004)(346002)(136003)(39860400002)(199004)(189003)(53936002)(50466002)(51416003)(478600001)(97736004)(48376002)(55016002)(26005)(14444005)(476003)(386003)(2906002)(956004)(316002)(486006)(37006003)(16586007)(2616005)(50226002)(106356001)(105586002)(4326008)(34206002)(6636002)(86362001)(25786009)(2361001)(107886003)(7696005)(6666003)(5660300001)(8936002)(305945005)(47776003)(81166006)(52116002)(16526019)(7736002)(81156014)(6116002)(1857600001)(3846002)(69596002)(21086003)(66066001)(2351001)(1076002)(36756003)(68736007)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2045; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0501MB2045; 23:Wekc5bdWsBlcnn6J9wuZIhxQp9kng9RlFVs9vXw?= BQGI8r2Xl0w8mkCBzYe4ZkkNr/TdRZMCzUpPwJVf0KMEpAEcgecXtcilU6gM+8reQDpH+aW/kTN+BcDGOVKcwmzWMIl6nrkXDssVTpg+cDHJ3p35bNqdnp4I8/7WIIJdC0q8JPgdLLrUHkGWn8DsVXa4SnOD0hx+5lnHLKpbijMWYYACFFUNOkq00eNuKkS7AEFv+qPeMhem6yXvWq7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 7:EYVU3If2hLorHy6yewkALyN0oBrc42kbhZHEuVijhET11nPhWCwzucrwLJpDVRCIE5ip0kTV7J61rMKImH5d1uM2CL/K8jFJ4v5GBAxjU+6Hw5VeRh95tKBrGnASPVsAUT8SG3hME/8DOj4OL42vIC8ypbpKS2nd05XnvHlIl7FRtfvrx+JHqU1oj/QhFaujQhArXyhx70cYYB8KAiDojGHfFuCes6OMeQFyOQx+j+iI6FhE6XM4km0+UB0XJU3W SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Aug 2018 22:01:09.3229 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8aaff610-ff5e-44b4-5acc-08d5f98c9f0a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2045 Subject: [dpdk-dev] [PATCH] net/mlx5: fix sanity check for MPLS-in-GRE X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
net/mlx5: fix sanity check for MPLS-in-GRE
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/Intel-compilation | success | Compilation OK |
Commit Message
Yongseok Koh
Aug. 3, 2018, 10 p.m. UTC
Multiple tunnel isn't allowed but MPLS over GRE should be accepted.
Fixes: a4a5cd21d20a ("net/mlx5: add flow MPLS item")
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
Hi Koh From: Yongseok Koh > Multiple tunnel isn't allowed but MPLS over GRE should be accepted. > > Fixes: a4a5cd21d20a ("net/mlx5: add flow MPLS item") > > Signed-off-by: Yongseok Koh <yskoh@mellanox.com> > --- > drivers/net/mlx5/mlx5_flow.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index > b7500ec9d6..ca4625b699 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -1778,7 +1778,9 @@ mlx5_flow_item_mpls(const struct rte_flow_item > *item __rte_unused, > item, > "protocol filtering not compatible" > " with MPLS layer"); > - if (flow->layers & MLX5_FLOW_LAYER_TUNNEL) > + /* Multi-tunnel isn't allowed but MPLS over GRE is an exception. */ > + if (flow->layers & MLX5_FLOW_LAYER_TUNNEL && > + (flow->layers & MLX5_FLOW_LAYER_GRE) != This check is not fully correct because the GRE item must be the last valid item before the mpls, so the next flow eth / ipv4 / gre / ipv4 / mpls is not valid. But the next flows are valid: eth / ipv4 / gre / mpls eth / ipv4 / gre / void / mpls eth / ipv4 / gre / void / void / void / mpls > MLX5_FLOW_LAYER_GRE) > return rte_flow_error_set(error, ENOTSUP, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > -- > 2.11.0
Sunday, August 5, 2018 9:41 AM, Matan Azrad: > Subject: RE: [dpdk-dev] [PATCH] net/mlx5: fix sanity check for MPLS-in-GRE > > Hi Koh > > From: Yongseok Koh > > Multiple tunnel isn't allowed but MPLS over GRE should be accepted. > > > > Fixes: a4a5cd21d20a ("net/mlx5: add flow MPLS item") > > > > Signed-off-by: Yongseok Koh <yskoh@mellanox.com> > > --- > > drivers/net/mlx5/mlx5_flow.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/mlx5/mlx5_flow.c > > b/drivers/net/mlx5/mlx5_flow.c index > > b7500ec9d6..ca4625b699 100644 > > --- a/drivers/net/mlx5/mlx5_flow.c > > +++ b/drivers/net/mlx5/mlx5_flow.c > > @@ -1778,7 +1778,9 @@ mlx5_flow_item_mpls(const struct > rte_flow_item > > *item __rte_unused, > > item, > > "protocol filtering not compatible" > > " with MPLS layer"); > > - if (flow->layers & MLX5_FLOW_LAYER_TUNNEL) > > + /* Multi-tunnel isn't allowed but MPLS over GRE is an exception. */ > > + if (flow->layers & MLX5_FLOW_LAYER_TUNNEL && > > + (flow->layers & MLX5_FLOW_LAYER_GRE) != > > This check is not fully correct because the GRE item must be the last valid > item before the mpls, so the next flow > > eth / ipv4 / gre / ipv4 / mpls > > is not valid. > > But the next flows are valid: > eth / ipv4 / gre / mpls > eth / ipv4 / gre / void / mpls > eth / ipv4 / gre / void / void / void / mpls Spoke w/ Matan on it. It is correct this patch is not complete, however considering the release schedule it is better to have it in than giveup the MPLS-in-GRE support for 18.08. Hence applying this patch and keep track on subsequent one to fully detect all cases. Applied to next-net-mlx, thanks. > > > > > MLX5_FLOW_LAYER_GRE) > > return rte_flow_error_set(error, ENOTSUP, > > RTE_FLOW_ERROR_TYPE_ITEM, > > item, > > -- > > 2.11.0
On Sun, Aug 05, 2018 at 04:17:21AM -0700, Shahaf Shuler wrote: > Sunday, August 5, 2018 9:41 AM, Matan Azrad: > > Subject: RE: [dpdk-dev] [PATCH] net/mlx5: fix sanity check for MPLS-in-GRE > > > > Hi Koh > > > > From: Yongseok Koh > > > Multiple tunnel isn't allowed but MPLS over GRE should be accepted. > > > > > > Fixes: a4a5cd21d20a ("net/mlx5: add flow MPLS item") > > > > > > Signed-off-by: Yongseok Koh <yskoh@mellanox.com> > > > --- > > > drivers/net/mlx5/mlx5_flow.c | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/net/mlx5/mlx5_flow.c > > > b/drivers/net/mlx5/mlx5_flow.c index > > > b7500ec9d6..ca4625b699 100644 > > > --- a/drivers/net/mlx5/mlx5_flow.c > > > +++ b/drivers/net/mlx5/mlx5_flow.c > > > @@ -1778,7 +1778,9 @@ mlx5_flow_item_mpls(const struct > > rte_flow_item > > > *item __rte_unused, > > > item, > > > "protocol filtering not compatible" > > > " with MPLS layer"); > > > - if (flow->layers & MLX5_FLOW_LAYER_TUNNEL) > > > + /* Multi-tunnel isn't allowed but MPLS over GRE is an exception. */ > > > + if (flow->layers & MLX5_FLOW_LAYER_TUNNEL && > > > + (flow->layers & MLX5_FLOW_LAYER_GRE) != > > > > This check is not fully correct because the GRE item must be the last valid > > item before the mpls, so the next flow > > > > eth / ipv4 / gre / ipv4 / mpls > > > > is not valid. > > > > But the next flows are valid: > > eth / ipv4 / gre / mpls > > eth / ipv4 / gre / void / mpls > > eth / ipv4 / gre / void / void / void / mpls > > Spoke w/ Matan on it. > It is correct this patch is not complete, however considering the release schedule it is better to have it in than giveup the MPLS-in-GRE support for 18.08. > > Hence applying this patch and keep track on subsequent one to fully detect all cases. > > Applied to next-net-mlx, thanks. Good to see it is merged, but small comment. This patch is correct and complete by itself. This patch wasn't intended to add all the lacking sanity checks complementing the current flow engine but only to fix a false negative in order to allow MPLSoGRE creation. There're a few more other cases which are not filtered by validation code. For example, the following is also accepted by PMD but HW refuses. pattern eth / ipv4 / udp / gre / end We don't want to push many lines of code in RC stage but bug fixes. As the flow engine doesn't store the previous item, it would've needed quite a few lines of code to address such lacking sanity checks. Those should be done by additional patch for the next (stable) release if needed. Thanks, Yongseok
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index b7500ec9d6..ca4625b699 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1778,7 +1778,9 @@ mlx5_flow_item_mpls(const struct rte_flow_item *item __rte_unused, item, "protocol filtering not compatible" " with MPLS layer"); - if (flow->layers & MLX5_FLOW_LAYER_TUNNEL) + /* Multi-tunnel isn't allowed but MPLS over GRE is an exception. */ + if (flow->layers & MLX5_FLOW_LAYER_TUNNEL && + (flow->layers & MLX5_FLOW_LAYER_GRE) != MLX5_FLOW_LAYER_GRE) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ITEM, item,