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 ABB0BA057B; Wed, 18 Mar 2020 17:46:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8CE4B2B9E; Wed, 18 Mar 2020 17:46:04 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2054.outbound.protection.outlook.com [40.107.22.54]) by dpdk.org (Postfix) with ESMTP id E4A411AFF for ; Wed, 18 Mar 2020 17:46:02 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cgdBX+s60s+UDw83Wn1S3mfW2TUgfWaaYmnLku3vfE02GE5uVDbZ/ijv1r5tn5VClfn7Yoci1RWQod2jzx5pxNBWHbfhgFzbA6PIQWctN2Afe6p149N6eJ8hRf3rKQGWxx+nuiDkrWpdLKcZo1pzoikBTQ0cUpwdChvvcoIrVIonkNcRAVdY5tvlU5+cHJXSxi6vQO9Ft6MsgGOJ5yOdTpKUD1zaw7eAoa8/En+GuxS+H7/MgLx4Ez4x3f8huzEZN4OTFPQMd08nR2QALuxaJ610tN1LGM6Ev6JJ0w/gAS+MurCN5GmE+GskaySOK3wTmHjWWZhBI1NB8JMjF0ZRRw== 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=jkQ7OGFSBH5p/F58QbJo6mhg0z8uqpdslJNkldD4JyA=; b=O5js+4+K9UYp0lNIt2oznsfXmrAGCVbtXUJEpjgpUWOSaejeYUX6foC/J/J69LPwt4yK+ZYzvape+TFQX1wUy/eXq3WUA/+smWmQhyPGrDOyAWcCZAcfNtMcyhy2pMvpqpCUyDFbCfI3wgMlCPjDkaMqTkSEVZQ3kvdhViOj6yw5p9/L9+SmN8zTWenE1H/OxTW/4kPym/18KbF7zieGz8cLROwn+Mjvfr/egJ01evuRbmpWsFEdIsY9KpRllLa/NITEmYfGnSvknokdPwnqFtAQbWGW5DJQv9l3TqwZh1VERa6WeavwC/i0xRS4z5sv5fKCB6Z7J1GVZiieDjgePA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none 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=jkQ7OGFSBH5p/F58QbJo6mhg0z8uqpdslJNkldD4JyA=; b=WgFFmG+dxuPGLnsGBuCfUCxkNhnPZDje7vj6iRmAMVqrRDrpssM9TyqlJsae3k9NL/+DNZZ7klMR34TY6SGUA7NCiwhrQtPgR4eDe7WxL1ZfQYG5N41rOwb2nkbyqJsAwEYlddT2Bs7DyrulzdwRFcp4S2nHcVpcxaVOM7kNST0= Received: from AM4PR05MB3460.eurprd05.prod.outlook.com (10.171.187.153) by AM4PR05MB3153.eurprd05.prod.outlook.com (10.171.188.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.22; Wed, 18 Mar 2020 16:46:01 +0000 Received: from AM4PR05MB3460.eurprd05.prod.outlook.com ([fe80::cda6:ae00:9ce6:3b13]) by AM4PR05MB3460.eurprd05.prod.outlook.com ([fe80::cda6:ae00:9ce6:3b13%7]) with mapi id 15.20.2835.017; Wed, 18 Mar 2020 16:46:01 +0000 From: Dekel Peled To: "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" , Ori Kam , "john.mcnamara@intel.com" , "Kovacevic, Marko" CC: Asaf Penso , Matan Azrad , Eli Britstein , "dev@dpdk.org" Thread-Topic: [RFC] ethdev: add IPv6 fragment extension header item Thread-Index: AdX9OfOWenen2IZATVisT7HxkOVEhQABgWPA Date: Wed, 18 Mar 2020 16:46:00 +0000 Message-ID: References: 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=dekelp@mellanox.com; x-originating-ip: [176.12.206.224] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: b9c60e4c-c46b-439c-f7b2-08d7cb5bd749 x-ms-traffictypediagnostic: AM4PR05MB3153:|AM4PR05MB3153: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-forefront-prvs: 03468CBA43 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(396003)(346002)(376002)(366004)(39860400002)(199004)(86362001)(4326008)(110136005)(8676002)(54906003)(316002)(6506007)(186003)(8936002)(26005)(71200400001)(7696005)(478600001)(64756008)(66946007)(66556008)(66446008)(76116006)(2940100002)(5660300002)(33656002)(55016002)(81166006)(81156014)(2906002)(9686003)(52536014)(66476007); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3153; H:AM4PR05MB3460.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mIILLKYw19bJevDsac2QmbbmiVzJy4MTu71H0I/PaPy/sayEX+i+GmK8FQHZJkaioYThSBGT10aMr+pFWJP5Q9mfT10quzyrVAq+fJvoTmpvr50HyywWcbp/XKT+kr9i+L/WMG/YGyyP5ESeu0PRvetHTshizVzULprgOa3MbyZ2GDuEl0g9X7VNQTjWd+XGVmJTbanInpO3SRcYEbu6OPCi72zkddR/F7wFdiS3P8Bg8xhWIeJj/NSW1ytPTcrTSTgFVZBF6FCouEi8P2IuNMLvthYMwDm1k8brMWIvJ3q5Z1g4Z8NL2Mcmoyy+cy4Eg6+up0kBDnv16W7ggzbvjT+5lL11KgdWOtvu9zvbwuNSqoB2xjt+6d8lvh7RR6nsgVC+SeWp28Gc9AKEqXGsR0FQrRZc0OyBbnVe1x7iukHUsN8MwgSyQOmMK4u9oatj x-ms-exchange-antispam-messagedata: SjxFrE/BtOKhh3uWywYMqhkx6nTCVrCz1vbciWOUccWRlZXWUU2aqqjJni3hGEURgL33Taqj+uPCVG8QEaqlODgCXoRRZo06GamxvVSBWnm51nQ5fbhRI747Qn9xhtfPnZWZnGD7Nu0YjYq/6hL90w== MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9c60e4c-c46b-439c-f7b2-08d7cb5bd749 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Mar 2020 16:46:00.9236 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4+HE5rFmA8Q+qH767Mtv/eJIPc+6K95IQSK2xkgvPxIxJiw2uOLwrOUZa6jLilEr77P1+TtouBR0fDQt386mWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3153 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] [RFC] ethdev: add IPv6 fragment extension header item 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" Applications handling fragmented IPv6 packets need to match on IPv6 fragmen= t extension header, in order to identify the fragments order and location in the packet. This RFC introduced the IPv6 fragment extension header item. Signed-off-by: Dekel Peled = > --- diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte= _flow.rst index 41c1479..fd8d5b7 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -1170,6 +1170,19 @@ Normally preceded by any of: - `Item: IPV6`_ - `Item: IPV6_EXT`_ +Item: ``IPV6_FRAG_EXT`` +^^^^^^^^^^^^^^^^^^^^^^^ + +Matches the presence of IPv6 fragment extension header. + +- ``hdr``: IPv6 fragment extension header definition (``rte_ip_frag.h``). +- Default ``mask`` matches next_header and frag_data fields only. + +Preceded by any of: + +- `Item: IPV6`_ +- `Item: IPV6_EXT`_ + Item: ``ICMP6`` ^^^^^^^^^^^^^^^ diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h index b43238b..7f30a09 100644 --- a/lib/librte_ethdev/rte_flow.h +++ b/lib/librte_ethdev/rte_flow.h @@ -30,6 +30,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -367,6 +368,13 @@ enum rte_flow_item_type { RTE_FLOW_ITEM_TYPE_IPV6_EXT, /** + * Matches the presence of IPv6 fragment extension header. + * + * See struct rte_flow_item_ipv6_frag_ext. + */ + RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT, + + /** * Matches any ICMPv6 header. * * See struct rte_flow_item_icmp6. @@ -1149,6 +1157,31 @@ struct rte_flow_item_ipv6_ext rte_flow_item_ipv6_ext= _mask =3D { #endif /** + * RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT + * + * Matches the presence of IPv6 fragment extension header. + * + * Preceded by any of: + * + * - RTE_FLOW_ITEM_TYPE_IPV6 + * - RTE_FLOW_ITEM_TYPE_IPV6_EXT + */ +struct rte_flow_item_ipv6_frag_ext { + struct ipv6_extension_fragment hdr; +}; + +/** Default mask for RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT. */ +#ifndef __cplusplus +static const +struct rte_flow_item_ipv6_frag_ext rte_flow_item_ipv6_frag_ext_mask =3D { + .hdr =3D { + .next_header =3D 0xff, + .frag_data =3D RTE_BE16(0xffff), + }, +}; +#endif + +/** * RTE_FLOW_ITEM_TYPE_ICMP6 * * Matches any ICMPv6 header.