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 77F0CA04B7; Sun, 4 Oct 2020 15:55:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 569E61BB86; Sun, 4 Oct 2020 15:55:21 +0200 (CEST) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by dpdk.org (Postfix) with ESMTP id D9EBA1BB43 for ; Sun, 4 Oct 2020 15:55:19 +0200 (CEST) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sun, 04 Oct 2020 06:55:05 -0700 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 4 Oct 2020 13:55:13 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sun, 4 Oct 2020 13:55:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lQP6hVRalxtAcAHlzNR6+u2oFA434n/AbnfbG0rDHub9jgdGu/fIUrrm5+U6AtKbOUiVLvB0YP9XTFhLklkAbigGS0YukGgHsa+NvfWCjT+JvP0lInzuo5TqWlVHio6ZTjBYO9oGxfNks0y5Vxq3spgxz+410iEInQmFl4NyyzFmaWtqhnfh4Lmj2E3/gtLiv/6ACnvYrCRYIJA4ccBY/+5NCf/19itRAFfw/kMp+VC+tv2EtYQzutG775BmgPZlkArefvsZJe6uZimxUKSGSdSEkAK23veu277+XF4yzhNSiTl2AlUGXFLOfXUxlc6lCGHxKA19ybdvjLl+4uThtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m+FQcRtYW8o+/MUQ/aXWHindHBl9V8Zx84NmNBH5WSQ=; b=Bb9LFa8QEZX8HTCq75SELJXgQvqFZRpMfw9gVHKZf4eol/meQqQnCJN/p4lxt+t7A0xlf4UyjUYSSDo+bvzZOPM97ZrdLIqSpJ/sJL1y5xfLfBcNEQgkqvrQM0DAWWqaAqAKrUWvJLsLv78wspmIuTolHYH1wwuoZeYNFI+LMeJaXrKHo9t89sf2oLeLZz9nYvXBI/HsuQrjRQHJKKMmMRej4s9Pul1vAUSE17YrtKCNHSgwMWamo5eVRdR3/xuZ+qK2H/4lt2ra1a9y3rB7JT7n+CsLkr2yZSUV/e/ihPixXbcvdlxc/Eq875tpjUbfzaf75s0X+6cvQVp05kWPSg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from MN2PR12MB4286.namprd12.prod.outlook.com (2603:10b6:208:199::22) by BL0PR12MB4964.namprd12.prod.outlook.com (2603:10b6:208:1c7::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32; Sun, 4 Oct 2020 13:55:11 +0000 Received: from MN2PR12MB4286.namprd12.prod.outlook.com ([fe80::61fd:a36e:cf4f:2d3f]) by MN2PR12MB4286.namprd12.prod.outlook.com ([fe80::61fd:a36e:cf4f:2d3f%8]) with mapi id 15.20.3433.042; Sun, 4 Oct 2020 13:55:11 +0000 From: Ori Kam To: Dekel Peled , NBU-Contact-Thomas Monjalon , "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" , "konstantin.ananyev@intel.com" , "olivier.matz@6wind.com" , "wenzhuo.lu@intel.com" , "beilei.xing@intel.com" , "bernard.iremonger@intel.com" , Matan Azrad , Shahaf Shuler , Slava Ovsiienko CC: "dev@dpdk.org" Thread-Topic: [PATCH v2 11/11] net/mlx5: enforce limitation on IPv6 next proto Thread-Index: AQHWmDgz8HqIQQ4jPUuNQ1pIvkboaKmHe2pQ Date: Sun, 4 Oct 2020 13:55:11 +0000 Message-ID: References: <5a25973431babe75cf681df7827ee69942297446.1601586564.git.dekelp@nvidia.com> In-Reply-To: <5a25973431babe75cf681df7827ee69942297446.1601586564.git.dekelp@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [147.236.152.129] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2c944c6a-c026-49a1-7c37-08d8686d1cad x-ms-traffictypediagnostic: BL0PR12MB4964: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: y/rQgZKvuEs37i+Yf2B68y6oNpiLU72gmy7SL7n/4pSgkXNhpJK+Nh2fFCwioEYb56DRXxHssD+FjWSLtqFOB2lzNGY8Su1Fivo4KJ5zgabP8lKrzT00c8aOr6nd6Oct88i5yOJD3PABeqEsCI088AL1O2ScVcbCLtxbPAq0S5Vt58eS4z8ti7J5c+pXsT2pNYmvxhk2j0jOS/3gMafRfAmP4lsIOj3rSURtH8nvXuvU6d58NC+ItStOHFOYQw1ss/sBYnhcdTS0Gw0LMGQApKRTXpzeyEQ33Bb/A3Y4pmfq8ucg7n9qu4lkzqdXAY5E2o4Y5vfbUve+Cq6A6ODde35k3MwFZHDSuZIVhOhFuiiIIgVuLS2wi5a9zQMKf6x9 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR12MB4286.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(376002)(346002)(396003)(136003)(366004)(8936002)(83380400001)(4326008)(478600001)(7696005)(33656002)(76116006)(66556008)(52536014)(86362001)(66946007)(66446008)(64756008)(66476007)(71200400001)(110136005)(2906002)(26005)(5660300002)(316002)(9686003)(186003)(55016002)(6636002)(6506007)(53546011)(8676002)(921003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: +3S7inUq1jj+TT+CnnEi71x/oZts2pxMkcGWdBSoT3omWo1qmhB6sZIy7rdlRVyupWwkw2XKeKN33BdsmuAvAPZoW2yExZOXy1NUcAbl87OXvESQeJGlw8l/3wNHU3RbJbWc3ZnMxxulc5IjPRXo/bYddpTqW41AkYUTAF3tUB6T58dmLqfSXBpEEidos4zSvODJVMoDmkkHcCQoLsIQ/EbUA5PRC/a3MrZTtg5Ndh3UVdM3WVYdmGY0rHAP76/gubyNpreEFvjPmU6d1Lg5qCatqF68QX+gkO5Qt73kw5erD6i/QMWg+a+K5zaHot/ZLQqHQX8gZih1qOxgxCYUKkLe/pETZxUe66+BR0JPyWOqRdhPqxXgWuq3BAk6ghOUqUe/oz31kNMuWVNZ5Ovd9k0sHW5HaT+oFOUJ4G2zHTdwF/WkZNKczRJ3h5CTdbNgz70go2cawSWh8swxmPMXbRZ6hm0HkBrUZ9Th8TGaZaPSaVq/QYE7ILQWcqUVR03t/NpZvsfIrzs6pOM55rXlHUDtLRdcYBghz2NmIuswWaJpdy0hLMkDW+Y6yF91++0jEsprRse/6S1aHOGpcHJ9JxkHSZkbYTXCzSe5WqUApzro2+FMv7xmNO+QYEBPBgvZvyWai3AQbdHdhkJfNMTjGg== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4286.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2c944c6a-c026-49a1-7c37-08d8686d1cad X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Oct 2020 13:55:11.2799 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: GfRPCGifuul3561Fuqtrj74Jj6nfUjUHpfK3YVerdz02y+i14lXjEHn/+jel963JnNDUNXT0GVBAjkfhkFJwJw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4964 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1601819705; bh=m+FQcRtYW8o+/MUQ/aXWHindHBl9V8Zx84NmNBH5WSQ=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-ms-exchange-transport-forked:x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=P/Rg9rsPUfSdThIF19wpFD2krj+oLnbtcL8PHS0h1T2UB4xvmVxW5BDL2ajqR6pYs bWDrjFD/JJmIkAOrWyqQy4aIA3N/bqx0G5noWtMnSeGGAp/aQQHc+N1ah48bpA5feM 1ZgJUIP3LcEPHzeafTcwu0jncb50ElEkhW1RaAMk9r/syPQjWHYqTNijRZfKjk20nM 8VrHKzJkabihDYspK4vGjJo0Td9f92UNuN/f+q0PtCJSJIJyxJMSBu1/lGUpUxST+Y INUksQjzKCeiEs7SyReHdYX0TZqaujX+y9oPg66MmJqAH93nIwh/O4RqGTtpdpPITQ GOwH8ASS7sV4w== Subject: Re: [dpdk-dev] [PATCH v2 11/11] net/mlx5: enforce limitation on IPv6 next proto 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi > -----Original Message----- > From: Dekel Peled > Sent: Friday, October 2, 2020 12:15 AM > Subject: [PATCH v2 11/11] net/mlx5: enforce limitation on IPv6 next proto >=20 > Due to PRM requirement, the IPv6 header item 'proto' field, indicating > the next header protocol, should not be set as extension header. > This patch adds the relevant validation, and documents the limitation. >=20 > Signed-off-by: Dekel Peled > --- > doc/guides/nics/mlx5.rst | 7 +++++++ > drivers/net/mlx5/mlx5_flow.c | 14 ++++++++++++-- > 2 files changed, 19 insertions(+), 2 deletions(-) >=20 > diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst > index 211c0c5..e6ca5e1 100644 > --- a/doc/guides/nics/mlx5.rst > +++ b/doc/guides/nics/mlx5.rst > @@ -311,6 +311,13 @@ Limitations > for some NICs (such as ConnectX-6 Dx and BlueField 2). > The capability bit ``scatter_fcs_w_decap_disable`` shows NIC support= . >=20 > +- IPv6 header item 'proto' field, indicating the next header protocol, s= hould > + not be set as extension header. > + In case the next header is an extension header, it should not be speci= fied in > + IPv6 header item 'proto' field. > + The last extension header item 'next header' field can specify the fol= lowing > + header protocol type. > + > Statistics > ---------- >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index 906741f..7a438cf 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -1645,9 +1645,9 @@ struct mlx5_flow_tunnel_info { > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "IPv6 cannot follow L2/VLAN layer " > "which ether type is not IPv6"); > + if (mask && spec) > + next_proto =3D mask->hdr.proto & spec->hdr.proto; > if (item_flags & MLX5_FLOW_LAYER_IPV6_ENCAP) { > - if (mask && spec) > - next_proto =3D mask->hdr.proto & spec->hdr.proto; > if (next_proto =3D=3D IPPROTO_IPIP || next_proto =3D=3D > IPPROTO_IPV6) > return rte_flow_error_set(error, EINVAL, >=20 > RTE_FLOW_ERROR_TYPE_ITEM, > @@ -1655,6 +1655,16 @@ struct mlx5_flow_tunnel_info { > "multiple tunnel " > "not supported"); > } > + if (next_proto =3D=3D IPPROTO_HOPOPTS || > + next_proto =3D=3D IPPROTO_ROUTING || > + next_proto =3D=3D IPPROTO_FRAGMENT || > + next_proto =3D=3D IPPROTO_ESP || > + next_proto =3D=3D IPPROTO_AH || > + next_proto =3D=3D IPPROTO_DSTOPTS) > + return rte_flow_error_set(error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ITEM, > item, > + "IPv6 proto (next header) should " > + "not be set as extension header"); > if (item_flags & MLX5_FLOW_LAYER_IPIP) > return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > -- > 1.8.3.1 Acked-by: Ori Kam Thanks, Ori