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 D23CDA0524; Mon, 19 Apr 2021 17:05:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A883D4130F; Mon, 19 Apr 2021 17:05:42 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2082.outbound.protection.outlook.com [40.107.92.82]) by mails.dpdk.org (Postfix) with ESMTP id 254EF412E6 for ; Mon, 19 Apr 2021 17:05:41 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MPG0eakBsJJ+PuIH5tx/1Xv7c8b6DxcO88MmS8MVc5fACPkdfEAxw6VrF38kECaaacaY+fKURozQgQ6JVB+MmCG4kLbxqdlEVFUbGXC9AL2vFAf7UI/kiZlO7mUy9YLmLF4Pm7yD5qxaXyXLP5ORnUW39WakLxz68YQOXjdEPpUO0k3JjeLw/fiFjhQYwy4mZxWoKaYpgG9b/IR/0/ivCbF9Z3ZtmQn9U8xTCmYV8a1YhavCl1UAklKVGF+R4AGJhUEFEWkRL0AOjo9AUi0if0FXp5WaZ7+m0bcfq5rePR4M13mNh5TEjmTf2hhg3Qewr0P+UhDGKw12aufLFqH2Cw== 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=0bxB8d6OBfGSButTbNynQlaeE/CA4+O0opnLwODtLHg=; b=iSdqJRiw+O1W8yFILGxWkUv3wuL5CN5jc/00KHgjgRygSVLl0IRzDBq00PUnCt7wqZeZdLQmd+C/vSAzNR90JrP6TPb2LNmUHRVYjJakJvInaZAq5LueETgFG6rE4z9op96LqxzK8AM0mFuQXjxLbdn5dqD6FUDVxmhP+FMsSYQtuV0wSb0FH92judlqZvHrLcCg/YXYfM5yq5QpJkeKO8Abvwpi/X2NRkRUY+fhHGpSPdnOT3wza/JUm6ehbhosfchuk3mI4kHW+p6MuOgs9FVuO+DvkruCbpgypRyxHmdN5xWPg67lrksgV9W8AsjJP8ajvB4v6G+Gomu13t9kOw== 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=0bxB8d6OBfGSButTbNynQlaeE/CA4+O0opnLwODtLHg=; b=ZySvGOkIaWnxrHuBQStyezpjkWsvZSl9dFs5O9zEbAXw9CwwYnXSj4huQIgMzliNPnJUJsKAekahuxhzDEnBprKhv7WKXXxqICtoINA5bmN9qWqIjt1tLMJfC7cz8BRZpxsAcLJX9r7kyFViAv/6gYZWKQOajl5z0fIaW6pMJanBLKuNgPC0azQQyUfxyfX4RnXkVhrSMaSf6K0V6R+KmMhEe+m91rluZTTJGF8wthiGdC4l4T78WbeI1sGt87RGvSA9Fr6r9rrhfZSbBw3tvYt5YWdM8+49ORbxtgKclv/LkEC7CEFI4QKOtA6g6uhnZH3fj0Es0zBco4ZnIKV+Rw== Received: from MN2PR12MB2909.namprd12.prod.outlook.com (2603:10b6:208:103::13) by MN2PR12MB2976.namprd12.prod.outlook.com (2603:10b6:208:c2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Mon, 19 Apr 2021 15:05:34 +0000 Received: from MN2PR12MB2909.namprd12.prod.outlook.com ([fe80::7cbc:e499:e936:7408]) by MN2PR12MB2909.namprd12.prod.outlook.com ([fe80::7cbc:e499:e936:7408%7]) with mapi id 15.20.4042.024; Mon, 19 Apr 2021 15:05:34 +0000 From: Bing Zhao To: NBU-Contact-Thomas Monjalon , Ori Kam CC: "ferruh.yigit@intel.com" , "andrew.rybchenko@oktetlabs.ru" , Matan Azrad , Slava Ovsiienko , "dev@dpdk.org" , "ajit.khaparde@broadcom.com" , Gregory Etelson , Andrey Vesnovaty Thread-Topic: [dpdk-dev] [PATCH v4 1/1] ethdev: introduce indirect action APIs Thread-Index: AQHXMuanbWzignsNgkuY/FVIaeGh3aq7yIQAgAAsZnA= Date: Mon, 19 Apr 2021 15:05:34 +0000 Message-ID: References: <1617940481-125528-1-git-send-email-bingz@nvidia.com> <1618594406-155741-1-git-send-email-bingz@nvidia.com> <1618594406-155741-2-git-send-email-bingz@nvidia.com> <2169832.Y0NilaVnWT@thomas> In-Reply-To: <2169832.Y0NilaVnWT@thomas> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [103.150.130.101] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a9a8cb87-7a5a-4b4c-c189-08d903449566 x-ms-traffictypediagnostic: MN2PR12MB2976: 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:989; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Fy1QYe5Sq1285Doa8e9duwtnS+fD22cHgXdnK/c2UDAO+gslPUcSogA9MOkruyBGl+Q5O+r+7p18eQONURx8hHrvHRCvm9LlKJtPgfEYocI8Qdeh6h7JI7+eURvdwzgkwlEMKQfIY0S6BGOXRylV/mhfC5LPk3pUt8jNmtKhinuzWDNtyyljFTwp1JJ6AF55/m1zjjVcWmQBZtV0DOSTHJHLGVmtk4ff57zJPLur4sJCi7vdVxB1uL2FSyN0S7HGLTc1AKwFrd3aHYlQPL3E1JsXV0r/yjs1ln/I2YDxGgBrh7/jKHvFss6gutsgLEM4WGc6yZ3Rpvb85ilSL45ha+y6IosH2lHF0HNVx11Y5w6h0W4h4BU6KAUL7TrjdkEdh8wAoGIiO+1GMU3VHgxkq78DmW0bCSB8ZTU/Fj8TPVqDgF+fPD9yz6Sul624kYOJwQHwGmmHp5nEXelMAEDIlYFceclBtruI+V5kG6Or32jend/mmSrIrOcHOKNWykuzMIf85/H55xSN5Y8mwIyKLWv7SPxpHuY4hy/+lcxA8pryq9eXRQ++FON5ZtbS6nGwTxxlHcfCZCtXUlPottTTdUrPg9qbiU3azOb/bE4AJMc= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR12MB2909.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(346002)(376002)(136003)(396003)(39860400002)(8936002)(107886003)(9686003)(7696005)(8676002)(26005)(6636002)(6506007)(5660300002)(55016002)(4326008)(478600001)(186003)(54906003)(110136005)(316002)(53546011)(38100700002)(86362001)(71200400001)(122000001)(52536014)(83380400001)(66556008)(64756008)(66446008)(66946007)(66476007)(33656002)(76116006)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?vtOSlCukp5ls+oj4lCBtnpSqL3ieIqrAWfaIpfgwafUEM7+zTl6TtZARzceO?= =?us-ascii?Q?5aObwu04KzbRxufQi4kSPsi98uGH/Y1exIDi1/+WF3tFSk1Y3cueYwh5ah0J?= =?us-ascii?Q?3OxrFeydRdRFNW5X9O7mnAc69k9hSVSYUQ8qfrabijW44bolQ3IX+Rzh2URw?= =?us-ascii?Q?tWBddE+7C2BvJnvuCWzupFY1eIsbAWoCo/QF9jjHPAq+rZe5VG+HCVh5fZ4p?= =?us-ascii?Q?Xd3ybH6iNz2lXijKs6AVUc/hUy5sso1FHiINjIxnqjAPuMamQny1uY19yOLv?= =?us-ascii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Vm2xgZr?= =?us-ascii?Q?epKxTZjwTmT7gSodu0UJ/b0+d4n1RKaehu1AHHivVw+tSU47UgxNnw+BA8Ka?= =?us-ascii?Q?Yb9yPjSuvngrpzQmedLZGN/DvqJeIX4Re9gkY5NciSw9vAPZ8DtMj93wBkfr?= =?us-ascii?Q?02GqqjcaijuhF6JotS2QzsLi?= 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: MN2PR12MB2909.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9a8cb87-7a5a-4b4c-c189-08d903449566 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Apr 2021 15:05:34.7125 (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: cvbNo92HYNyXBZpwPbDfmpofOT1LJHMaW6mHLV2bPw+6L/0OGhcNWW/uIaSf0SWu3guUeECClBD+lTAxDkF9/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB2976 Subject: Re: [dpdk-dev] [PATCH v4 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 Thomas, All the comments were addressed in the v5. Many thanks. > -----Original Message----- > From: Thomas Monjalon > Sent: Monday, April 19, 2021 8:26 PM > To: Ori Kam ; Bing Zhao > Cc: ferruh.yigit@intel.com; andrew.rybchenko@oktetlabs.ru; Matan > Azrad ; Slava Ovsiienko ; > dev@dpdk.org; ajit.khaparde@broadcom.com; Gregory Etelson > ; Andrey Vesnovaty > Subject: Re: [dpdk-dev] [PATCH v4 1/1] ethdev: introduce indirect > action APIs >=20 > External email: Use caution opening links or attachments >=20 >=20 > 16/04/2021 19:33, Bing Zhao: > > --- a/doc/guides/rel_notes/release_21_05.rst > > +++ b/doc/guides/rel_notes/release_21_05.rst > > @@ -234,6 +234,9 @@ API Changes > > * pci: The value ``PCI_ANY_ID`` is marked as deprecated > > and can be replaced with ``RTE_PCI_ANY_ID``. > > > > +* ethdev: The experimental shared action APIs in ``rte_flow.h`` > has > > +been >=20 > s/APIs/API/ > An API may cover more than a function, it is an interface globally. >=20 > > + replaced from ``rte_flow_shared_action_*`` to indirect action > APIs > > + named >=20 > s/APIs/API/ >=20 > > + ``rte_flow_action_handle_*``. >=20 > A blank line is missing here. >=20 > I propose a reword: >=20 > * ethdev: The experimental flow API for shared action has been > generalized > as a flow action handle used in rules through an indirect action. > The functions ``rte_flow_shared_action_*`` manipulating the action > object > are replaced with ``rte_flow_action_handle_*``. > The action ``RTE_FLOW_ACTION_TYPE_SHARED`` is deprecated and can > be > replaced with ``RTE_FLOW_ACTION_TYPE_INDIRECT``. >=20 > > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > +Creating indirect actions > > +~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 > empty line missing after title >=20 > > +``flow indirect_action {port_id} create`` creates indirect action > > +with optional indirect action ID. It is bound to > ``rte_flow_action_handle_create()``:: > [...] > > +Updating indirect actions > > +~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 > empty line >=20 > > +``flow indirect_action {port_id} update`` updates configuration > of > > +the indirect action from its indirect action ID (as returned by > > +``flow indirect_action {port_id} create``). It is bound to > > +``rte_flow_action_handle_update()``:: > [...] > > +Destroying indirect actions > > +~~~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 > same here and other places >=20 > > +``flow indirect_action {port_id} destroy`` destroys one or more > > +indirect actions from their indirect action IDs (as returned by > > +``flow indirect_action {port_id} create``). It is bound to > > +``rte_flow_action_handle_destroy()``:: >=20 > [...] > > --- a/lib/librte_ethdev/rte_flow.h > > +++ b/lib/librte_ethdev/rte_flow.h >=20 > We should add a comment to RTE_FLOW_ACTION_TYPE_SHARED, that it is > deprecated. >=20 > > + /** > > + * Describe indirect action that could be used by a single > flow rule > > + * or multiple flow rules. > > + * > > + * Allow flow rule(s) reference the same action by the > indirect action > > + * handle (see struct rte_flow_action_handle), rules could > be on the > > + * same port or across different ports. > > + */ >=20 > Proposed reword: >=20 > An action handle is referenced in a rule through an indirect action. >=20 > The same action handle may be used in multiple rules for the same or > different ethdev ports. >=20 > @see rte_flow_action_handle >=20 > > + RTE_FLOW_ACTION_TYPE_INDIRECT, > > }; > [...] > > - * Opaque type returned after successfully creating a shared > action. > > + * Opaque type returned after successfully creating an indirect > action object. > > + * The definition of the object handle will be different per > driver > > + or >=20 > s/will be/is/ >=20 > > + * per immediate action type. > > * > > - * This handle can be used to manage and query the related action: > > - * - share it across multiple flow rules > > - * - update action configuration > > - * - query action data > > - * - destroy action > > + * This handle can be used to manage and query the related > immediate action: > > + * - referenced in single flow rule or across multiple flow rules > > + * over multiple ports > > + * - update action object configuration > > + * - query action object data > > + * - destroy action object > > */ > > -struct rte_flow_shared_action; > > +struct rte_flow_action_handle; >=20 > [...] > > + * Create an indirect action object that can be used by flow > create, > > + and > > + * could also be shared by different flows. >=20 > Can be simpler: > Create an indirect action object that can be used in flow rules via > its handle. >=20 BR. Bing