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 19051A0C3F; Thu, 15 Apr 2021 17:56:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92B5E1623A7; Thu, 15 Apr 2021 17:56:52 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam08on2046.outbound.protection.outlook.com [40.107.102.46]) by mails.dpdk.org (Postfix) with ESMTP id BE703162397 for ; Thu, 15 Apr 2021 17:56:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a9y5dRI6Ww2Cse2I6T1v6oxzZsZyVtrws2FBdAG3fYcBATUbQ9rxl0O2Wk/TrqPzzBAl33yCvzu1EJyTKiQXfhtW19McoscGkEJEUK9J6uTOwGLapm9y07vyJFGDj8wJdofg5Hs12G4+2JyOP0LrcnhlRQjpSUW2pyTbPOB9m0P4TijxYyvZvwIZ8bdbbnKRGPLNpHKYjjgyHSndIAPlrGq5EJBiyBczdya+0Ac1W7doxT7fzdJRHFl0PewHTn0Mo93148k6oChrn9vNwWJfzO75jNECarJ782LWaw5kzo/7A5kWY7DZLMG16b6qHbyq1CXCksLiEwL+IDV+LQUsYA== 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=nDWss0YBdkeZT0X29UYVclzTLKPKVJumi1Ekm3uIbMA=; b=LRvymWrRahWLaDUdWzVDVQDhx5Z7HgmY9quXeliCitID0r/a45J/c9wSx0DKuO3kPewXcyiCMAH48/5WH+afw8gbezNL95OK+CtlF4G2N6SKvFpjmUDCKV57Kiaarq87MpeWIqL+9GX5D5JtUxyxbdhtoNu0jMCCHwJYWekZmzugeoAIhOFGQgtou1jLChlq9ON8oPFV9xU5LinHvoM8CYOKUcPZi9X8/UfLg5rYYhNvUjRgm6c+hfghWw/b7hVTkkJEA9WdlMycvX4DRaaKnU/XL+5cQtgeAWzTU5mzTb0AwmZ3E8rDn/zQABQuK0S7N35alOyYcYRP56e4IcMHCw== 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=nDWss0YBdkeZT0X29UYVclzTLKPKVJumi1Ekm3uIbMA=; b=H4xRUSwic9HcSiPGENtQt6ocQyGxG+3VCjmaVCHe8cNolcXsimpuKdynPBf1+kREQmX92NcC6nAiHs4kMiDxSDXaAUtWLQKSMK251rCgv/6znpc89On34//qNtQVg9M+S8DD7hGnpNeLBlSQ5MrQAY478NGPW6UxazbM9G3irrw+22w2c96uTbzcqOJS43DGmac5DOZcN8I9BQhOtDkZc5092GMzuCtWPoBSfYwdgFqS6T5IgsByVfWQAeoTgf/09+GXhdlmaP/VCNYQEGb4bunB8nWBUZ085o3DsYm2/bA4oXi1cj7N5SEm/LZ/bXas9KzNFptbXXRR7xcosZiELg== Received: from DM6PR12MB4987.namprd12.prod.outlook.com (2603:10b6:5:163::31) by DM5PR12MB2469.namprd12.prod.outlook.com (2603:10b6:4:af::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Thu, 15 Apr 2021 15:56:50 +0000 Received: from DM6PR12MB4987.namprd12.prod.outlook.com ([fe80::f5ce:c5a8:6aec:e308]) by DM6PR12MB4987.namprd12.prod.outlook.com ([fe80::f5ce:c5a8:6aec:e308%7]) with mapi id 15.20.4020.022; Thu, 15 Apr 2021 15:56:50 +0000 From: Ori Kam To: Bing Zhao , NBU-Contact-Thomas Monjalon , "ferruh.yigit@intel.com" , "andrew.rybchenko@oktetlabs.ru" , Matan Azrad , Slava Ovsiienko CC: "dev@dpdk.org" , "ajit.khaparde@broadcom.com" , Gregory Etelson , Andrey Vesnovaty Thread-Topic: [PATCH v3 1/1] ethdev: introduce indirect action APIs Thread-Index: AQHXMg9feeUyxzxYskKBaGuEKTCE6Kq1uveg Date: Thu, 15 Apr 2021 15:56:50 +0000 Message-ID: References: <1617940481-125528-1-git-send-email-bingz@nvidia.com> <1618501912-92525-1-git-send-email-bingz@nvidia.com> <1618501912-92525-2-git-send-email-bingz@nvidia.com> In-Reply-To: <1618501912-92525-2-git-send-email-bingz@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: 2d975a1e-8e42-4ed7-7f52-08d9002714d6 x-ms-traffictypediagnostic: DM5PR12MB2469: 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: g0EQ5gS1xaZUND5x+tFEunMj8hPIJMSeyMVBorudZd860xdjqBOlZfdPSthh0oBcp875RJ5qJ7iwcqFn4VFCvx+mtReZNIuOnZosbsHOuHswuOYWaOpKUtg1z5EHd1O2L2qVQQMFvK+QfC7RW0RoSPC5bxL/RthsK9wparm4LVibaeQwpR9ahD72x04DJ1pRanGxFeWWHtuQ3CttuzhE7Z0X5eZKuNEqsU0z4ug5/WnxTW9OnzxsWQvXFZtR7MO/zrx6kkoyrBzTU5seyOQflwoAPCLlxBbDNJK7V1uwaHk5+v0c4CAFtbrfA16yVBCI+vbUHj5lmGP1He03TSJ+ynjlsHYAxMtuP9dLM4ayH0X8Bljnz5GWcCfyTL1AEFyOcDgZboAxbtIm1Evpc4TAy5TADyHy99vqVDyTXVBbZnyEImkka0LjCSoT7cVsjMgnSI3G8vpWcrwRulczte2Vtf59o6kTOrBtGVDIPPQFdlj5D9bXnFL7em+GYdpyFa/HyedpWO1zg3EE6Qkb1MDGpLCrg7dHQZeKSYd/MwM7U43vWgaM3vqrtFN9Mj6J8Yh4MVrMNzja6V7f61JJu6prOkOFr+kkoXWRTXNilI4eQGA= 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)(396003)(376002)(346002)(136003)(366004)(71200400001)(54906003)(2906002)(33656002)(8676002)(110136005)(7696005)(4326008)(52536014)(5660300002)(53546011)(107886003)(316002)(55016002)(9686003)(86362001)(83380400001)(6506007)(66476007)(186003)(66446008)(64756008)(8936002)(122000001)(66556008)(66946007)(6636002)(38100700002)(478600001)(76116006)(26005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Yz675OcNO3ON7qPdasc7eXTzBp7jUjJLIUKhK0xipB+4rFXautUb67R3ncUF?= =?us-ascii?Q?wjIQwMPUm0r2Y22xnlX2w8EbUoFVXX7i/UjrbbWuxjXkl6b6XuwFk7dCsUxP?= =?us-ascii?Q?uKWhAz1fkxrhCfeWKUyk4TOrPT4tvcOEEGsWlxxcgKq5lsh6csuSmX4M1HHv?= =?us-ascii?Q?o30S425dOaTtug1HwB9kVZvUlzic+c1/RbEFYbzHXJqfH51h/nFg/eAAKWAs?= =?us-ascii?Q?lYxpBcKOZH4CXPb8Z+HPgnAMNa7DrSD/312H0pO387i0JGfCxyu9svu40WHt?= =?us-ascii?Q?u9uGqf1etBwMCNZzA/ecQsx/1VkHxQQxWMLAbW2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S51NHd0qdQ4wNZkkieNyU47GvYMu4lZhuGiVkA36EA?= =?us-ascii?Q?NMsvrUFDIdWqc3XVICUsoOBL0JBp2YJwBzykojFH11D+vaK5E127g4glSE98?= =?us-ascii?Q?KPr7qkoH8g2ugq/HCeXVBdzZ?= 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: DM6PR12MB4987.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d975a1e-8e42-4ed7-7f52-08d9002714d6 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2021 15:56:50.0663 (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: gdXO0lZoOz6zxOyTyDXli9ZmOjLSE4uVhxdQ3MXeif++l93Ab2wLfwMp6sAb65A/boletznVmOl5iNbfFCzPtA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB2469 Subject: Re: [dpdk-dev] [PATCH v3 1/1] ethdev: introduce indirect action APIs 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 Bing > -----Original Message----- > From: Bing Zhao > Sent: Thursday, April 15, 2021 6:52 PM > Subject: [PATCH v3 1/1] ethdev: introduce indirect action APIs >=20 > Right now, rte_flow_shared_action_* APIs are used for some shared > actions, like RSS, count. The shared action should be created before > using it inside a flow. These shared actions sometimes are not > really shared but just some indirect actions decoupled from a flow. >=20 > The new functions rte_flow_action_handle_* are added to replace > the current shared functions rte_flow_shared_action_*. >=20 > There are two types of flow actions: > 1. the direct (normal) actions that could be created and stored > within a flow rule. Such action is tied to its flow rule and > cannot be reused. > 2. the indirect action, in the past, named shared_action. It is > created from a direct actioni, like count or rss, and then used > in the flow rules with an object handle. The PMD will take care > of the retrieve from indirect action to the direct action > when it is referenced. >=20 > The indirect action is accessed (update / query) w/o any flow rule, > just via the action object handle. For example, when querying or > resetting a counter, it could be done out of any flow using this > counter, but only the handle of the counter action object is > required. > The indirect action object could be shared by different flows or > used by a single flow, depending on the direct action type and > the real-life requirements. > The handle of an indirect action object is opaque and defined in > each driver and possibly different per direct action type. >=20 > The old name "shared" is improper in a sense and should be replaced. >=20 > Since the APIs are changed from "rte_flow_shared_action*" to the new > "rte_flow_action_handle*", the testpmd application code and command > line interfaces also need to be updated to do the adaption. > The testpmd application user guide is also updated. All the "shared > action" related parts are replaced with "indirect action" to have a > correct explanation. >=20 > The parameter of "update" interface is also changed. A general > pointer will replace the rte_flow_action struct pointer due to the > facts: > 1. Some action may not support fields updating. In the example of a > counter, the only "update" supported should be the reset. So > passing a rte_flow_action struct pointer is meaningless and > there is even no such corresponding action struct. What's more, > if more than one operations should be supported, for some other > action, such pointer parameter may not meet the need. > 2. Some action may need conditional or partial update, the current > parameter will not provide the ability to indicate which part(s) > to update. > For different types of indirect action objects, the pointer could > either be the same of rte_flow_action* struct - in order not to > break the current driver implementation, or some wrapper > structures with bits as masks to indicate which part to be > updated, depending on real needs of the corresponding direct > action. For different direct actions, the structures of indirect > action objects updating will be different. >=20 > All the underlayer PMD callbacks will be moved to these new APIs. >=20 > The RTE_FLOW_ACTION_TYPE_SHARED is kept for now in order not to > break the ABI. All the implementations are changed by using > RTE_FLOW_ACTION_TYPE_INDIRECT. >=20 > Since the APIs are changed from "rte_flow_shared_action*" to the new > "rte_flow_action_handle*" and the "update" interface's 3rd input > parameter is changed to generic pointer, the mlx5 PMD that uses these > APIs needs to do the adaption to the new APIs as well. >=20 > Signed-off-by: Bing Zhao > Acked-by: Andrey Vesnovaty > --- Acked-by: Ori Kam Thanks, Ori