From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id F0C9DA04B5;
	Sun, 10 Jan 2021 10:36:45 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 6C01E140E33;
	Sun, 10 Jan 2021 10:36:45 +0100 (CET)
Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com
 [216.228.121.65])
 by mails.dpdk.org (Postfix) with ESMTP id B2A71140E2F
 for <dev@dpdk.org>; Sun, 10 Jan 2021 10:36:43 +0100 (CET)
Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by
 hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA)
 id <B5ffacaaa0001>; Sun, 10 Jan 2021 01:36:42 -0800
Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL105.nvidia.com
 (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 10 Jan
 2021 09:36:39 +0000
Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.43) by
 HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server
 (TLS) id
 15.0.1473.3 via Frontend Transport; Sun, 10 Jan 2021 09:36:39 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=Ry4XT+2yG4LadJ0tM/J2fN3YrxuWjz8C40VPyYbqQxJDZy+OwX05vK0C/bgKpIYrZhjIaZYMulPua01Vyt2kUx4qXVFdRxbWeNq5fslGLoD+HX3WY/F+f2JQfg5FCUo7QQFmCE7neeTS9F1DrGLJTCzeDHHtjFDybAnnwZ4SNfm0RE4N6NM4buzAYL3KzZATR/ukuglZdU/pX2nOSLXH9CoyMlpPnyd+3c4SHeExH4d9LwY+6bvU2he4mLkHvwYp5smzyE8OR3wLa73osVCvFiABFvFsGQz4C+noac17LBZIBeUGsKqRYYucmmUXN+iWMQvWtUUSYprDCuLQ0c5t3g==
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=tvkoHrwtKVV/XvsIovZWyFi1wYPB3jOLUldHWQa4aHI=;
 b=hvcYgJ15peO7IOlUckqAIPQTI1wMY3YUrMZTWmrpF0V3vEPyldfcJchCn7JvAFX7V27Rvg7omwUflq7ntB4jWhnjcH9d4lxxzmS3zvuYnCLZnTZlTVQUxke+Ry+Xq77gZCelr/0ySf/Szg1y48M3TuJsutMtlSiDoaRBvU2u7NdWLdwG7kOO9oev6O/e2JMWfh77bhhzhMuU6LSMosx+vzRNwsg127sPuMnVdygpgdGpVFVPjTw2OSjlv46bZOYCdJqP873YCaqp9dg5dvg1G2ZdztM3jvTgHQLS1U2vx+exCc37iQkGUGFjlJyc+DN8bzhwpilT6RTj2yGdvaytdA==
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 DM5PR12MB2406.namprd12.prod.outlook.com (2603:10b6:4:b7::23) by
 DM5PR12MB1850.namprd12.prod.outlook.com (2603:10b6:3:108::23) with
 Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.3742.12; Sun, 10 Jan 2021 09:36:36 +0000
Received: from DM5PR12MB2406.namprd12.prod.outlook.com
 ([fe80::d1e7:9a70:b384:4e56]) by DM5PR12MB2406.namprd12.prod.outlook.com
 ([fe80::d1e7:9a70:b384:4e56%7]) with mapi id 15.20.3742.011; Sun, 10 Jan 2021
 09:36:36 +0000
From: Asaf Penso <asafp@nvidia.com>
To: Ori Kam <orika@nvidia.com>, Alexander Kozyrev <akozyrev@nvidia.com>,
 "dev@dpdk.org" <dev@dpdk.org>
CC: Slava Ovsiienko <viacheslavo@nvidia.com>, NBU-Contact-Thomas Monjalon
 <thomas@monjalon.net>, "ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
 "andrew.rybchenko@oktetlabs.ru" <andrew.rybchenko@oktetlabs.ru>
Thread-Topic: [PATCH] ethdev: introduce generic copy rte flow action
Thread-Index: AQHW5ya6YvmBaPjdQUuwHJaTKDM3Uqogmcfg
Date: Sun, 10 Jan 2021 09:36:36 +0000
Message-ID: <DM5PR12MB24068F9FFD915402623E06AFCDAC0@DM5PR12MB2406.namprd12.prod.outlook.com>
References: <20210108063234.7679-1-akozyrev@nvidia.com>
 <DM6PR12MB49874C33F76E674CA45A817BD6AC0@DM6PR12MB4987.namprd12.prod.outlook.com>
In-Reply-To: <DM6PR12MB49874C33F76E674CA45A817BD6AC0@DM6PR12MB4987.namprd12.prod.outlook.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: [87.71.140.153]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 34b48ea0-d097-4110-727a-08d8b54b398d
x-ms-traffictypediagnostic: DM5PR12MB1850:
x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs: <DM5PR12MB185053EC34C6E953A0F6ABBBCDAC0@DM5PR12MB1850.namprd12.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:1284;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: /8pJ32MSJawOuJ33x0LpUNb0VTtUSxIjwcvxKxtMhE5H8VfRfVmnqN/dlIdo9O3S/JL5ypr2WFSD7k6vEe4RACNUw72ZMDcCGp9d1xFnJ6ZwctYKXjJLj5eeq83N0LGxAOi5MSdj5AJte/aN8P8GUCdPlN3doBc2V0tGWVT7JfeFW88L+hebXKY+as16vcbizCeLF91Wph39SHcp6ZBjtJr3lh/qSFuAfFNYw8makhbv9fpvOLw+vB4AV+an2ApVYd4Nv8L383mKdIpfz6dczdq/HUriesIqN0B9Adz8aDIiwijA47VBXjlSlnNGK23feZa8+mCWYO2Wa1O1BusS+v6JqYSBzXBS8ajMtja7nnbhKxlqp33a2h1SupMnwHc97w4zNwkoZ1i2PjcFnsj+6Z4SWJgLSc5KA/vQe3+c5xRpxQAYQnRp26+zLB9DuzlMz+4aIcZdXCtzTGtQSaLFN/vvNL4W8zz9aX8o6DHRqKmlh8+L+lLIwyPC6ppEbytRNA0YErjDuEiPjoBBlnVDPg==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:DM5PR12MB2406.namprd12.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(4636009)(136003)(396003)(346002)(366004)(39850400004)(376002)(86362001)(110136005)(66476007)(316002)(54906003)(66446008)(66946007)(64756008)(66556008)(9686003)(71200400001)(33656002)(45080400002)(6506007)(53546011)(8676002)(55016002)(76116006)(4326008)(26005)(186003)(5660300002)(7696005)(52536014)(83380400001)(478600001)(8936002)(2906002)(41533002);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata: =?us-ascii?Q?faKbOHRyw5xAsNp6Ze81n+5nbycyWUyVeWaj/4bOoCC1jOYmz0vsx6hw316x?=
 =?us-ascii?Q?IpwaAKnObfwo7YrRL/32GeKrUVpev/1FFHgqb30X6DNUevqnWr2jn4o8Moib?=
 =?us-ascii?Q?PpxlG5d26mIZ+HKJyZrhy0uEmDhZn/rh7qVUnbKnGcCEV2nIQx3b0ThDmvb4?=
 =?us-ascii?Q?g2g100tPbzUz8dCda0MNouFakPKMa4XrpbYiTn8GO6Pok6g3MkVSjjTHX+XR?=
 =?us-ascii?Q?b4RGKPxQJvJ2HmexkfpZZZlfwDnkRXuNh7MBawjK+LQEcJCy0+UWGBTlAVVD?=
 =?us-ascii?Q?TnEZQT101UFgiRO3qIE2wZr7qbw8WpT2ySSD0jvLT0jdkHPZ3YM8do/EpeeX?=
 =?us-ascii?Q?2NSd9fmxZYLYIb5qdzcUhGobKDJCKVsAQRnzCLEC1d+nSgYYxpQy9ASRiFyl?=
 =?us-ascii?Q?oAZPkTt0BgZ+G+UtJgDCTB/aL5Nm2ibF4F4EBtoBU/5KvzC0PVZuIcRzfMLB?=
 =?us-ascii?Q?KW17Z2L7Ic2egvnoXYAOxpFuOvuf3xXqG5ew3Hlt4ixIEbS3Lm4RZSZuU3qQ?=
 =?us-ascii?Q?70oEqTSvWN/qdCFxNlWpPlNJapBljqSCyp4Ye+Hp3jHDdaMLBQq9/bjJU9rS?=
 =?us-ascii?Q?G+EMTXfUZiDuJ9rYe+aBbAklZpe8fT+hDG/Zt5qPOSpa8cFqYfFAepG27dLT?=
 =?us-ascii?Q?Ygf9D8ChfSEKsi3/sQoP2gTzyNM46vSyfsEQcl9/beBcEy0G/pf+Etpla1l9?=
 =?us-ascii?Q?HwKYpLmbJpusSMAhP0MoSQt+IhyHaxvCo7aZ4NvqvyUtaCOBem3qn55ONfp6?=
 =?us-ascii?Q?N8CpAgRf3AKupyl0trrjSMMY7B2NcIfOiieQC03ZtIS4F5MFhAEUsLenMyAS?=
 =?us-ascii?Q?3tmitXxdMQPCsCG5H2+ajTjiwAGMIQGB+XqUdCSPCarCIbutXcmz63MvHcus?=
 =?us-ascii?Q?0XaWX8ODtSJO+3V4LDB1Xb5ksY1qZH946j+EdT3j29ibZopVCDcQe9uZKkjm?=
 =?us-ascii?Q?KbbNUuglPDPms2xaCEyrElhVBJFI6aBBNW6mInWGjF0=3D?=
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: DM5PR12MB2406.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 34b48ea0-d097-4110-727a-08d8b54b398d
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Jan 2021 09:36:36.5151 (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: VKvCDB9pgityB442gM73FbAoMjMDAT2cfCqZeV/eegVLu3ghxGqHQqek+GiAcUBUOiHbw4Wwp40ngSZM8Eb55w==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1850
X-OriginatorOrg: Nvidia.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1;
 t=1610271402; bh=tvkoHrwtKVV/XvsIovZWyFi1wYPB3jOLUldHWQa4aHI=;
 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=ONegE3rQxklnRs6fq/bvHus2oNFVtUfn3FlgnvLeAheQ2FMbaagXWWh+wmDgzF7Up
 Ezkrlf8Bu4+AYsZPuXxVzD2AEQxkWhWjELuhVLKbyfFnTKmRhMl0asN8JP9JPdDV/d
 j4W2Xu40X8nmABHqGTcViRNOogvNRRV2TjLLJuiNCUjH/mIiELXjA5eRAr917YB906
 hWC+Zb8LTV5YxAW2u6ERKnzOWcUariP49rBq0WnMZmguk6TGSnaVC4JEvPAH38Dfr7
 wNPxN+fuJANyh5UP8mWJTaj9rldNbYQTEmSVgWZMLPF4r7ifwXPcqLt4yg458NSckW
 Yq5mGfqZLYvyw==
Subject: Re: [dpdk-dev] [PATCH] 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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

Correct, Ori. We'll soon send the testpmd part and pmd draft.

Regards,
Asaf Penso

>-----Original Message-----
>From: dev <dev-bounces@dpdk.org> On Behalf Of Ori Kam
>Sent: Sunday, January 10, 2021 10:01 AM
>To: Alexander Kozyrev <akozyrev@nvidia.com>; dev@dpdk.org
>Cc: Slava Ovsiienko <viacheslavo@nvidia.com>; NBU-Contact-Thomas
>Monjalon <thomas@monjalon.net>; ferruh.yigit@intel.com;
>andrew.rybchenko@oktetlabs.ru
>Subject: Re: [dpdk-dev] [PATCH] ethdev: introduce generic copy rte flow
>action
>
>Hi Alexander,
>
>I guess that the test-pmd part will be available later right?
>
>> -----Original Message-----
>> From: Alexander Kozyrev <akozyrev@nvidia.com>
>> Sent: Friday, January 8, 2021 8:33 AM
>> Subject: [PATCH] ethdev: introduce generic copy rte flow action
>>
>> Implement a generic copy flow API to allow copying of an arbitrary
>> header field (as well as mark, metadata or tag) to another item.
>>
>> 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 or directly copied from other packet field.
>>
>> The number of bits to copy as well as the offset to start from can be
>> specified to allow a partial copy or copy into an arbitrary place in a
>> packet for greater flexibility.
>>
>
>Since the question why you are using enum and not just offset from the sta=
rt
>of the packet, was discussed and raised by number of people it will be bes=
t if
>it will appear in the commit log, at least the advantages to this
>implementation.
>
>> RFC:
>>
>https://nam11.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fpatch
>> es.d
>pdk.org%2Fpatch%2F85384%2F&amp;data=3D04%7C01%7Corika%40nvidia.com
>%
>> 7Cd04c2e49c3a840994da408d8b39f3304%7C43083d15727340c1b7db39efd9cc
>>
>c17a%7C0%7C0%7C637456843629116269%7CUnknown%7CTWFpbGZsb3d8eyJ
>>
>WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7
>C
>>
>1000&amp;sdata=3D85096rASBtzbjU42pV6sPkl3nVt5HlR6%2BL9nxI3qgFA%3D&a
>> mp;reserved=3D0
>>
>> Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
>> ---
>>  doc/guides/prog_guide/rte_flow.rst | 35 ++++++++++++++++++
>>  lib/librte_ethdev/rte_flow.c       |  1 +
>>  lib/librte_ethdev/rte_flow.h       | 59
>++++++++++++++++++++++++++++++
>>  3 files changed, 95 insertions(+)
>>
>> diff --git a/doc/guides/prog_guide/rte_flow.rst
>> b/doc/guides/prog_guide/rte_flow.rst
>> index 86b3444803..b737ff9dad 100644
>> --- a/doc/guides/prog_guide/rte_flow.rst
>> +++ b/doc/guides/prog_guide/rte_flow.rst
>> @@ -2766,6 +2766,41 @@ The behaviour of the shared action defined by
>> ``action`` argument of type
>>     | no properties |
>>     +---------------+
>>
>> +Action: ``COPY_ITEM``
>> +^^^^^^^^^^^^^^^^^^^^^
>> +
>> +Copy ``width`` bits from ``src`` item to ``dst`` item.
>> +
>> +An arbitrary header field (as well as mark, metadata or tag values)
>> +can be used as both source and destination items as set by ``item``.
>> +
>
>For tag I think you should also use the index right?
>
>> +Inner packet header fields can be accessed using the ``index`` and it
>> +is possible to start the copy from the ``offset`` bits in an item.
>
>Please specify  what means index 0 /1 ... 0 is outer most? Inner most?
>You can look at the RSS level for reference.
>I think it will be best to use the same values.
>
>What happens if we want to copy between different sizes?
>for example copy IPV6 src to number of tags? I assume we will be using off=
set
>and split the copy command to number of actions right?
>
>> +
>> +.. _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
>+
>> +   | ``item``      | ID of a packet field/mark/metadata/tag   |
>> +   | ``index``     | index of outer/inner header or tag array |
>> +   | ``offset``    | number of bits to skip during the copy   |
>> +   +---------------+------------------------------------------+
>> +
>>  Negative types
>>  ~~~~~~~~~~~~~~
>>
>> 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..0540c861fb 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,
>>  };
>>
>>  /**
>> @@ -2791,6 +2801,55 @@ struct rte_flow_action_set_dscp {
>>   */
>>  struct rte_flow_shared_action;
>>
>> +enum rte_flow_item_id {
>> +	RTE_FLOW_ITEM_NONE =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,
>> +};
>
>I don't think this name is good since it not rte_flow_item this is just in=
ternal
>enumeration for this action.
>
>> +
>> +struct rte_flow_action_copy_data {
>> +	enum rte_flow_item_id item;
>> +	uint32_t index;
>> +	uint32_t offset;
>
>Why use 32 bits? Since this copy only one register with max len of 32 bit.
>The max offset can 31? Same for the index.
>
>> +};
>> +
>> +/**
>> + * 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 arbituary 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;
>
>Why use 32 bit register?
>
>> +};
>> +
>>  /* Mbuf dynamic field offset for metadata. */  extern int32_t
>> rte_flow_dynf_metadata_offs;
>>
>> --
>> 2.24.1
>
>Best,
>Ori