From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7490AA04B5; Wed, 13 Jan 2021 12:13:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0CA30140CFC; Wed, 13 Jan 2021 12:13:09 +0100 (CET) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by mails.dpdk.org (Postfix) with ESMTP id 43606140CF6 for ; Wed, 13 Jan 2021 12:13:05 +0100 (CET) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Wed, 13 Jan 2021 03:13:04 -0800 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 13 Jan 2021 11:13:01 +0000 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.168) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 13 Jan 2021 11:13:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VdcjtBiOOOykEZi23PvOgZORFyzuo2p/EcsviRimLGf21UiB2wtTqVSXf/wk4TT0i4U82QyKS4n5HVSC1KkOMpahN8JppL7xw32FlehlLbpVrzLSjojvou4S1C87ruGmzzpRTqlYUDkyIAyWftRiEZhll/yqXA23FiiB+/vcOoMVLwcI25YX7NHKNfbBmvVRznCLC//wqsIcFZ9Ylz+hSA9idn8SiOTsKQ0MX/27R28JYeLDa9nNWa9w/m0uu3YD1AQIVNyDmZtdItNqQhUrKyFHhQtY5CDxHcRXwDK0PMQRkIEWQe/MXA6yWeYJtHANXRguxzRpNJDGXsdF5QWqiw== 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=Bp2FmhHnaAbqT1FD38j6fYh/T9P+08QKM7USGxC8PCY=; b=gUZsddBucSlRJnBXvPIPREy9SN7B2jb7Uv4f9Eh8lv5Ue7aPnRwqsNZhhB19pBj0s4OQZgG+H4SFrTA+J1BK7+Vm9JBegc6POV1qAf309S6/K4YuQazAE2bgFGOGjMWwnjrU/kHO2A/+ltU29umB5HtlcusUnKINHsVP0kY46bvF51dNw7c9WxYr8uZBDwEkI/n2bbmRSmVXSllbSEZ0xyqrSaSGZW3yy9SC6k6jnDFnATbfIOVC4U0e+RcTbvR088pC+V4iyu/xTPRssXL2rzVosB2XjKjgmQxledQfuZWoDFdNdipTdsrfpJu+/IeuXqlkESyVnAESftdWgrUHWQ== 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 DM6PR12MB4987.namprd12.prod.outlook.com (2603:10b6:5:163::31) by DM5PR12MB1642.namprd12.prod.outlook.com (2603:10b6:4:7::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.12; Wed, 13 Jan 2021 11:13:00 +0000 Received: from DM6PR12MB4987.namprd12.prod.outlook.com ([fe80::e1e4:bf73:a753:2665]) by DM6PR12MB4987.namprd12.prod.outlook.com ([fe80::e1e4:bf73:a753:2665%4]) with mapi id 15.20.3763.010; Wed, 13 Jan 2021 11:12:59 +0000 From: Ori Kam To: Alexander Kozyrev , "dev@dpdk.org" CC: Slava Ovsiienko , NBU-Contact-Thomas Monjalon , "ferruh.yigit@intel.com" , "andrew.rybchenko@oktetlabs.ru" Thread-Topic: [PATCH v3 1/2] ethdev: introduce generic copy rte flow action Thread-Index: AQHW6V2jnp3uzb98w02plcbbRv6fDKolZlAQ Date: Wed, 13 Jan 2021 11:12:59 +0000 Message-ID: References: <20210112050110.1987-1-akozyrev@nvidia.com> <20210113033854.11827-1-akozyrev@nvidia.com> <20210113033854.11827-2-akozyrev@nvidia.com> In-Reply-To: <20210113033854.11827-2-akozyrev@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.145.126] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 04d2921f-f6e0-432c-b013-08d8b7b42ff7 x-ms-traffictypediagnostic: DM5PR12MB1642: 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:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Sx4+/H63NlM0Ylnuh8Q9yBLhpRAFSIdbMUfoqn29j+h874wTljKs0jcPYLx/xSNLKoydom7RPk5ZbjAoog14AhDX6toiONqVXnKMnmQEV0huyeeVa60F28iPvdeC/GykM1kKFqr+ZwGH1Olnp4amaQbntPR39eUNwpXp2zp2/bK2Rz96Ev1YW00Cx7N0REogV4XEr+FxwdO02o+X+XSxBdc/ACp9RbZFxlC5vgwRbn5DAQxoMw2Cc3zMdAcrjOPv8BEMt11f9KcT/3MetWGRkY5lvTBKXrntRQMrkBcbQVfjiLqQhVGTBdyzNNwBKsfjNy99VDJk/9/8pUq0Xh5ogzr7PN6nY2LcaXIF1ItFPIO5t3ML15sAM0TZiH8vwR+v5PrkpzTbwghonGBQhCaD6eODtb7ZUNYmuyXkfo+8hhlIafFXG/HR3RSjA00Lh7O55bKWB8VPBHGz/AKFTuOVrqvOw7AWuzUy11jzi45CHBCWJJCzAM9lOs8W1l6hmo1AZxtHx8gH3xQ5w5JNc7RqaKbvR5U5q6SiDc0ncK8C6ng= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB4987.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(366004)(346002)(396003)(39860400002)(136003)(45080400002)(478600001)(33656002)(2906002)(8676002)(316002)(83380400001)(110136005)(76116006)(54906003)(66946007)(53546011)(71200400001)(966005)(6506007)(66446008)(4326008)(66476007)(66556008)(64756008)(26005)(55016002)(8936002)(7696005)(52536014)(9686003)(5660300002)(86362001)(186003)(41533002)(21314003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?97dMYaggKjRmuZ3D6bLpHz3trTagJXeZ/IefaziKpFL1hXUHAMrVpGl1K4Xg?= =?us-ascii?Q?gMjgZlyqXblhiiOGdVfn6IurcgOu42d+ix+VyxBsvj3oMh7iZzIDCIKX8xAl?= =?us-ascii?Q?FPRdCJYemFIAN7LUaEoNIZnT3INquaN6CXz6Jq9TNUXSTbVp/5N8jysC3n22?= =?us-ascii?Q?w9nbHKFcYO2ogWe1rxyzqk2JPB/Zd5Tbg/XeCFHa37+B+GvI9C4WgvmhdbHT?= =?us-ascii?Q?l6upJWdXzW1mYKgOkYRwUa888RSnoAOaUzd+z8gLbT7Es7LsOe2NGDKJCvr8?= =?us-ascii?Q?vjy+oapvUcYEkLK8J+yp1wklsfZeixrJOzDbprvustMWiwXsL8WlQZIzAvbo?= =?us-ascii?Q?ebEtCZQf0eLVteX2zzsRso5k73wrjUZURXtjtu6RWDxo/35cdqMbcElZPAJs?= =?us-ascii?Q?A2OAUC49H/fWozpFQ8U4nOTM8+NR7KZhIwwaODfQqlgKPHQrAirqumDTEdBC?= =?us-ascii?Q?LILZoMqds4w5wWkoO1TowAh2JxS00sIlmUxzOljlDXU3o18VCwWIKatzTVLF?= =?us-ascii?Q?eN4QN+6mFPpIUMlrO9EW4bvARALs9YJctG9DYOHiuCHbSuAuLcYROpcVPo+0?= =?us-ascii?Q?z05X71AU03QIAyk2kI1HUuC1u+pS7ZrSUbVS9ctDE5VfTB3Ju9tmWtQw1chN?= =?us-ascii?Q?K/6V1fQA6aKmGsSU1MwOeMpSLEFeFupGIzfU/04Ozqj1Mf1yAwwtTa/KyWlX?= =?us-ascii?Q?SwoeDLlSJBVUDto9ubkAgiAY5FRvITUIO5ds5ZuHJ86M2ousbplToRciicsX?= =?us-ascii?Q?yCd/tAyvxGMkpuUOgPuU4B5s6umzPZuUcSPO9E8YmYHODMf6Ypg2frTLgzcL?= =?us-ascii?Q?5SOt5X/+FDVK4nkFcrCBwCjcwzu2D/Rq36KfErLsXcTdNj/p5+dtbWB1q5Ms?= =?us-ascii?Q?4N/lNfmOmcgPZn/XBXrW+fauON+rYFBFztVZQDRDG7V3u8apabHnSOicnDy+?= =?us-ascii?Q?r/5zGaazxCLORnPFATEdP2nNuGbGGJEoPV4WvG7L7T5MYL4dbVwrLIg/yryO?= =?us-ascii?Q?3X/I?= 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: DM6PR12MB4987.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 04d2921f-f6e0-432c-b013-08d8b7b42ff7 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jan 2021 11:12:59.8713 (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: sc7nfZ3ldsITrUgQAweCWDn3hrVwDnuxUbVq38H7/e0a9cWX9aFerk+KHp+xM/KTc61GyAwAE9BlVAYhtxRsZg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1642 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1610536384; bh=Bp2FmhHnaAbqT1FD38j6fYh/T9P+08QKM7USGxC8PCY=; 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=bkXzj5hl4PsU1PXKNf0cwyIHhhjwK/T4iidEpOn9A7LH8xnMX2HrOCMwEJ93ePbOe SV4IFXagsRzzIxg+wHSIW+vTpZNjtf5J+Cv/u7//DKmCuLBbqT4SX+Xm9lyPdVMCRF c2PZConUzWCJpchHktMZIohq501Y4s5TuJVRwE5xNzXrDsPC/gquhOrQAeBZplRiCB Cc1ovan5sUTvaDoST+QfEjdF6YEYWHwYzmyGxq4nZwCw59LVI1UC0iYqtripixHI9/ 6+eSv5OsEPVd5soESz/yTgcKRSzr3jJE25yjo1uDAj/hTxtmKI3vbEhOowRaUAWmSq +nPAR6ZmSd2yg== Subject: Re: [dpdk-dev] [PATCH v3 1/2] ethdev: introduce generic copy rte flow action X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 Alexander, > -----Original Message----- > From: Alexander Kozyrev > Sent: Wednesday, January 13, 2021 5:39 AM > Subject: [PATCH v3 1/2] ethdev: introduce generic copy rte flow action >=20 > Implement a generic copy flow API to allow copying of an arbitrary > header field (as well as mark, metadata or tag) to another item. >=20 > This generic copy mechanism removes the necessity to implement a > separate RTE Flow action every time we need to modify a new packet > field in the future. A user-provided value can be used from a > specified tag/metadata/mark or directly copied from another packet field. >=20 > The item ID is used to specify the desired source/destination packet > field in order to simplify the API for various encapsulation models. > Specifying the packet field ID with the needed encapsulation level > is able to quickly get a packet field for any inner packet header. >=20 > Alternatively, the special ID (ITEM_START) can be used to point to the > very beginning of a packet. This ID in conjunction with the offset > parameter provides great flexibility to copy/modify any part of a packet > as needed. >=20 > The number of bits to copy as well as the offset to start from can > be specified to allow a partial copy or dividing a big packet field > into multiple small items (let's say copying 128 bits of IPv6 to 4 tags). >=20 > RFC: > https://nam11.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fpatche= s.d > pdk.org%2Fpatch%2F85384%2F&data=3D04%7C01%7Corika%40nvidia.com% > 7C57d1832b57bf4d6852e808d8b774c4b9%7C43083d15727340c1b7db39efd9cc > c17a%7C0%7C0%7C637461059443472688%7CUnknown%7CTWFpbGZsb3d8eyJ > WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C > 1000&sdata=3D7g5wYtlhsN9z2m%2FGMMMGt6rV2bx2z6oFLW1pzGJVGqA%3 > D&reserved=3D0 >=20 > Signed-off-by: Alexander Kozyrev > --- > doc/guides/prog_guide/rte_flow.rst | 50 ++++++++++++++++++++++ > doc/guides/rel_notes/release_21_02.rst | 5 +++ > lib/librte_ethdev/rte_flow.c | 1 + > lib/librte_ethdev/rte_flow.h | 59 ++++++++++++++++++++++++++ > 4 files changed, 115 insertions(+) >=20 > diff --git a/doc/guides/prog_guide/rte_flow.rst > b/doc/guides/prog_guide/rte_flow.rst > index 86b3444803..d6420edc83 100644 > --- a/doc/guides/prog_guide/rte_flow.rst > +++ b/doc/guides/prog_guide/rte_flow.rst > @@ -2766,6 +2766,56 @@ The behaviour of the shared action defined by > ``action`` argument of type > | no properties | > +---------------+ >=20 > +Action: ``COPY_ITEM`` > +^^^^^^^^^^^^^^^^^^^^^ > + > +Copy ``width`` bits from ``src`` item to ``dst`` item. > + > +Any arbitrary header field (as well as mark, metadata or tag values) > +can be used as both source and destination items as set by ``item``. > +``RTE_FLOW_ITEM_START`` is used to point to the beginning of a packet. > +The copy is ignored in case the item specified is not present in a packe= t. > + > + ``level`` is used to access any packet field on any encapsulation level > + as well as any tag element in the tag array. > +- ``0`` means the default behaviour. Depending on the packet type, it ca= n > + mean outermost, innermost or anything in between. > +- ``1`` requests access to the outermost packet encapsulation level. > +- ``2`` and subsequent values requests access to the specified packet > + encapsulation level, from outermost to innermost (lower to higher valu= es). > + For the tag array ``level`` translates directly into the array index. > + > +``offset`` specifies the number of bits to skip from an item start. > +That allows performing a partial copy of the needed part or to divide a = big > +packet field into multiple smaller items. Alternatively, ``offset`` allo= ws > +going past the specified packet field boundary to copy an item to an > +arbitrary place in a packet essentially providing a way to copy any part= of > +a packet to any other part of it if supported by a underlying PMD driver= . > + > +.. _table_rte_flow_action_copy_item: > + > +.. table:: COPY_ITEM > + > + +-----------------------------------------+ > + | Field | Value | > + +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+ > + | ``dst`` | destination item | > + | ``src`` | source item | > + | ``width`` | number of bits to copy | > + +---------------+-------------------------+ > + > +.. _table_rte_flow_action_copy_data: > + > +.. table:: destination/source item definition > + > + +--------------------------------------------------------------------= ------+ > + | Field | Value = | > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+ > + | ``item`` | item ID of a packet field or mark/metadata/tag = | > + | ``level`` | encapsulation level of a packet field or tag array = index | > + | ``offset`` | number of bits to skip at the beginning during the = copy | > + +---------------+----------------------------------------------------= ------+ > + > Negative types > ~~~~~~~~~~~~~~ >=20 > diff --git a/doc/guides/rel_notes/release_21_02.rst > b/doc/guides/rel_notes/release_21_02.rst > index 706cbf8f0c..6bc482a6bf 100644 > --- a/doc/guides/rel_notes/release_21_02.rst > +++ b/doc/guides/rel_notes/release_21_02.rst > @@ -55,6 +55,11 @@ New Features > Also, make sure to start the actual text at the margin. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D >=20 > +* **Added support of copy action in the flow API.** > + > + Added copy action support to copy any arbitrary header field > + (as well as mark, metadata or tag values) to another one: > + ``RTE_FLOW_ACTION_TYPE_COPY_ITEM``. >=20 > Removed Items > ------------- > diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c > index a06f64c271..fdbabefc47 100644 > --- a/lib/librte_ethdev/rte_flow.c > +++ b/lib/librte_ethdev/rte_flow.c > @@ -176,6 +176,7 @@ static const struct rte_flow_desc_data > rte_flow_desc_action[] =3D { > MK_FLOW_ACTION(SET_IPV6_DSCP, sizeof(struct > rte_flow_action_set_dscp)), > MK_FLOW_ACTION(AGE, sizeof(struct rte_flow_action_age)), > MK_FLOW_ACTION(SAMPLE, sizeof(struct rte_flow_action_sample)), > + MK_FLOW_ACTION(COPY_ITEM, sizeof(struct > rte_flow_action_copy_item)), > /** > * Shared action represented as handle of type > * (struct rte_flow_shared action *) stored in conf field (see > diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h > index 0977a78270..794e59f99b 100644 > --- a/lib/librte_ethdev/rte_flow.h > +++ b/lib/librte_ethdev/rte_flow.h > @@ -2198,6 +2198,16 @@ enum rte_flow_action_type { > * struct rte_flow_shared_action). > */ > RTE_FLOW_ACTION_TYPE_SHARED, > + > + /** > + * Copy a packet header field, tag, mark or metadata. > + * > + * Allow saving an arbitrary header field by copying its value > + * to a tag/mark/metadata or copy it into another header field. > + * > + * See struct rte_flow_action_copy_item. > + */ > + RTE_FLOW_ACTION_TYPE_COPY_ITEM, > }; >=20 > /** > @@ -2791,6 +2801,55 @@ struct rte_flow_action_set_dscp { > */ > struct rte_flow_shared_action; >=20 > +enum rte_flow_item_id { > + RTE_FLOW_ITEM_START =3D 0, > + RTE_FLOW_ITEM_MAC_DST, > + RTE_FLOW_ITEM_MAC_SRC, > + RTE_FLOW_ITEM_VLAN_TYPE, > + RTE_FLOW_ITEM_VLAN_ID, > + RTE_FLOW_ITEM_MAC_TYPE, > + RTE_FLOW_ITEM_IPV4_DSCP, > + RTE_FLOW_ITEM_IPV4_TTL, > + RTE_FLOW_ITEM_IPV4_SRC, > + RTE_FLOW_ITEM_IPV4_DST, > + RTE_FLOW_ITEM_IPV6_HOPLIMIT, > + RTE_FLOW_ITEM_IPV6_SRC, > + RTE_FLOW_ITEM_IPV6_DST, > + RTE_FLOW_ITEM_TCP_PORT_SRC, > + RTE_FLOW_ITEM_TCP_PORT_DST, > + RTE_FLOW_ITEM_TCP_SEQ_NUM, > + RTE_FLOW_ITEM_TCP_ACK_NUM, > + RTE_FLOW_ITEM_TCP_FLAGS, > + RTE_FLOW_ITEM_UDP_PORT_SRC, > + RTE_FLOW_ITEM_UDP_PORT_DST, > + RTE_FLOW_ITEM_VXLAN_VNI, > + RTE_FLOW_ITEM_GENEVE_VNI, > + RTE_FLOW_ITEM_GTP_TEID, > + RTE_FLOW_ITEM_TAG, > + RTE_FLOW_ITEM_MARK, > + RTE_FLOW_ITEM_META, > +}; > + Please change the names, RTE_FLOW_ITEM_XXX means that it can be used as rte_flow item this is not the case here. Maybe RTE_FLOW_FIELD_XXX? > +struct rte_flow_action_copy_data { > + enum rte_flow_item_id item; > + uint32_t level; > + uint32_t offset; > +}; > + > +/** > + * RTE_FLOW_ACTION_TYPE_COPY_ITEM > + * > + * Copies a specified number of bits from a source header field > + * to a destination header field. Tag, mark or metadata can also > + * be used as a source/destination to allow saving/overwriting > + * an arbitrary header field with a user-specified value. > + */ > +struct rte_flow_action_copy_item { > + struct rte_flow_action_copy_data dst; > + struct rte_flow_action_copy_data src; > + uint32_t width; > +}; > + > /* Mbuf dynamic field offset for metadata. */ > extern int32_t rte_flow_dynf_metadata_offs; >=20 > -- > 2.24.1