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 46F6DA09E4; Sun, 17 Jan 2021 10:23:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C00BC140D36; Sun, 17 Jan 2021 10:23:38 +0100 (CET) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by mails.dpdk.org (Postfix) with ESMTP id 8391E140D35 for ; Sun, 17 Jan 2021 10:23:37 +0100 (CET) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sun, 17 Jan 2021 01:23:36 -0800 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 17 Jan 2021 09:23:32 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.109) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sun, 17 Jan 2021 09:23:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lBRlknKWqccz7NJvbn36hgn6BsM09buvYYTn8rsp81+Xe8AdoqXNzD4hrbkI4bWEBJiroG2Vxy4a5+Ddyeo0FQ8CMbYeLi++esWIUlNEDFavzlkPdE8e3O+yaCv2Gsx/Ncm0fFmOKHoKKUcZ/pVlWtTAJZDA3zWcixG8bTfzyeCrCf8ieeohqYmmid6LBSH9ZoLx1ofrPboiuMfjWnorC1Go2bYzominzyrCvtcAlLH4hvgA9tf1MY8OmNM58dulU2P3Ugj1IjLSLnqwK/oEFCYLxMo7dLzdqTCSNAJui0kQx1BQ/gc0lQc23cr7QH/5pokafZm7mEhV4KsyyscXmw== 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=sUefc7JJo0av81IZ/aQAxgl3u0tpWN4uc9MM3fvqIzI=; b=UNnRgSrDa9hGzVxFKQvghH1maaQMHt0sS0xteRiAE4/HVjxBmMZmz2j2tZNWgIAGs25Z9z+FVCE2DhtNHlTz9iRnrL31RvA70TBhQyDGnYiEsJEncjW2jCOa0hwC7J4WID6w1AyJZNUUJhFsGZA5lLkw8GHaLqw0TRK65kSDl+/15T2uDt0clvHtd64/qqOT56Y7YKBKIDuFgEOfwSXTnq/odw7wEDbEk6PL5RS/VGjj3FJA73PdOwToOxxO92k6xIfdLfTtiY9njwfNdhRARg2u7MTGV5OhTxpmRird28XttE1eDktJDJT4dKnB6qYictiVmGFa7QDQL/cBuelDFQ== 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 DM6PR12MB3753.namprd12.prod.outlook.com (2603:10b6:5:1c7::18) by DM6PR12MB3612.namprd12.prod.outlook.com (2603:10b6:5:11b::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.9; Sun, 17 Jan 2021 09:23:30 +0000 Received: from DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::e4a9:f9a1:d873:d07a]) by DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::e4a9:f9a1:d873:d07a%5]) with mapi id 15.20.3763.014; Sun, 17 Jan 2021 09:23:30 +0000 From: Slava Ovsiienko To: Ori Kam , Alexander Kozyrev , "dev@dpdk.org" CC: NBU-Contact-Thomas Monjalon , "ferruh.yigit@intel.com" , "andrew.rybchenko@oktetlabs.ru" , "jerinjacobk@gmail.com" Thread-Topic: [PATCH v5 1/2] ethdev: introduce generic modify rte flow action Thread-Index: AQHW61Ua51AwU6wFBEuPYUxU5ourQ6oo+tAAgAKShuA= Date: Sun, 17 Jan 2021 09:23:30 +0000 Message-ID: References: <20210113170751.13044-1-akozyrev@nvidia.com> <20210115154246.8770-1-akozyrev@nvidia.com> <20210115154246.8770-2-akozyrev@nvidia.com> In-Reply-To: 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: [188.163.75.192] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 878e4f10-61a5-46d3-21ca-08d8bac98e2d x-ms-traffictypediagnostic: DM6PR12MB3612: 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:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bbt6FsKNR0w+mX3XFTHFMK7q+I4oG+oJ1UwoV4+NSFrLnFXsX0ZX59pjmoQxluPqHe+ckAoWuVTXVT/ifgPo3Smsx2AbEZK/em01voQ9Bhlzd6tcYXRGHh1oBKzhGwXgxaNEqqDI/oCzyFjP6E04+h3t+x2/FqiDfNiBYUiC+lpgp/Zq4KqVWjHoIV2861dVEWTPx0jG+vfkiFn44R9ayR0BQp2VTD5LF06/YlQVrT/1SFbyaTp1ogDM8//p8U4Z7n3DQlR18pKMKSNqh1eqYt6v2YBllTjAl/Q9AsHjZPGab+/kSLI6+3Ovb+HYcdEb4Xa8SgT+0VyrZJd0n4fsdPU+hYY2QjWDWCZZOiC6wrXdShJqpR6je4lFeSWKTSHxuX+0PrhbIOIkcpJHQyfkSUDLvyY2HqZf/tff9p8B0OMfcG2lj28J7luz74W0AYp6 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB3753.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39850400004)(136003)(346002)(366004)(396003)(376002)(7696005)(33656002)(8936002)(86362001)(9686003)(71200400001)(316002)(83380400001)(110136005)(54906003)(5660300002)(478600001)(66446008)(26005)(55236004)(186003)(52536014)(53546011)(55016002)(64756008)(76116006)(66946007)(66556008)(2906002)(66476007)(4326008)(6506007)(8676002)(41533002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?8Kf2QxKKt99JtkTFa+etwDPOEcAZcslK/HJd3JElFBCkV5VTeFJaxrr9Fo4B?= =?us-ascii?Q?R6yd5jLfv/IVzC7qaPUzvPKGPJiBTLHeDHGwCpzmOaAoR1zHcODImGD484vz?= =?us-ascii?Q?0DDPifoFnIO2BaNezGmrVlkm5DOSPnZSTc/32I/0tF0mjb/+Ry3t33nZc5bx?= =?us-ascii?Q?a0qbt4oIab0ZPBE486C9G3YEpRVQONe5i2yRmNKFmx8ZXohU+orZSDIzDsVG?= =?us-ascii?Q?Lxym35I1wO1haVwVOYEf5uQ+61u/9LBoA93PVoYH7RU400mt0h9I1L0foHsO?= =?us-ascii?Q?n0owhK6g2zNX/IDJ6iIIA2o9seGU0RNjgfU42htO+G7i78yQj1hJly98GqCj?= =?us-ascii?Q?eqyi1crej7cVUBxRznIoUjulJ5xn2WRvjvwgzR1GFumsRlDWOc6A8DsK/Hrv?= =?us-ascii?Q?ous9dL6MyiF6VHU4MEj/h/P/TLKqXCeBUkihv1eoMrY4vJIFFrnKIjDDHiaU?= =?us-ascii?Q?cZUh58aZm39AsYXnrvqSQF8zFy/mv941ljRBYpkRYryyT+uUHtCteOkeEQDD?= =?us-ascii?Q?e8fya4esffXZ4Xu/nR+m+w2G7rJGqZQ33bppHq8tdingxylR5bIPt68yboUx?= =?us-ascii?Q?R4b0GXc3mncjATs+rE200i5iI6COxrLFwVT7eae0+rtR4upIeWpF7fbDHVI3?= =?us-ascii?Q?mV2bq2ZyiQpTIuS40l2zZmp2H1fEUFrrPcpAShtpz6A13vkdyOGLDD5RWsMa?= =?us-ascii?Q?hhzgB+4R24VIHp6QBkFitFYJ0fyzPgl5vYvR0LQX8ddZg6W2n1Y6jto/PnbH?= =?us-ascii?Q?3mWgUo/yjaktCIf9MukmVMiTsW0Lon8PoqG/IlABrkHcE7btm+idpunL0+/4?= =?us-ascii?Q?219O2p4kmPy+kApBk4W5+AE0OSx41ayYnDrj0Y5Dwg4Wm73yKGBtkACu5Pls?= =?us-ascii?Q?l1uuIx8TeTzgqgUopnke8Jphp94G3jHzZAaOlgViIj7r/MVIROLDK9kjNRZ1?= =?us-ascii?Q?gXWaVOxpj+4we7g4OBcIW0jgU9DjOiXVaqKYwDqRMtg=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: DM6PR12MB3753.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 878e4f10-61a5-46d3-21ca-08d8bac98e2d X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jan 2021 09:23:30.7881 (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: 1o2zxcTBu3OVLiuDboxm4as59XvPN8zSZcJ49rxXrIVAhiAGy5b3lpwmgdg/mu4CeA2ygamY2Dd/Jh1A6UBm9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3612 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1610875416; bh=sUefc7JJo0av81IZ/aQAxgl3u0tpWN4uc9MM3fvqIzI=; 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=CUzh6ofOv0Yp3rFcx/e2+jCfq+HuQ4xaTBqRbHMLQUwphP0NITL5Q0ysZ449Uw2OW bwmW2atGPtj+N+iyHkZI4+TJGTV9D516Hty5ZueBBRw46eNMRv3JvhLWMaMlrNdNhI uJqeJnmNZAqo/xySmhkwMZulUM3qQBhtnJAsCVCcP1Mon2TxG/IVwWd+6kLcGkKBQl aaDOiuGGfdqY9/vCqxa2yPQ7J77VCS3XH+0uPVcy1vkyUDAvHlSrox01dqgZLRs0cU Xq4II1IBdasllX9f5ofvwG7XaWBNsdkiq97J1nob+aDHrZCM+xhDw/Hzb+61hHIv9V va4LS8Yj83fTA== Subject: Re: [dpdk-dev] [PATCH v5 1/2] ethdev: introduce generic modify 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" > -----Original Message----- > From: Ori Kam > Sent: Friday, January 15, 2021 20:04 > To: Alexander Kozyrev ; dev@dpdk.org > Cc: Slava Ovsiienko ; NBU-Contact-Thomas > Monjalon ; ferruh.yigit@intel.com; > andrew.rybchenko@oktetlabs.ru; jerinjacobk@gmail.com > Subject: RE: [PATCH v5 1/2] ethdev: introduce generic modify rte flow act= ion >=20 > Hi Alexander, >=20 > Small inline, but I leave it to you if you want to change it. >=20 > > -----Original Message----- > > From: Alexander Kozyrev > > Sent: Friday, January 15, 2021 5:43 PM > > Subject: [PATCH v5 1/2] ethdev: introduce generic modify rte flow > > action > > > > Implement the generic modify flow API to allow manipulations on an > > arbitrary header field (as well as mark, metadata or tag) using data > > from another field or a user-specified value. > > > > This generic modify 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 packet field/tag/metadata/mark/memory location or directly > > > provided by a user. > > >=20 > [Snip] >=20 > > + > > +enum rte_flow_modify_op { > > + RTE_FLOW_MODIFY_MOV =3D 0, > > + RTE_FLOW_MODIFY_ADD, > > + RTE_FLOW_MODIFY_SUB, > > +}; > > + > I think mov is not the best option, since we the value in src stays I th= ink copy > or set will be better. > If you change it feel free to add my ack. MOV is quite common usage (in Assembly) to specify exactly the operation we are going to introduce. And we are going to assign the destination both from field and some immedia= te value provided. So, MOV in my opinion would be more relevant than COPY. With best regards, Slava >=20 > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this structure may change without prior notice > > + * > > + * RTE_FLOW_ACTION_TYPE_MODIFY_FIELD > > + * > > + * Modifies a destination header field according to the specified > > + * operation. Another packet field can be used as a source as well > > + * as tag, mark, metadata or an immediate value or a pointer to it. > > + * Width is the number of bits used from the source item. > > + */ > > +struct rte_flow_action_modify_field { > > + enum rte_flow_modify_op operation; > > + struct rte_flow_action_modify_data dst; > > + struct rte_flow_action_modify_data src; > > + uint32_t width; > > +}; > > + > > /* Mbuf dynamic field offset for metadata. */ extern int32_t > > rte_flow_dynf_metadata_offs; > > > > -- > > 2.24.1 >=20 > Acked-by: Ori Kam > Best, > Ori