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 09394A0A04; Fri, 15 Jan 2021 16:33:18 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7224A14113F; Fri, 15 Jan 2021 16:33:18 +0100 (CET) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by mails.dpdk.org (Postfix) with ESMTP id E7D4A14113E for ; Fri, 15 Jan 2021 16:33:16 +0100 (CET) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Fri, 15 Jan 2021 07:33:15 -0800 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 15 Jan 2021 15:33:13 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 15 Jan 2021 15:33:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ND3RVk8WlBzf0b49rDTksBcycDN+1zc14zxtCnMcmb483YAQ7YndRlV0FARzv/IzFOAVdD+RZ1TU+QZFme54gD2IfRswX7p5MC4M3rAFa7z6WLfRLNDrL0niejluYy7OTyhYHtqJ/TcedZvUS2A84btuqCHKC+ztMtO8U4Mx+taCaJ0HPN/M2/hFbL1ldeuyc356tHwlZojw0ynGd5iDUo5VSbcOLXxrce5Anfloq3nU3nDZ96sOsU/SxQ0EAgG07cDV5lHK9r7sN2YvZ/f4pl9LnHOAhJzNZAsWMq33DJjQMUwfQVzgHGpsVgR9rgkubYlqcnCX1xbX84LA5UgWPQ== 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=xSHo9UoeSr6wUAekJUNvi8yalirrIdH4W8KoplhySLw=; b=Ccfn4IBsS+joBX/1jzE1e1Z9H5d4UZ6KEroUM6ozxuNiQfslJAtEFgr2ivGDnmHbJsFbCTbr/k9wrpALtTO/z/L8HVmMWZzKpuCCIKrOyh6pEXWZGFYfB87zYiUUMQ1rSy2St2rQPzh+/CbyhaI98WhMRvi7p5/pi7LXVA42RT7Rw0hgFmE37v6+za9IWJ1wDHoWm4cdo4DTDe8Qb0+fHhRd6FZC2g/XEO1KG45p/RZkrKkoOtwkgruHRqq3fua8SmJA2/z6oTa0YRzeJGqq+xSP+6k8uKsRegvykgT/98cGvqqk/ZfXEuM9jhG2fWDblBl9UImPSpD7e43zquTFTQ== 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 BN7PR12MB2707.namprd12.prod.outlook.com (2603:10b6:408:2f::29) by BN6PR1201MB0116.namprd12.prod.outlook.com (2603:10b6:405:56::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Fri, 15 Jan 2021 15:33:12 +0000 Received: from BN7PR12MB2707.namprd12.prod.outlook.com ([fe80::c44c:1e37:b3f4:e968]) by BN7PR12MB2707.namprd12.prod.outlook.com ([fe80::c44c:1e37:b3f4:e968%6]) with mapi id 15.20.3742.012; Fri, 15 Jan 2021 15:33:11 +0000 From: Alexander Kozyrev To: Jerin Jacob , Ori Kam CC: Cristian Dumitrescu , "aboyer@pensando.io" , dpdk-dev , Slava Ovsiienko , NBU-Contact-Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko Thread-Topic: [dpdk-dev] [PATCH] ethdev: introduce generic copy rte flow action Thread-Index: AQHW5YgULjh0/TQQGk6qxo7yLUDM0aonL/GAgAAReACAAYEYAIAAGWAA Date: Fri, 15 Jan 2021 15:33:11 +0000 Message-ID: References: <20210108063234.7679-1-akozyrev@nvidia.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [2607:fea8:e380:d8e0:5e4:afb7:251b:4e84] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0b7e3ac1-819f-4379-bdf7-08d8b96ade54 x-ms-traffictypediagnostic: BN6PR1201MB0116: 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:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Xzz2G/2i05WW829gWqFKLORSIikoabrtsMLFlacxrfmudhxB/rhTQgGFMotvtK8o9CuOpWW82c4ZmKdQmJdWBhsUE4ZXdgTMHZTdSu+ziUv4ZY7UJ8YdQY9Fi44uEo8Jjsvt7wUy9zlnyWaBGlfLP33uTqiXk/JJd086q004k5ZTCMkVzTQCYef3djxh8ITRKnO0vj/iG85hh8GS4dPiLCQYxL0y1ln+bHhS3aUMDkfTDWF2SV/7pTEbXXxEa1MnNkOR9j44vMs62UAs/4/pH2xjrUnrRlsbb15Lipkt/hhjtb/bvFqEtWcEBF/6gFgKlhygTnkhCvA2B/LQL2Nsq7Th3VidJ9eY12Q10i6EPVSUW01SJWTbFLy8XUvvPthB0qR2TqGm1iiW3NYJm5srIV576DbTgZXUYTlgCiO16l4bSDH6z28XfnSzmGySFM92hmEUJg+ad11w8Coju4vTI8sieBDS7t1wqdzZv+NEXuWuMEqjBKDXpVdLmpdX+pjn+aNyVNvL8GZYcaKvRHO4TJI4KvMW+Oe88ab9yQ0FPtLHkSmEtW83Z5kHmDdvCDImtoaryjU35esDvDstdu5YY3mF6bWBTuJEb01px5qMrDzb0F+O86/nXXPU4Z1865U3oj3Kkphqcb9bM4maB4ZLzQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN7PR12MB2707.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(136003)(376002)(346002)(39860400002)(9686003)(55016002)(33656002)(86362001)(45080400002)(66556008)(76116006)(64756008)(6636002)(66946007)(66476007)(66446008)(83380400001)(6506007)(316002)(71200400001)(53546011)(7696005)(2906002)(478600001)(8676002)(966005)(186003)(4326008)(8936002)(54906003)(5660300002)(52536014)(110136005)(41533002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?UNW+brd+oyAqkolfFz1NdOKHwMJ5MCpXq0dyTtMje6sExUq0QC+a5Co5lrJn?= =?us-ascii?Q?z7U0y/EpZ2egaOqOqWcEWYA2mflZSD7ncmya3EQ2+Xpa06b3za4y3E5rp6/i?= =?us-ascii?Q?tyxCDs/iErb2YJ5yHVWVMAZ3jbvvtKnoSVEnVHQD4hO4651d3UcKODgOwEXu?= =?us-ascii?Q?84zKpOVf7/TZQi2FfYqCun9QcD7xrTln3Ryt3f0N30pznOyfp8i0cY9iNmmI?= =?us-ascii?Q?HusVHi2rzvm4pkm4Eji0iikIwR42kcRcG8z7/4nZbkKHesrsxzT8icHWDCqd?= =?us-ascii?Q?+0+o13WD7OivpT+o0eGSw98wP4y8rv5uQXVsL7Qb/RcVuJF0LqXn0BsypIId?= =?us-ascii?Q?3FdevaD59qWZiIZWXS0vZkCHaVWcRyyB/omA3YD1VtXJARQThP1M+gTifCVe?= =?us-ascii?Q?sM3Vdl5hFAJPDrxDevWVakeCSeukQq3sOGAzsQhnZ8+BOj+0H/dnYyoMNlHn?= =?us-ascii?Q?w6uHzJe7R2dggCsI9LGx/EbweGNqGP0sgEOzTAlbIeCUMHll55gtMhSo+lxj?= =?us-ascii?Q?jFBFT6dtFQFbYFVrieSh7rthckGvu6o+jejfGIMyzou6uQlxfqNn28yfbghp?= =?us-ascii?Q?4JQ4cNZkv66fx6UFLu273WpDUSwcoWJLQcxGbK841TIPgQy9KGexPFVClU6D?= =?us-ascii?Q?ciU4GB4Dd6H/rd0zke7jbPlaMgerCoU7sWFJrdkjdr0tMcFhwI3plm/GhQ7M?= =?us-ascii?Q?aS3vaGtjRct9ra7Pp7MsENU7a4ES34gvY3uysBqHOqUmnuJ7TqCKWinBnvU8?= =?us-ascii?Q?fdePOnPO9flB4RESvRJRFKrSRLiGkaPKHIhUUBftyI2dMbrhxR6QBgBT1OYv?= =?us-ascii?Q?SjXhq/EMw/rZAik/2oBFM1ymlySSspoS1OgO9VOtjrU301qaKV96ObMOkSc2?= =?us-ascii?Q?WobKFH8oecqWUKtBKJFscybSoCAyqXq+39opOxIsN0eKkHj2aDpdbz2qYlGV?= =?us-ascii?Q?u7hV8lyIzU2otg5yKOwu7f0wYkbOX+ULAu2Y+bp/4iXG30XgXcAc7oGof1Z0?= =?us-ascii?Q?TWziFHMEmF/OtyjNrbLuKBtM9aMvdwNT22Zvv8HXveAMAjA=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: BN7PR12MB2707.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0b7e3ac1-819f-4379-bdf7-08d8b96ade54 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2021 15:33:11.8094 (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: 3Koc6aNeRWrrE+lZMLDmnD0Ncv2P25zkv8OcEoiBaABwo/5YgDQpEaDvME1hHrwHvBHFOSdL9DcdFFqg77HbLw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1201MB0116 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1610724796; bh=xSHo9UoeSr6wUAekJUNvi8yalirrIdH4W8KoplhySLw=; 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=I4+mRxauRcplNxUxlNUxHowSkLtDtNwz+ovdSnzRASHmKogcGtVr6bmn5U+N6RgC9 dz65WsCnouHJOST27XUM/yOlFNDQoPI08Xcu+vdFWz3l5oEV6wu939jvcwjlZi/dw/ ljWp1OtiAAqMYIrO6j7D4UFOXQOfDG1cfH+276wZVZIaRhrStiBh3BrheLIBBg/xhR BbNvwcEhOZ2DRQ+GcOeyO8WxvB7vtmVn8PmAhOSoyuxjr285GXDEsyfS1YGaRBxNGj qI4IZuFvoIVLSZUH0pVsUBU0FWmqa6oP81OO0PSlS8cvchXzBR5+OC4U6NedUrEwMx 3zFhy+x9ycQPg== 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > From: Jerin Jacob on Friday, January 15, 2021 9:= 01 > Subject: Re: [dpdk-dev] [PATCH] ethdev: introduce generic copy rte flow > action >=20 > On Thu, Jan 14, 2021 at 8:32 PM Ori Kam wrote: > > > > Hi Jerin, > > > > > -----Original Message----- > > > From: Jerin Jacob > > > Sent: Thursday, January 14, 2021 4:00 PM > > > Subject: Re: [dpdk-dev] [PATCH] ethdev: introduce generic copy rte fl= ow > action > > > > > > On Fri, Jan 8, 2021 at 12:02 PM Alexander Kozyrev > > > > wrote: > > > > > > > > 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. > > > > > > > > RFC: > > > > https://nam11.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fpatch > es.d > > > > pdk.org%2Fpatch%2F85384%2F&data=3D04%7C01%7Corika%40nvidia.com > % > > > > 7C62ab41b9ed5948d056c308d8b894af02%7C43083d15727340c1b7db39efd9cc > > > > c17a%7C0%7C0%7C637462296023413253%7CUnknown%7CTWFpbGZsb3d8ey > J > > > > WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D% > 7C > > > > 1000&sdata=3DovpEss3%2B7TgZRYFiDkrvuMFW52747Gno5oOIeDLwrBQ% > 3D > > > &reserved=3D0 > > > > > > > > Signed-off-by: Alexander Kozyrev > > > > --- > > > > > > > > > > > +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`= `. > > > > + > > > > +Inner packet header fields can be accessed using the ``index`` and > > > > +it is possible to start the copy from the ``offset`` bits in an it= em. > > > > + > > > > +.. _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 | > > > > > > > > > > > > Overall it is a good improvement. > > > > > > I think, if we add transform "op" here then it can be more generic. I= n > > > other words, A generic packet transform and copy operation is just on= e > > > of the operations. > > > ie.. making it as rte_flow_action_xform_item and introduce COPY, ADD, > > > SUB, etc transform along with existing rte_flow_action_copy_item > > > fields. > > > > > > It may useful for expressing P4 packet transforms to rte_flow. > > > > > > The current generation of Marvell HW does not have COPY transform so = I > > > am leaving suggestions to vendors with this HW capablity. > > > > > > > > > > +1 > > Lest have dst, src, width, op members, > > and change the action name to rte_flow_action_modify_field() > > > > also lest add new field name immediate so the copy can be used as set. > > (copy of an immediate value is a set) > > > > Possible op =3D copy / add / sub >=20 > +1 Thank you, Jerin, for a great idea. I'm issuing a v4 patch with generic mod= ify_field design.=20 >=20 > > > > > > + +---------------+-------------------------+ > > > > > > > > > > > > > > > > + > > > > +.. _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 | > > > > + +---------------+------------------------------------------+ > > > > +