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 B0D14A034F; Mon, 11 Oct 2021 09:19:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C00140E0F; Mon, 11 Oct 2021 09:19:37 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2051.outbound.protection.outlook.com [40.107.92.51]) by mails.dpdk.org (Postfix) with ESMTP id 39C2C40E01 for ; Mon, 11 Oct 2021 09:19:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EyXuG6mYWn86P34rbPt43n+uRbvnwMIlRaAH7jfoqCkIjKhSt+Ra8numImp+LWQW5sfxWswfFnF3LhAhrO19+vqFwBWcG1EjN/a98iRQxc9BrXlSkO4QLIHTuiUSWDaKsi+40SKDnykWjup8atRXMa7WJ1ZET/f86FzVdWQg1xpIabThS1mHsCETE4ae14Ao48n8IpRhLrYzx83OoYYU/jWdgj3KXdZO9LrzCx313MrztNqKC1jnF3z/+7KN56gzZ2z6H91JcZJfnpHi1dYA2BJkgM2Ggp6q5td5J366MDOOSWMJvr39tL7rCvI4J0rWfyTbNvvIgrjebAR2zBiVDA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gTzd6TdPy0fGonc3Qt6ZpnJ2rXUY3D5AY1fY3HtxwBk=; b=NMTyTzQ9c9ACCjHln87tZmw3pWJcAy0569Wc+opheE3rzuohzLnndpGccc3Yn7eM34NHlZdLRH/wvl7nF128KZWvwTn/wMiVtgnogrgMecOKmHjEkrn1KSU5V3cy/V1o+GyJd+9kiMerDVIVNrwida/9iusphoODxiqmtHLdkduKAp13uAuzp0+sXYxVie49e4RdXFEtVQ4ir/0wePCf/oN45U6cjSLPeDL0ipmqSKPAf60zBgZ7ElQVXj9+6rBbmoD9SFOcZ5WcrAPACkoTDXxWZF1FXSbE3FVcGmtmISLaymd5aXaOdQFf6C7W2+8yrMLV4s0J45eGTi6zlzf4pg== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gTzd6TdPy0fGonc3Qt6ZpnJ2rXUY3D5AY1fY3HtxwBk=; b=n+BJmaQLQ8S7EdA98K0uA0qwQjjl+d0A4YgP3iVG20FO3dPavpjQVufUAGXjr8NCHfU/Uke2YnBSuulWe34fdP9VH/sloJAQs70gxbWGfxqY4C5xUUf5vEBKwDaGdES+hIW5NL7WISoFxox2BVOApsMUU/8Q0EDDmrNZ1ldZYK09iSG798DwcoGvOxmdI4txth4hn3GG2dC/NBIzHKQEM2qCTT/gsIvenzUpiO6tNmDGa1IGABjD1C2ovsLOpF2F9m94dTD/C2KRNxMIlNXle5c7tTCi0GZOTdNsBzwMNF6Gvj8KYJ0F+HgxAoPFeAFMXlf/NurrXOMJRTmGWk4jNQ== Received: from DM8PR12MB5400.namprd12.prod.outlook.com (2603:10b6:8:3b::12) by DM4PR12MB5135.namprd12.prod.outlook.com (2603:10b6:5:392::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Mon, 11 Oct 2021 07:19:35 +0000 Received: from DM8PR12MB5400.namprd12.prod.outlook.com ([fe80::d03d:1f75:ca20:6a32]) by DM8PR12MB5400.namprd12.prod.outlook.com ([fe80::d03d:1f75:ca20:6a32%6]) with mapi id 15.20.4587.026; Mon, 11 Oct 2021 07:19:35 +0000 From: Ori Kam To: Slava Ovsiienko , "dev@dpdk.org" CC: Raslan Darawsheh , Matan Azrad , Shahaf Shuler , Gregory Etelson , NBU-Contact-Thomas Monjalon Thread-Topic: [PATCH v2 1/5] ethdev: update modify field flow action Thread-Index: AQHXvjEFSbfx3+uUbEeJYzP5ou+cbqvNY4dg Date: Mon, 11 Oct 2021 07:19:34 +0000 Message-ID: References: <20210910141609.8410-1-viacheslavo@nvidia.com> <20211010234547.1495-1-viacheslavo@nvidia.com> <20211010234547.1495-2-viacheslavo@nvidia.com> In-Reply-To: <20211010234547.1495-2-viacheslavo@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-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3f64682c-e6bf-4def-f5f8-08d98c877a4e x-ms-traffictypediagnostic: DM4PR12MB5135: 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:663; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8rcMXRyjGiqbgPkcT9pfXFh42RAVpD2ISQkGnyrZ7m2yXLAS/Ju1bl1PfCYVuIXiGyfi9IISi+OxUkW6DAFXcubZKDJI5bYeC5uhL+W9Wk1RL04hNzY9Id6o/rfCFIKzbO2SD6pnBwTYjUMw6ovDUyqWmT/XIiMvvUUtr+DZ+m0BARkIQihR6tZfY4IMkoEYGB1PyvZ9G8LiiXk5m/ILnFcqgzLaaiyLXGU2x6iqreLhZJxCnh4v/EfoMId45l9zJolmL47uVs7l5hdshjRpdaQjkzJOccFo9N8700o6/qzoJFCQDsoCovTl4i/GIyygqLjV2HPsNK+NDSN7yGpruOhs8kyYu6dSx/0PUqx6CiVPi796v7qXrxROYVFckwKb/sl228YKoGTkFI2Qpu62LAAQW9y412RrT1LrZnusiJbkm/qLMN5PfF6IqYdGWWSTnViSUAKTMxF+Aha9mPQO01U+Ev1pQTRBXG3aha6A0R/nRx823MYaGiirBoBV6A6Ci6eYJp+nHo4cMH/zNtDanvKlOYlsKLStruK9jxWM5pRqTznQi7q6A6F2WPtUBx0/Cedb4zQHDAuKzPHI4ql9xEgQCg3FZZnFM8PwhYyacffv4A1FamHFH/l/zsaXu8nC9lN4C4O8M1ygphrP9Dcd1cgQV7CAUHW/3+wse/Fw3/S17NgO6txWuK+fOJiJ1B/KaiGtCcCHjHY8zVY9rRRow2abmZaNB3bXuY4y6xZUtuA= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR12MB5400.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(110136005)(26005)(2906002)(316002)(71200400001)(8676002)(54906003)(38070700005)(5660300002)(15650500001)(186003)(33656002)(38100700002)(122000001)(52536014)(9686003)(55016002)(53546011)(86362001)(83380400001)(4326008)(8936002)(66946007)(76116006)(64756008)(6506007)(7696005)(66446008)(66556008)(508600001)(66476007)(21314003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?LVNcXz/lBeM8qrHcesNrTzg7TQDeGqGTfsbInjvO27G6QbQ3AuuCzbb1a8Qd?= =?us-ascii?Q?v6dOHUTs2+IP85z67TAypP1FfIs6mLP+z470kkvWyBGSa5GVWLJjr7ZII5VY?= =?us-ascii?Q?04dvkzNB8aILQ294icFBy922YcryiM3qYYuw3L/+CO/gHv6ghuWP2B9g2IIy?= =?us-ascii?Q?zuaX5MQ8DZRrlJ6cfkbfrLWRxQRL9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Hq/48Siu9dNqdFVaZtYUNK3+s+0xmwhMf7zOKJDR3v9zN0imUI5wOyQgDm?= =?us-ascii?Q?kqFDaMtiOgoXGYW/fFCK4eJri96rxjot+ootryJup76OHpmSf0rrfDWl2m62?= =?us-ascii?Q?cELbnDXkUkBZUafuyurb7VC5RrdhhMs80QSPaEovXUvOjhJvSu274s3TTuZO?= =?us-ascii?Q?e/JNtCR+5DvsqYVXEMnFVmHVCSR9zyWnubykOOVrmbq646ha5j227hP5wfil?= =?us-ascii?Q?Vr+4D7CAxTJVaBpKDE8d/4Ac?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8PR12MB5400.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3f64682c-e6bf-4def-f5f8-08d98c877a4e X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Oct 2021 07:19:34.9143 (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: lXP3/K8BBVYsURJZZ/nBK/QcTiWFnzljtk/CZXI39kW/9w4pPmixK2Afd3ZONxGq6N5IiwjLqeiYIkHrBNzmIg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5135 Subject: Re: [dpdk-dev] [PATCH v2 1/5] ethdev: update modify field 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 Slava, > -----Original Message----- > From: Slava Ovsiienko > Sent: Monday, October 11, 2021 2:46 AM > Subject: [PATCH v2 1/5] ethdev: update modify field flow action >=20 > The generic modify field flow action introduced in [1] has some issues re= lated to the immediate source > operand: >=20 > - immediate source can be presented either as an unsigned > 64-bit integer or pointer to data pattern in memory. > There was no explicit pointer field defined in the union. >=20 > - the byte ordering for 64-bit integer was not specified. > Many fields have shorter lengths and byte ordering > is crucial. >=20 > - how the bit offset is applied to the immediate source > field was not defined and documented. >=20 > - 64-bit integer size is not enough to provide IPv6 > addresses. >=20 > In order to cover the issues and exclude any ambiguities the following is= done: >=20 > - introduce the explicit pointer field > in rte_flow_action_modify_data structure >=20 > - replace the 64-bit unsigned integer with 16-byte array >=20 > - update the modify field flow action documentation >=20 > [1] commit 73b68f4c54a0 ("ethdev: introduce generic modify flow action") >=20 > Signed-off-by: Viacheslav Ovsiienko > --- > doc/guides/prog_guide/rte_flow.rst | 16 ++++++++++++++++ > doc/guides/rel_notes/release_21_11.rst | 9 +++++++++ > lib/ethdev/rte_flow.h | 17 ++++++++++++++--- > 3 files changed, 39 insertions(+), 3 deletions(-) >=20 > diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/r= te_flow.rst > index 2b42d5ec8c..1ceecb399f 100644 > --- a/doc/guides/prog_guide/rte_flow.rst > +++ b/doc/guides/prog_guide/rte_flow.rst > @@ -2835,6 +2835,22 @@ a packet to any other part of it. > ``value`` sets an immediate value to be used as a source or points to a = location of the value in memory. It > is used instead of ``level`` and ``offset`` for ``RTE_FLOW_FIELD_VALUE``= and > ``RTE_FLOW_FIELD_POINTER`` respectively. > +The data in memory should be presented exactly in the same byte order > +and length as in the relevant flow item, i.e. data for field with type > +RTE_FLOW_FIELD_MAC_DST should follow the conventions of dst field in > +rte_flow_item_eth structure, with type RTE_FLOW_FIELD_IPV6_SRC - > +rte_flow_item_ipv6 conventions, and so on. If the field size is large > +than > +16 bytes the pattern can be provided as pointer only. > + > +The bitfield extracted from the memory being applied as second > +operation parameter is defined by action width and by the destination fi= eld offset. > +Application should provide the data in immediate value memory (either > +as buffer or by pointer) exactly as item field without any applied > +explicit offset, and destination packet field (with specified width and > +bit offset) will be replaced by immediate source bits from the same bit > +offset. For example, to replace the third byte of MAC address with > +value 0x85, application should specify destination width as 8, > +destination width as 16, and provide immediate value as sequence of byte= s {xxx, xxx, 0x85, xxx, xxx, xxx}. >=20 I think you have a typo destination width as 16 should be destination offse= t as 16. If fixed you can add my ack to the next version. Best, Ori