From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0075.outbound.protection.outlook.com [104.47.0.75]) by dpdk.org (Postfix) with ESMTP id 9DEE11B850 for ; Tue, 15 May 2018 13:01:34 +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; bh=mGwL3uuyJ6UuIIaDkl8cHNDTT2268AB9iE1Cm+Yj5qg=; b=NCRhbUiDxjOWhJ2mm0T8bshytuwnN5bzOaNSxHDjK0/TxyX0/GDbS/pSoYiV+XI93OnGC8H37BjzT1HYE9V3nhfrvXsuu/EafX2MjiflG09frGiFHQzJSHbjrqjOG+QdmAuJ5d0zZp693b/udv2NANl3byHaJ4f3bKjY9qd5Q2E= Received: from VI1PR0501MB2608.eurprd05.prod.outlook.com (10.168.137.20) by VI1PR0501MB2416.eurprd05.prod.outlook.com (10.168.135.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Tue, 15 May 2018 11:01:32 +0000 Received: from VI1PR0501MB2608.eurprd05.prod.outlook.com ([fe80::49ca:b540:8f36:c063]) by VI1PR0501MB2608.eurprd05.prod.outlook.com ([fe80::49ca:b540:8f36:c063%17]) with mapi id 15.20.0755.018; Tue, 15 May 2018 11:01:32 +0000 From: Matan Azrad To: =?iso-8859-1?Q?N=E9lio_Laranjeiro?= CC: Shahaf Shuler , "dev@dpdk.org" Thread-Topic: [PATCH] net/mlx5: support MPLS-in-GRE and MPLS-in-UDP Thread-Index: AQHT7DBsfqjUBQ3EB0Whbq4Pd8TX4KQwj5jw Date: Tue, 15 May 2018 11:01:32 +0000 Message-ID: References: <1526305280-23078-1-git-send-email-matan@mellanox.com> <20180515093747.33pcjpl25y5klibk@laranjeiro-vm.dev.6wind.com> In-Reply-To: <20180515093747.33pcjpl25y5klibk@laranjeiro-vm.dev.6wind.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0501MB2416; 7:8f5vXONzkee+q1n3MuQicZ5YX5FDe0vegcQzgdyO7Ln71wt4j5UoRgpq8sRX53zVYamWsEduaEOST/ys79X2uy8Q7Tgkm5xHQFGAhlMi6hq6S6wIp5qT6JMmLQ9fdIYKftMQ4Yv1Qsks4mcR6F0uNgxkLc9g/oW+tP1cu/PU5Ba7q0iiNr7Zsut1ygG4cq7tPw7MZpb0vIn+q0t6M4TBvav71FJI1x6b3qZ/StUTt7DzzoEnvHbLVdPHhOm0GHuH x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2416; x-ms-traffictypediagnostic: VI1PR0501MB2416: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(189930954265078)(45079756050767); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:VI1PR0501MB2416; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2416; x-forefront-prvs: 0673F5BE31 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39380400002)(346002)(39860400002)(366004)(376002)(199004)(189003)(2906002)(6306002)(54906003)(106356001)(76176011)(7696005)(3280700002)(9686003)(26005)(6116002)(7736002)(186003)(86362001)(99286004)(105586002)(3846002)(68736007)(486006)(81156014)(81166006)(446003)(476003)(11346002)(316002)(102836004)(3660700001)(8676002)(6506007)(59450400001)(8936002)(55016002)(2900100001)(6246003)(6916009)(45080400002)(4326008)(66066001)(478600001)(14454004)(966005)(74316002)(5250100002)(6436002)(53936002)(33656002)(305945005)(25786009)(229853002)(97736004)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2416; H:VI1PR0501MB2608.eurprd05.prod.outlook.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-antispam-message-info: eQybMwE0M2zcjf/6IVx8K1Hg+UEPj/wVkZIn9Y1gXvZ+iQy8FaHaNIcknKH0+jI97QRMp77GygdB1raWgLp0C7kCeIN8Mnt2AGMyDCcetm+fwaJ7qgfmoTO2AfoiPzEDQj4ikHBiQh+7atxDaXKZoIfr2FKvTfQTMVE7UkLFAIwqhS5Wi6SsdTyPH1lz5oSe spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 5407313c-8062-4df8-6ae0-08d5ba533807 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5407313c-8062-4df8-6ae0-08d5ba533807 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 May 2018 11:01:32.6761 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2416 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: support MPLS-in-GRE and MPLS-in-UDP 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: Tue, 15 May 2018 11:01:34 -0000 Hi Nelio From: N=E9lio Laranjeiro > Hi Matan, >=20 > I have a single comment, please see bellow, >=20 > On Mon, May 14, 2018 at 01:41:20PM +0000, Matan Azrad wrote: > > Add support for MPLS over GRE and MPLS over UDP tunnel types as > > described in the next RFCs: > > 1. > > https://emea01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fto= o > > > ls.ietf.org%2Fhtml%2Frfc4023&data=3D02%7C01%7Cmatan%40mellanox.com%7C > 702 > > > 706112b0942d2e61808d5ba478dae%7Ca652971c7d2e4d9ba6a4d149256f461b > %7C0%7 > > > C0%7C636619738845367511&sdata=3DjunDKbO1BJ%2Bh%2FZVV7P5zSsxQGDgcR > UGcfhac > > XaC502E%3D&reserved=3D0 2. > > https://emea01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fto= o > > > ls.ietf.org%2Fhtml%2Frfc7510&data=3D02%7C01%7Cmatan%40mellanox.com%7C > 702 > > > 706112b0942d2e61808d5ba478dae%7Ca652971c7d2e4d9ba6a4d149256f461b > %7C0%7 > > > C0%7C636619738845367511&sdata=3D5i8IQBXYRqOtc9Pda2Dq7na9mzfwffi3iuxq > huZS > > JTQ%3D&reserved=3D0 3. > > https://emea01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fto= o > > > ls.ietf.org%2Fhtml%2Frfc4385&data=3D02%7C01%7Cmatan%40mellanox.com%7C > 702 > > > 706112b0942d2e61808d5ba478dae%7Ca652971c7d2e4d9ba6a4d149256f461b > %7C0%7 > > > C0%7C636619738845367511&sdata=3DRG80NBHW3Yv3o%2BzyKFb6p41LsoBgwo > gB6m4X3I > > fshes%3D&reserved=3D0 > > > > Signed-off-by: Matan Azrad > > --- > > doc/guides/nics/mlx5.rst | 4 +- > > drivers/net/mlx5/Makefile | 5 ++ > > drivers/net/mlx5/mlx5.c | 13 ++++ > > drivers/net/mlx5/mlx5.h | 1 + > > drivers/net/mlx5/mlx5_flow.c | 154 > >+++++++++++++++++++++++++++++++++++++++++-- > > 5 files changed, 170 insertions(+), 7 deletions(-) [...] @@ -896,7 > >+928,9 @@ struct ibv_spec_header { > > if (ret) > > goto exit_item_not_supported; > > if (IS_TUNNEL(items->type)) { > > - if (parser->tunnel) { > > + if (parser->tunnel && > > + !((items - 1)->type =3D=3D RTE_FLOW_ITEM_TYPE_GRE > && > > + items->type =3D=3D RTE_FLOW_ITEM_TYPE_MPLS)) { > > rte_flow_error_set(error, ENOTSUP, > > > RTE_FLOW_ERROR_TYPE_ITEM, > > items, > > @@ -904,6 +938,16 @@ struct ibv_spec_header { > > " tunnel encapsulations."); > > return -rte_errno; > > } > > + if (items->type =3D=3D RTE_FLOW_ITEM_TYPE_MPLS && > > + !priv->config.mpls_en) { > > + rte_flow_error_set(error, ENOTSUP, > > + > RTE_FLOW_ERROR_TYPE_ITEM, > > + items, > > + "MPLS not supported or" > > + " disabled in firmware" > > + " configuration."); > > + return -rte_errno; > > + } > > if (!priv->config.tunnel_en && > > parser->rss_conf.level > 1) { > > rte_flow_error_set(error, ENOTSUP, >=20 > Doing such comparison will not work in all cases like >=20 > GRE / VOID / MPLS >=20 > which is totally valid from rte_flow perspective. Yes, you right, will send v2 to handle the voids. >=20 > Regards, >=20 > -- > N=E9lio Laranjeiro > 6WIND