From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0080.outbound.protection.outlook.com [104.47.0.80]) by dpdk.org (Postfix) with ESMTP id 9765A1B5E9 for ; Sun, 5 Aug 2018 13:17:23 +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=JJskMLHCDAX5CswK7HVF/rK+hpWNQ0HM9J8l9xrxRzw=; b=Q9v8Xn3bBKmSCt4hWTTnUwQ3C+uQPnWUsDZMmhQg06lhXd+7JY0fSThFFu90Sw3bj3pLoaf3WIU0TOQaplRBYx47uN4M9CpfZ9fEgmoXhIfyWG5VCv5jej/+XPLc5yyZjhnLLjy83ocjer1oG4WCk7sOvGER6Dg/zLA4FsrEapc= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4186.eurprd05.prod.outlook.com (52.134.107.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.15; Sun, 5 Aug 2018 11:17:22 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::52a:650b:ae10:fc3]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::52a:650b:ae10:fc3%4]) with mapi id 15.20.1017.018; Sun, 5 Aug 2018 11:17:22 +0000 From: Shahaf Shuler To: Matan Azrad , Yongseok Koh CC: "dev@dpdk.org" , Yongseok Koh Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: fix sanity check for MPLS-in-GRE Thread-Index: AQHUK3V+d/bIGP0cbU+hLrxLs1xEl6Swt6AAgABMwCA= Date: Sun, 5 Aug 2018 11:17:21 +0000 Message-ID: References: <20180803220056.22840-1-yskoh@mellanox.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [31.154.10.105] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB4186; 6:Hu9OWaUI1jY4szKbfMfOrzhCvdDWavf4plxFz5PJ2eNdap29Y1zQScdPZZqYF23JksfVYlF3d4hRDzUmtKVkOO6uU6r5vtKzJT2lWmv4tOJgbLujHnomsngqLo/45bEt3EeguddzdnzY6Gki9l3pXiO5SNxCmEa9IGn7lu0uuhk5VeNSet3fUz4rTCDFYsfm473EHRLJ2vF2yhbEQRqROrmxeLF4cdo2Reexu7NQ+9b/GSgkzcBWfgyZrynMUQRuubElCk6jwMV8wdQHj//MawDgjJbskqMOkJR3BCJjIqAczNLipYoEWKBk5jm7lzUw+xxFUUInSgpC9ElxRAb0sOhZ/fQIfg9saw6eL1qY6MITyspTT10kSuBm840B8P//BfDcGamrfg9kB8lC5m6m7JO/gepep3WJm8K0u4YC5jb4PmZKLIcWcUg2mCxnB9oTK6PdBA4PcscqO3CS7vErfQ==; 5:8GB4ElCmad+LtK+MxmXk5b7uluNNkWXpiE6YELBMqZNtP9iOm6aTYd/TZ7Dq7PI5VsiQcsEZzK0VSLRJ67V1+dI7eywI+xA484We9MsvjtNcC+TWaKPqVAwQ0ZjMGMU/3vitfiQIU5BljtuzFHjhNeJutBvteC0Tx9Sd6mbI5nI=; 7:0c1QFJr7iuAATjJ0aze6ANJYljP+ChSl0ESUQh63H1vYaz9laix84qYSZj8Kk1ebzQWeQx55pldxV90URJkzYUWuxilW4I1CUfQc66viZa/Mio2HdMAzdfk7OC1v4hubL1Z4JoNNIMnkbHGpTIGfLPSruFw9rKSrwdF2zvBk4UIl6x0VaNl7aPZze1W1cgNyLoan/VSxTJum/XcfBlJBf0QVhWh/dcang+kb7X2w7tRbnLUpZAd6oAKp40wPQgpj x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: b61f9e76-ec5e-48a8-475d-08d5fac503c1 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4186; x-ms-traffictypediagnostic: DB7PR05MB4186: 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)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:DB7PR05MB4186; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4186; x-forefront-prvs: 0755F54DD9 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(366004)(376002)(396003)(39860400002)(136003)(189003)(199004)(53936002)(478600001)(4326008)(25786009)(6246003)(107886003)(6116002)(3846002)(5250100002)(105586002)(106356001)(2906002)(8936002)(97736004)(66066001)(68736007)(33656002)(14454004)(316002)(11346002)(446003)(76176011)(110136005)(14444005)(54906003)(305945005)(7736002)(6506007)(256004)(229853002)(26005)(6636002)(7696005)(5660300001)(9686003)(81156014)(55016002)(74316002)(81166006)(8676002)(6436002)(86362001)(99286004)(2900100001)(102836004)(486006)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4186; H:DB7PR05MB4426.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: nsp7ZNuzrfN/YaN57bI6BBnAq792AxoDj+0b2jngh00Lctsf27/Emq+Z8S9CS7+HZ3A9IP6UDpwI5Ofel8/Cca7lV5usn+du7QTaJULYq1JzLzOxk59EfZ+EhvbTatetpH8WtvSQDki9gLBCzOQD8QuAwmWDJdqM8pxa2/cITr8Csg3cmJ45zriQFdlgwNxf0ixBMzSIZ4pAV55uAm030cqs3kEmrP3d+6jApROtp/Kw0ZCip4bcfoF3hfZM+TUYv3ELBn7VmyP+NAJSpHtY0X9Us5MxLByc7aLj8OX6unxw17NDuN4sl1ndyo3xUlWlZL/Cm4Klyb9y1VGiIO9PYq0U/wMOmRVmAiwQzzJcCBg= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: b61f9e76-ec5e-48a8-475d-08d5fac503c1 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Aug 2018 11:17:21.9451 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4186 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: Sun, 05 Aug 2018 11:17:24 -0000 Sunday, August 5, 2018 9:41 AM, Matan Azrad: > Subject: RE: [dpdk-dev] [PATCH] net/mlx5: fix sanity check for MPLS-in-GR= E >=20 > Hi Koh >=20 > 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) !=3D >=20 > This check is not fully correct because the GRE item must be the last val= id > item before the mpls, so the next flow >=20 > eth / ipv4 / gre / ipv4 / mpls >=20 > is not valid. >=20 > 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.=20 It is correct this patch is not complete, however considering the release s= chedule 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.=20 >=20 >=20 >=20 > > MLX5_FLOW_LAYER_GRE) > > return rte_flow_error_set(error, ENOTSUP, > > RTE_FLOW_ERROR_TYPE_ITEM, > > item, > > -- > > 2.11.0