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 7A538A0A04; Fri, 15 Jan 2021 19:03:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01323141203; Fri, 15 Jan 2021 19:03:41 +0100 (CET) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by mails.dpdk.org (Postfix) with ESMTP id 97F8C1411FD for ; Fri, 15 Jan 2021 19:03:39 +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 10:03:38 -0800 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 15 Jan 2021 18:03:37 +0000 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) 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 18:03:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N9/6cSS6OACuq6dHTgoHRQZ8vy+4Hz8fkb7vPwcOyl2yzAdjXNTI5XsST/wV4FBtvQomp6WZnLCO5wi15/v8BPWgSCWIs9ZlgVT8TfSgS8UM4k3T0QUmgkHz5yETyobjJH+dJi7NPmMDdCKgy2B5f/kA2MU3/c/KzGLuN3IH7DhOa+am4ppApb4DOIf/UJx6CiR06upfE//0sMw+EZ0ikz0u5d0nrmKez62E8nNxV/45OkAKBx2KozGoBwhAcRiIimsMfSr7PTXhW6KMc/cf5MlCDb2DSPSDgj+g/AzUHk3aPeqv7xUyBStCeFzRWjSTF3XbhmE3e7PIX12ZCpCkwQ== 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=S0KBSrBzUD83ZciWqMxUYxEUyP2exLZLoJwz6CgtX9E=; b=bS5lJGzPM5WWt747HM1krnwjBnVOp9s8s8vuxQrLqvTDqWpyxl9OBmjlVEDLrGxxjYjLuo6jOBBw/8ILV8xHsR/DIb6LRIfxamllbcxaOLBdPHj2ooaf4FPV8v+AapgO1/7we6AUNnWDXSiBIdEghPqQ2Y5pp7dAHZCHWTfWeRjyQd64OjH4SmEtUtyQK40JYukMRzFR506cBWyIhYhdMk24sBrgbGnvP3vaFnU3Zx2QpAq3+FaNzvbhJQtugcl3Ifeakm/UWmbOj4Unmt8TA0Gmhzd7h8CQqnPmBvmgCN+Y+4gAG7M0DQHVuzkMfyXQ/kdZaPFUkJnldURBxv9oEQ== 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 DM5PR12MB1772.namprd12.prod.outlook.com (2603:10b6:3:107::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.12; Fri, 15 Jan 2021 18:03:36 +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; Fri, 15 Jan 2021 18:03:35 +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" , "jerinjacobk@gmail.com" Thread-Topic: [PATCH v5 1/2] ethdev: introduce generic modify rte flow action Thread-Index: AQHW61UaLzBZ3/o8106T4OjNtWXF6qoo+Vfw Date: Fri, 15 Jan 2021 18:03:34 +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: <20210115154246.8770-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: 23c60216-a934-420e-3fa8-08d8b97fe07e x-ms-traffictypediagnostic: DM5PR12MB1772: 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: 0MbU+FFh51Dpbvwpv/SIKer/GQn2pkRl+zn8h5BtaKaqa5ei6/Xqv7VUVWkuwtEqG9+ub455JAH2ZfwgB3IkSmG6zZLD5rqB0kQAR0sUQPuAGlxpI3aHxdbUuT296VYVlL7FihUUJAToX0VYdAXdAcg/OOirAifu+3D6Ab94j/cs17f8Uh0BTVgR57guLkRxKng6nATfCodrHgYxbIW3t7D8mvF10ACKkpeTcalCpUrk5FNUWdYgcFdotiN1iQfC2kBLFY7J9FgQJFTf6RhHg3O2iaqewAKC1NDVGN3dB7vR8nXyYkTtu+ofstoSN4fuwoiXxjIrOyKg0dfDj/5nse4HihbIW7KYvdSkYY9znZEzCJ8jK28KycCtAqB/g9c3P89hqswc9/C8TeC4eVlWSq6vqmWjEHukPx94fv7AWcJj9l5gFb8a23ksuv+VR6m2 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)(39860400002)(376002)(396003)(136003)(346002)(366004)(53546011)(52536014)(55016002)(2906002)(66476007)(9686003)(54906003)(4326008)(5660300002)(6506007)(316002)(7696005)(478600001)(66446008)(26005)(66946007)(76116006)(33656002)(64756008)(83380400001)(71200400001)(186003)(86362001)(110136005)(8676002)(8936002)(66556008)(41533002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?blraTdHEu7bfB/MvWwBKjjj5Zn0B6oLxP/k9fgpUUNkt6o5+kRUftW+2zgv+?= =?us-ascii?Q?IGNbiuICO2NDawuJWmzpsfRV0LVz/6fJ2GN7/81z3d0Fu3OZ28bi7UvvQBAM?= =?us-ascii?Q?5ea197Z0kVl2h0pcgpGIb6IvT7IxGifSXA+6j3sl0Mdm/EDZQmB9+yoRj046?= =?us-ascii?Q?Ilq4HxjMA8LdOMfGhlw44CaNWwDHLE+2mrqy2gabvYc7hIj77MCQylXBqx6n?= =?us-ascii?Q?JRlNfYTWux2JPJHpe+irEPfFfOTBkz6KhV3blKR5XS1SqRlaHHtX22qWIa4P?= =?us-ascii?Q?RnEjkEzTPDyy3HPRmXx46vZo+C+IbAsY4OuYzLOsv3GFJEUybNzF3H7XwfCZ?= =?us-ascii?Q?Xifizt1tgwxNIfELk2kVBoGyufjGn56mESGC8lWK9gfK5IA3xet2hEf2oy/x?= =?us-ascii?Q?LolLV1JPIzHzm4Iv27rw0mYN1TYt0yZg5BOn1l8iK+Sb6ZleuOilsJPoh795?= =?us-ascii?Q?6qAOMqMWVcRvap4h+ZEbQVIQ5grpkZ4+Mis18yi5LUH80Vhj2VYxW6l/vtc7?= =?us-ascii?Q?GFPZF3quRC0F7g7qEir1gBQuvo9HRhrJ5CQtpMu4k0Ddqp4npEBWqGveef1q?= =?us-ascii?Q?nGFqR5gVDlhTDOdPWv/uK8yIvZjQT2O4wUAr0KotoqhnGfl6/ELNCJzEAAQe?= =?us-ascii?Q?SE6GvYKbSazIyhYt3kSoxaagTqMSEMPW12PQs3hkwbfTQ48Rna1U71tI+lFC?= =?us-ascii?Q?XHbeVzegf6YvbPABo5WjyDDVqjZlYGUkknwj5sJImP3Sr8P4gXSF58hmtSZk?= =?us-ascii?Q?pJomAJEWAn8uyWJpa0c2+CLlxxrKAhnZnTziQfEo5k/NiRFF482DwfMEJIUx?= =?us-ascii?Q?qfCCND3RZlyyTyzP38xaDtwOixWYd14r44fXCZESyczmxZvreaLoFdFgouIu?= =?us-ascii?Q?ZByL+z9BFqFTz7S2Zr/B74f8zZHlz2HeDctd4msPtbZ9X3H972Awexip3Y+H?= =?us-ascii?Q?lmlSB1ZjFPbN7AdO42iA1iZFsKCY/61IzF2ilFx9F7U=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: DM6PR12MB4987.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23c60216-a934-420e-3fa8-08d8b97fe07e X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2021 18:03:34.5254 (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: vv0+ZbC/bg18Wi56NfKvIs9rippY9hXE8Sg/pK8Sk4x1Ut69RS6IL1iu+evkYOhNcTcgqnjtFPezEmCeAtfhqQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1772 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1610733818; bh=S0KBSrBzUD83ZciWqMxUYxEUyP2exLZLoJwz6CgtX9E=; 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=ayhykOmHQO1LnozRhu6ZRjZlkH39O4OOobHcnxgw+Lv3s17zSCFNAgGAnLXV/keZS p4qAse33X5o6umhtrOBvIthnW61PB4ukB89jOH1mvPFgbJ37ue0imE785S8mLBORAI qkBsb/t32f/QLJd2ymvaSIiJlMRxMYBHrW75EXvNhpTiPfQXv0VaBxUU9AaG0V6L9R tiHPVG8Xov2twqC+w6WwV5ZGsLEksHybc6W+W2px273JGNuo3D4xb8+3M8vRcix3vp 8f6ySWTgB8AmYQQFqSX9Wyw1Vg8VUte9t9FbKpNZuLH/5iqkaz/6fQ7yQ871lGXki0 vbdarGLQyK1AQ== 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" Hi Alexander, Small inline, but I leave it to you if you want to change it. > -----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 >=20 > 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. >=20 > 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. > [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 think copy or set will be better. If you change it feel free to add my ack. > +/** > + * @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; >=20 > -- > 2.24.1 Acked-by: Ori Kam Best, Ori