From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F08DDA04B7; Wed, 14 Oct 2020 13:43:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CA8011DE09; Wed, 14 Oct 2020 13:43:25 +0200 (CEST) Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) by dpdk.org (Postfix) with ESMTP id 45C2F1DE04 for ; Wed, 14 Oct 2020 13:43:23 +0200 (CEST) Received: from HKMAIL103.nvidia.com (Not Verified[10.18.92.77]) by nat-hk.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Wed, 14 Oct 2020 19:43:21 +0800 Received: from HKMAIL104.nvidia.com (10.18.16.13) by HKMAIL103.nvidia.com (10.18.16.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 14 Oct 2020 11:43:08 +0000 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.177) by HKMAIL104.nvidia.com (10.18.16.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 14 Oct 2020 11:43:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FCZdxEsTAPfT/xPEFVWEAzYViNGZutWlKcOzxjGH8yd3hSkjRZ+zdy3lia6EBZT7aRilX1l/6nt00/HYN3ON2Zg8B5ITuQST2dz86fRzkaHIFFzW1pEFhIWHTCEsAfLTWMRGHe+iZbWo3cOUiVTzPU2WGee0RANYdYctPGHBWpFzAjohF1YGWJeu19HpR/ZyLni7Kea2vjUmqSj3qioitmzLo7Kb8ljxeM67AWF5/UsCxwqAi27ewdxCvycka65bzVLtZMdFzPzvAiCbcQ/1GyDNAWRVs58naB4jic80VcWgI01ygzlC/iimKaOjy33gLih4B6I3k8Ngm5RT3bfGFA== 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=imJVy3s1pDAI0XWGge8AIyT/8z60tQ4DtKmijlpF5TA=; b=Osp3CCaa+2eBbE6ETzu6RjT7cJhxofbZplCYa9q8KmjvRCea7Q5y/L9P0FWVO6LhthTBGxYRDxUkLixKvfVJ/Pw3I+w5Q7UJ+mmw1dCOX1gx3WFR5m7gISqtbM6jvaST6oHgbn7f69+JVhtBUwCMOh7d/NGB9IZ2qwvxLgLR3pMsa/ct1+mKvsHKpixAHdSbcdiIJlYI8hk/jrrnah/lap7zVII0YiZXzVy2rnQOdfmjh7uOgyJjuS2TgsgSoYKr2V0I8Uu8AVrN63DOqdIpb8snG9mb/7KSYjMSPcDLmPAPMvBIUT3V0T3Tc8CWM0Drc5tfkPbvQjTfarxz/H7MAg== 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 MWHPR1201MB2525.namprd12.prod.outlook.com (2603:10b6:300:e0::19) by MWHPR1201MB2476.namprd12.prod.outlook.com (2603:10b6:300:de::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.22; Wed, 14 Oct 2020 11:43:06 +0000 Received: from MWHPR1201MB2525.namprd12.prod.outlook.com ([fe80::3ccb:ec09:9346:54b1]) by MWHPR1201MB2525.namprd12.prod.outlook.com ([fe80::3ccb:ec09:9346:54b1%7]) with mapi id 15.20.3477.021; Wed, 14 Oct 2020 11:43:05 +0000 From: Andrey Vesnovaty To: NBU-Contact-Thomas Monjalon CC: "dev@dpdk.org" , Andrew Rybchenko , "jerinj@marvell.com" , "ferruh.yigit@intel.com" , "stephen@networkplumber.org" , "bruce.richardson@intel.com" , Ori Kam , Slava Ovsiienko , "andrey.vesnovaty@gmail.com" , "ajit.khaparde@broadcom.com" , "samik.gupta@broadcom.com" Thread-Topic: [dpdk-dev] [PATCH v7 1/2] ethdev: add flow shared action API Thread-Index: AQHWnWm2rCwoe3NncEu6tcF3cwumgamUCoyAgAGZ+FCAAQ0CAIAACTmAgABIn3A= Date: Wed, 14 Oct 2020 11:43:05 +0000 Message-ID: References: <20200702120511.16315-1-andreyv@mellanox.com> <1884452.bCSgJj8pPL@thomas> In-Reply-To: <1884452.bCSgJj8pPL@thomas> Accept-Language: en-US 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: [87.71.167.32] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1831c210-df2a-4356-2b83-08d8703650d7 x-ms-traffictypediagnostic: MWHPR1201MB2476: 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:6430; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: e6UUcspAWn1r49bdMCtd6BotWZnHW+tN91Tq037PS9ItOQpYcZHP23Yu/CYZTaOsxpfnSrfQkTZqNkMwCojzdYD72M0/ghlTgBvQUiRUayXwVqbKh27di7reBBgxVIR+BD2kt3Pu56l6+AiRm32OmxN/BfImK92ZuhmEyH9iMA9uHqGTWAYanDcgRI3Gmw4aLBE9RBcN0XcDk0Uj0txJPByn8dRYCrrA2Yvb+pEQqG/JcQE/1Z1BE/pFcsd7i+/KcsRQGN0DPMJJwCdT1L2HfzucJ04ln8coWEm+B+8pxgY6bH4wX7B8WAoJRkc2l04bCdRpcGeufHSkxkNOwA6jZg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1201MB2525.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(376002)(366004)(396003)(39860400002)(66476007)(478600001)(26005)(316002)(86362001)(9686003)(55016002)(6506007)(7696005)(53546011)(2906002)(186003)(54906003)(33656002)(5660300002)(7416002)(6916009)(66556008)(52536014)(66946007)(64756008)(66446008)(76116006)(8676002)(8936002)(4326008)(71200400001)(83380400001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: ygu/Fs1cBrn4CgwDax24vLyRfT7DxaNJaiS+MSsWwar85yuucKrUg4M5uo63pq6vrbeEuxAM4+ZpjVR03BeVkdlcFaC16lghn+QQn1LCps7g/QeKOg+/oigE3e8zQJd+nZ6yiJR0JmndfSs1/PZsGEiClJjibH3LF2bsR1+5nMh0oYiRDlgiRBCNIbM/C2MlGnsLijuVGzyN6mY48YsDJEuKxcJmtkIMMNIyWG3qeFTLAQ5YL4A6bYneEcKMX4Sy3Z98aiMMsp5gshzX6kHL2vVDYtFD2jKK5hkFayyEEnn2JJc0tyg4iw8STd6kQRrIkW1PXF9/YvX/bXSKfa9gJxXLQIQFuwQyUw0aEvgvEthrLQqmyfzSu1KyQEUqbAAP6iSxnKSBjZ/pZMkJMo1r7dNkuOeXptAtnF4Yok6Yyhd8rzYvO3Gm82bkJlOuwxa2nBt15SIm+r0D93mNmxHSFspJeMaZuPyxA5pdcSLALIhSfYyvcBZHTu1R0tTGr07d6ThIWmYmjLenXBblEyOErAf7uJwjbgKj5SWkIo8JF5lOnra/sJL85QN+UKjeNwIET3xwj5qZUOXNUDl05y1uswIzw+SXmRunvid7ynh7kQOa4hPWL6T5X/aj2DfJVioIuuGT//ym5q4iPNiL0+KJNg== 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: MWHPR1201MB2525.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1831c210-df2a-4356-2b83-08d8703650d7 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Oct 2020 11:43:05.8459 (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: 13TiMM8v7AvJx+Mw0MtzjsCd188sG8gh2tMm+uyFshkgp7F4h+D0LXm2VD9EMnNTiKD3jogi0GbkSfoqJWIYWw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB2476 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1602675802; bh=imJVy3s1pDAI0XWGge8AIyT/8z60tQ4DtKmijlpF5TA=; 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=h8Sc2MDkUFGvQaeXhTr42bsdF6kSP9+4fPVM57J2B+B0sTa5sLk//D03g2CqecbRc GjA44/WkLOFAFGie66yvTptUzhKi4HeST/ux7KeFMVLrPhIctCFYP+YLsY49BcGKau pg1YJfy5lfx5S/N+Uc5gArDA0z9OzBaeeVP1u8qyylFYc6JBEb+lHVSyMI6tbK1ESd vbNFLYJHo11tyvRAPA628w5WPc1k1JwKd32eBS5a+HLFf5+8V3/3KuhiQsjnb0NMzZ RXw89gPMwt+FPOhyofgfcwErlI6h6lswLGoYuAtnHN5oODB5Cuk3iolddE79tOsKSN KR1Haaj6f9bWw== Subject: Re: [dpdk-dev] [PATCH v7 1/2] ethdev: add flow shared action API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 your suggestions applied in v8 series. Thanks, Andrey > -----Original Message----- > From: Thomas Monjalon > Sent: Wednesday, October 14, 2020 10:23 AM > To: Andrey Vesnovaty > Cc: dev@dpdk.org; Andrew Rybchenko ; > jerinj@marvell.com; ferruh.yigit@intel.com; stephen@networkplumber.org; > bruce.richardson@intel.com; Ori Kam ; Slava Ovsiienko > ; andrey.vesnovaty@gmail.com; > ajit.khaparde@broadcom.com; samik.gupta@broadcom.com > Subject: Re: [dpdk-dev] [PATCH v7 1/2] ethdev: add flow shared action API >=20 > 14/10/2020 08:49, Andrew Rybchenko: > > On 10/13/20 11:06 PM, Andrey Vesnovaty wrote: > > > From: Andrew Rybchenko > > >>> Shared action create/use/destroy > > >>> =3D=3D=3D > > >>> Shared action may be reused by some or none flow rules at any given > > >>> moment, i.e. shared action resides outside of the context of any fl= ow. > > >>> Shared action represent HW resources/objects used for action offloa= ding > > >>> implementation. > > >>> API for shared action create (see `rte_flow_shared_action_create()`= ): > > >>> - should allocate HW resources and make related initializations req= uired > > >>> for shared action implementation. > > >>> - make necessary preparations to maintain shared access to > > >>> the action resources, configuration and state. > > >>> API for shared action destroy (see `rte_flow_shared_action_destroy(= )`) > > >>> should release HW resources and make related cleanups required for > shared > > >>> action implementation. > > >>> > > >>> In order to share some flow action reuse the handle of type > > >>> `struct rte_flow_shared_action` returned by > > >>> rte_flow_shared_action_create() as a `conf` field of > > >>> `struct rte_flow_action` (see "example" section). > > >>> > > >>> If some shared action not used by any flow rule all resources alloc= ated > > >>> by the shared action can be released by rte_flow_shared_action_dest= roy() > > >>> (see "example" section). The shared action handle passed as argumen= t to > > >>> destroy API should not be used any further i.e. result of the usage= is > > >>> undefined. > > >>> > > >>> Shared action re-configuration > > >>> =3D=3D=3D > > >>> Shared action behavior defined by its configuration can be updated = via > > >>> rte_flow_shared_action_update() (see "example" section). The shared > > >>> action update operation modifies HW related resources/objects alloc= ated > > >>> on the action creation. The number of operations performed by the > update > > >>> operation should not depend on the number of flows sharing the rela= ted > > >>> action. On return of shared action update API action behavior shoul= d be > > >>> according to updated configuration for all flows sharing the action= . > > >>> > > >>> Shared action query > > >>> =3D=3D=3D > > >>> Provide separate API to query shared action state (see > > >>> rte_flow_shared_action_update()). Taking a counter as an example: q= uery > > >>> returns value aggregating all counter increments across all flow ru= les > > >>> sharing the counter. This API doesn't query shared action configura= tion > > >>> since it is controlled by rte_flow_shared_action_create() and > > >>> rte_flow_shared_action_update() APIs and no supposed to change by > other > > >>> means. > > >>> > > >>> PMD support > > >>> =3D=3D=3D > > >>> The support of introduced API is pure PMD specific design and > > >>> responsibility for each action type (see struct rte_flow_ops). >=20 > This sentence is strange. > Of course PMD implementation is a PMD specific design. > I think you can remove it. >=20 > > >>> testpmd > > >>> =3D=3D=3D > > >>> In order to utilize introduced API testpmd cli may implement follow= ing > > >>> extension > > >>> create/update/destroy/query shared action accordingly > > >>> > > >>> flow shared_action (port) create {action_id (id)} (action) / end > > >>> flow shared_action (port) update (id) (action) / end > > >>> flow shared_action (port) destroy action_id (id) {action_id (id) [.= ..]} > > >>> flow shared_action (port) query (id) > > >>> > > >>> testpmd example > > >>> =3D=3D=3D > > >>> > > >>> configure rss to queues 1 & 2 > > >>> > > >>>> flow shared_action 0 create action_id 100 rss queues 1 2 end / end > > >>> > > >>> create flow rule utilizing shared action > > >>> > > >>>> flow create 0 ingress \ > > >>> pattern eth dst is 0c:42:a1:15:fd:ac / ipv6 / tcp / end \ > > >>> actions shared 100 / end > > >>> > > >>> add 2 more queues > > >>> > > >>>> flow shared_action 0 modify 100 rss queues 1 2 3 4 end / end > > >> > > >> testpmd is out-of-scope of the patch and it is better to > > >> remove the description to avoid unsync if testpmd > > >> commands are changed. > > > > > > There is still added value is testpmd example demonstrating usage of > > > shared action with rte flows. I will update the example to reflect th= e current > > > testpmd syntax for shared action. > > > > Yes and no. IMHO It would be OK for series description etc, > > but not OK for the changeset description which will be > > kept in the history and will become misleading when > > commands are changed. I think that no information is better > > than potentially wrong information. >=20 > I agree with Andrew, the API explanation should be enough. > Talking about testpmd commands in the ethdev patch is not appropriate. >=20 >=20