From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40052.outbound.protection.outlook.com [40.107.4.52]) by dpdk.org (Postfix) with ESMTP id 7F5B01B063 for ; Mon, 6 Aug 2018 20:36:52 +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=FTPbEUX5qwmTJoG58mydw1xr0ViWdD7EUdX4oV8X8ZU=; b=GrurUZ4t242m7LU1Mwo09p1zKhrb0DorXMbLEh9Mh/eP4L/PbsFETWLpx+b1rPyqWjLAXZYWywTQcpwwEoFPirchQDlncszMAAnUsQIy+SAvFAH+NsJi1AYzErxNEXhQmELQhj6Bq8FPIKQXShx3TpVVSQfpKZMEOQJcR+AE10Q= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from yongseok-MBP.local (209.116.155.178) by HE1PR0501MB2043.eurprd05.prod.outlook.com (2603:10a6:3:35::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.15; Mon, 6 Aug 2018 18:36:49 +0000 Date: Mon, 6 Aug 2018 11:36:34 -0700 From: Yongseok Koh To: Shahaf Shuler Cc: Matan Azrad , "dev@dpdk.org" Message-ID: <20180806183632.GA7392@yongseok-MBP.local> References: <20180803220056.22840-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: BN6PR11CA0006.namprd11.prod.outlook.com (2603:10b6:405:2::16) To HE1PR0501MB2043.eurprd05.prod.outlook.com (2603:10a6:3:35::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0217f91d-7015-44d8-137c-08d5fbcb92b3 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:HE1PR0501MB2043; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2043; 3:qgmHBqlxCyxkKn+IXs57C1HMGwxoUXPRRSd0nCrgnBlEFWvp2+xwz3MnovhvDiS0MTnYKNeKJk8iLxV4IgM0LbKthRGBXVZ3Jc2vrvA98WIzuStN5xe3Do6AC/PpqtvHOaF5Uj+zKfJcoAn1JsLy6pQcyo5u7MDjg6ZPPuUmYCtIMv1ydS2amkCR3hveLwf/77tHJcyJqZCdyGz/MyEs8/1g4fbHa0QiMZEACeFy0RHtoM7wZ/MkBZG/ZGLgKI72; 25:J9BqXVF517IeDrDTaPJwfERM4dSjqnDzkhOyRUXgCzrvrYDSrV3A5PRAeFglo+B3eQGyKZjNd0R8OKLO0k+oM9oy1e2kyWs9Ff5Bd341/F9lnK1w+SFfFYmaXoNOa6sT3q/LgI5COOGjUuEOVbsjz34KvnduM6HcGRcBxoM+vEDCNBgs6vSfA7AtayYLc3mcxc/r19RVb6i0RWSBi/bLFiSvoNriBTJ6GUUQWwo5bg9xVJZ5QrjQNOysGIU98wWXmzTPm4Xw7iX7Zy7ZWHdb47+MlVoiTjUJ7k5zDtt4b4XvVDoZ88JJxTEa12ngmuBtvt03S0WH7s8luMG2unjk+Q==; 31:788JHFD0HNELOnWGJ4RH+HAH0KfjFnaGa+FDiFbv7jIn82CNce1erEJNjAAh9wTVjQvolyP7ztjseHvzYZFe3kdq8itaKc7SZuKfjJlz3+CEbTyi+8v7KOSaSjJ7Wo2zyMN4LosOPfMaB473R0ICR6+ig6/lnXyft6GSAFR76kulsZ5xYrHXY3SmAXHAkQJD1YvRbhDnVDeInvwWm47dximVq+/SfNp0P84A3OfaOcU= X-MS-TrafficTypeDiagnostic: HE1PR0501MB2043: X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2043; 20:7mXPdEEcurT4MN88Lup96/7pikvWWqI70bwg9Lq0ZkFGq3ZOhPa1kqDGcKYckZ3BfxL0/dSRg7nnMeef20aWX26rSkurFE7yeachFs1ddzxuNCfuomUSUb4xukdR4zlLl7Lgyffs88i3ul/wwLnXg27kKaJYcFIhl6T1tMzow2+0t4RqB11ZpkPEnY0kkm+LYnELc29QVXPFtKUu1mdOMgepOOdewdbTPZ8C7IjlZU+QzDR7nAtCE1EW5wk/9hwrZ03IERUV5IU1yqnWRGHhMbr8bh/kMmn22VpV/jWn0G8yyeta8VSYIrnGHpx8pGI7VUkBb6w1S7YVUeHN1+oCQlANLtHh0X/clFboCIHHypWovwueUijLePvseeSZlqlhQdskw2NU69Y5gFXaQ5a1vRv7VvxVLgJqpqwLTG6lpOAYgheJe+KArCALvNeVEfXW2RAI9UsmJR4pVmLjX8hB51Hc1Rj3H81Fsi8NXWWu4GGLuAigWn+nKTVeFl7zWleS; 4:oSDHjRDMq70OLCOGkwziMloBm9nywDYxV9HX5f4WwtiBkmpCZpZtkpieujJl8MFSVL787P90sEZ5+WFVreTizrX0fZGqqRsKCOWun0iyMQPRb5oVqtv6mqf8bsTzlae2Pw+fBk+addoxE+WI/bB9Hw/w8+YQ/CoCi2VEH1n4Vx9Byt6xay+65/5riTr5fOBNU+fNn8f7J4d+XVk50XBJwyAK7aTaGsZndM79aWJ8kmvblnaJZu7XvKchwagW6zkUXZfcTCWCCeNtjeX67uvcMA== X-Microsoft-Antispam-PRVS: 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)(5005006)(8121501046)(10201501046)(3002001)(3231311)(944501410)(52105095)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:HE1PR0501MB2043; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0501MB2043; X-Forefront-PRVS: 07562C22DA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(376002)(346002)(136003)(396003)(199004)(189003)(11346002)(106356001)(6666003)(55016002)(105586002)(446003)(486006)(6636002)(476003)(50466002)(81156014)(81166006)(229853002)(956004)(7736002)(16586007)(86362001)(305945005)(8676002)(316002)(58126008)(9686003)(25786009)(1076002)(66066001)(5660300001)(6506007)(54906003)(47776003)(76176011)(98436002)(23726003)(7696005)(33896004)(478600001)(8936002)(26005)(386003)(52116002)(6862004)(4326008)(2906002)(16526019)(6116002)(97736004)(3846002)(68736007)(6246003)(14444005)(53936002)(33656002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0501MB2043; H:yongseok-MBP.local; 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; HE1PR0501MB2043; 23:Y91/lO772QBr+QPGVAP4mAq6LVZHtAhtgs0Js/m?= =?us-ascii?Q?5+QYTNVeyEhUAHNcLIUCLvy4eYWME1NHQxjdMvo7hHVSvyyd0c/Xs4U6ia+w?= =?us-ascii?Q?2WLO45SSVrobJ+M4X7o/IO6x2RW4TIpykX+hz3lynJW31p1v/wB22U6Ac9s9?= =?us-ascii?Q?0JJgNWPi0SeGnUarxLAdtu1wbsca/9S597qWTElhS5V8X8N+QLBe0fBldGzH?= =?us-ascii?Q?JC1S/b0Xeh3yxhn4Rnvp738GTWDWNaqXU81pp9e1zAHgdT49SS7xjG7Jzt1R?= =?us-ascii?Q?Wl1QtX+yQUnkCSgCDUtzaJFi9f15lWMsjRS6ojm2VJAcTbW5whbECgeQwmOR?= =?us-ascii?Q?qxtnvsnYyQuoFcH+g+qWHNEbfrWuMAc6RbMvl+91679orkJtPa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VLX5WM7vctgALEwpnKVl9Hmx+IgTX?= =?us-ascii?Q?VniPlDzzoaSruPU7EcO66/90=3D?= X-Microsoft-Antispam-Message-Info: HpbgWKKOCen75CmJQlpa/7/9Q7IUfcUjgtZsSvj++jMS+hDmstJBNU06BYNHe0V9TmxdW3JynhlhDNQhRl3rxSlEffAs0/djANWRujpt2CF8DNdtdeaS3FvDifo8tKjjER/UlGk6dz4elV/gq22VcWDPQQxP/156EolZcxOgIXNJ/04nGBeZvf3hiW4CtxdVoJkT4zc0wnG/HFTF/+XPkHLBF39/pgylizDo6AaeOvGzwOsfqKoHVmPrYrvPrwe4L4GRa9MnEuUBcEbciIOACpnRu85Je4jCUgAO6TqvwqOZXpjm8apkEkHIyCOQMmucePtHqhlLBbEmXiYtD8hdLFwYpF1sMw1hDQExmMYwlbc= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2043; 6:lRvsLBOTNuVRdMXdoYc1WUmT45yXig4fbTpbCIT90n/uxHDwpLTj8YnrprhawUbVm6qOdAbFFgBFJZjxCtFnuTDVU92n4KVPXngKDERINc5KTYmayD7vpZKwJSfjHXKQi/aX8Q5Yr1WWgLwLDZNtBBfhtmVHJGMcBNtiZ2paMrDKg7gt9wcRbQqU8cpbhGSAspJ+K0kWDMq9asURSZJgyu5cVblgnqdgUG5JFgNQtZVVEF6lys422J1ks23JanxAywpemW0ORne5Rw950BtCxtZU47Y7+ZXiYTosNN+IsO/cA9r6/F+vmTXagpZAcL42e0zKzj0YnmY2EFmUv8jZGJK23ltWorGruYlEnYFoyaYC9364e3AgV7AXHtvXNaYoEWfBC9djqdW3GnjeSZKXGOpVUUEMkAYoOzba9OTlVW1U2NT6ShWJKYkXPA3VsiGB2toRv3NO64mhFec1ElqjzQ==; 5:C50yfrXtqBKGAAqimt5QvMbxR6nIv+ZXsun8pMfT9FB7Hul0u9JaWcR1Zf8XFW7l2Wfl9YNeo+Xqr0YKmKx4StADggKyAmZWvzVHqSFZtXprzSW4SIY8n2r85fFHbz9S1iclOY6/wJtroyhJHD+WQc1gAC0ywtCiB3Thj6xa3NM=; 7:zcFxOLWI34n3lHyNdfdonNJhUVcML3v0fvzRo7aFZMmGqkjFVZ3bANCUdOf48O4WAwyql2YZgIQwzZw91E3N+B6OVgYj+mX0JpparbrX6irBWeeTrbKbzaYdgYbLR9QSE9/k4Brl92PTidfIxbE3jWCPVaCWT9TwAxwjf1n02vM4Q/dgVldtI4nZKQceFnlvV8B2F2NwpCgOTp3CO08VXQ/EFfJpIDGW8qfdtybbk2qKs/3BPreb59paC6DsmMEu SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2018 18:36:49.1076 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0217f91d-7015-44d8-137c-08d5fbcb92b3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0501MB2043 Subject: Re: [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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2018 18:36:52 -0000 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 > > > --- > > > 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