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 E310EA0C4D; Tue, 19 Oct 2021 14:28:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC6F24111D; Tue, 19 Oct 2021 14:28:33 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 491C6410F4 for ; Tue, 19 Oct 2021 14:28:31 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10141"; a="227262616" X-IronPort-AV: E=Sophos;i="5.85,384,1624345200"; d="scan'208";a="227262616" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2021 05:28:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,384,1624345200"; d="scan'208";a="574143812" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga002.fm.intel.com with ESMTP; 19 Oct 2021 05:28:25 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 19 Oct 2021 05:28:22 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 19 Oct 2021 05:28:22 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.172) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 19 Oct 2021 05:28:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j83y6r24P+n4S1O/gJBULbmHt93JJip81aw7qmZ2h7byBPj8X3P0rdgEGYu9mWEeS9K3rzyvDSBOJX00q0VfrrNlcWOelxgy+15S18gGkxVWjc6kQvlf6nOpwq5aNIZCFBECPSi6IvY9WPmm+foTp81tylRvSU+90Tg+GYnHXpGkXg5okOFEP/9gJWia7Yi8cryTAs1y1t8AeIPx8isedG23Gj+w+II3lMCM5yfUYyCiscQnRp1bGEk7diurx8Bc+88p39UJKqV9gu2WSinK7C0xfM1LIvvB2c8ft0iigD9rfounxwG9rXFwGx9H1dW3+c6fktWr5HdLvprb28vuww== 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=AMVj3v1vNKdal1CSMKCJW7LMlPrieFFa/kxAXj5czeg=; b=b4sKUmHgA1a5VAR6aDbwy7SNkZwqjwTn+cFWjuUFuGzWMn8PgUgLAEqEj4oe7gteZAFPXKSADaR+10EDPSJeUJu5pPR3d7RLghCXo1C27NC+xqR6XaWUT9PvHWjkwRQltVcB2mcS+I/OGfIJIpoUE+t43Hrnjt8f45cG/7/+BpgJxWtrR8z32GFfrKdXU+v34SmmjXIxl0I2Nnoh07rsr0Ww/f3RIfDjqMmVl5K0CxMwrcXCbotmJ/434o79F1XZpA8aiok2mpLHxqQKwyg7u8/i0QNWk1qHwhNN+hedrmTob2bYAIHgx7YLDgyf6IoKXD2RWkoOj662uZrSes/fig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AMVj3v1vNKdal1CSMKCJW7LMlPrieFFa/kxAXj5czeg=; b=zqTBiG8L/Yb96RXmaCMXubp0KWQ86HUT1s1GIyQXZpMYLXaCAk2uZuOrr7e/8TbTVL93IiaXeYc1CUoa9zM0wMg/Yh2t8xj2wz+MJTWTBlukLCDuyVCWxacV9yeukHp1VuTywJbmGBdAdBThphtZV0SJyhx2PdYy7IhP7c+/V/g= Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by DM6PR11MB3130.namprd11.prod.outlook.com (2603:10b6:5:67::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.18; Tue, 19 Oct 2021 12:28:21 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::740e:126e:c785:c8fd]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::740e:126e:c785:c8fd%4]) with mapi id 15.20.4608.018; Tue, 19 Oct 2021 12:28:21 +0000 From: "Ananyev, Konstantin" To: Akhil Goyal , "dev@dpdk.org" CC: "thomas@monjalon.net" , "david.marchand@redhat.com" , "hemant.agrawal@nxp.com" , "anoobj@marvell.com" , "De Lara Guarch, Pablo" , "Trahe, Fiona" , "Doherty, Declan" , "matan@nvidia.com" , "g.singh@nxp.com" , "Zhang, Roy Fan" , "jianjay.zhou@huawei.com" , "asomalap@amd.com" , "ruifeng.wang@arm.com" , "Nicolau, Radu" , "ajit.khaparde@broadcom.com" , "rnagadheeraj@marvell.com" , "adwivedi@marvell.com" , "Power, Ciara" Thread-Topic: [PATCH v3 6/7] cryptodev: update fast path APIs to use new flat array Thread-Index: AQHXxC6k4IaYb3atyUmFYPOsJpuNIqvaPoBQ Date: Tue, 19 Oct 2021 12:28:21 +0000 Message-ID: References: <20211011124309.4066491-1-gakhil@marvell.com> <20211018144201.2028022-1-gakhil@marvell.com> <20211018144201.2028022-7-gakhil@marvell.com> In-Reply-To: <20211018144201.2028022-7-gakhil@marvell.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8921bee2-6668-4163-d2b4-08d992fbf03d x-ms-traffictypediagnostic: DM6PR11MB3130: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: DLATx88HWnc9ksP0IwXt8Ch5SUsA1pRY83FfTYrQbm/FRXGZuUG4R/ubUGaqc1hnJNuch1697QH4GJxAPEkW6Ah/R6kk/tfxO+MOoMY0Xib3Nzi18yocvNB2RCa6kDsVip8V1OSbOktHcpdd9N4Dje/xV7b1UvMGYmG3aw+QQhfA/Ujav0MH/kTK86OH3K8V5lahgsuJOLD1eLMN7/APq684999ILrBrPmlLzkNdJ397O0jU6+3u62LQ1Ffj/6M8bgrG4JOCpGcloVZcM+wg6yZ3bl338PhlYg4WxqzKCGLVwVG9oEQawHLqKZCHBWnMfy99YnkZ6FKH94LMHLdM0a1F7YhB+PAUdZu127L+1O7sLb9hLyNsyLu5iUdom3CGQcV43Ghq7i3WILQ+DD/1wWb7TwBoeSNWHt39kAkUE92mxdrAaU1Dh3f6P6roO6jtrX4eSK+/pF07iQJIwFGKYPuQuxwBb8ACPf55+8xIsyCgSJDZKsSEwOWcQliMFYfe1WoOvAD0re52C8EPuyW2q8YikBQg4RHzI5sAxdchMrpPhXSIo8/UGg2yklfcjjIYr9gh6kYoDLEM+SMuvbQ0uN75/iE4DcN45BmTU4f36DjT6o8/nVkEw2vG0icKeaaIrICa6WdWc6sR3i9FB40ybbUlL1f5faCH5XpgyxBtV7QcJ7O1Mqe491ZMns+DyaHAs+teQNJuQceavvNAdth5mg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(82960400001)(508600001)(4326008)(122000001)(66946007)(2906002)(83380400001)(316002)(55236004)(8936002)(64756008)(8676002)(38100700002)(76116006)(107886003)(9686003)(66556008)(86362001)(71200400001)(38070700005)(6506007)(66446008)(33656002)(54906003)(55016002)(110136005)(5660300002)(7416002)(66476007)(186003)(52536014)(26005)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?BIUDhGRzbd5H9P8nqOUuIG6jmOb7pXArPhLI8GIaA32TEDzBfdL6pi+09xLK?= =?us-ascii?Q?hBOBuaNbhU3XKuShrpagNJZbpTjHcko6j0bO8BbNKmVESZk4PTtYL5xurt8N?= =?us-ascii?Q?HtFO3F/NGev8oedIhF0fUDuglQMkFG3Aae8zSon4Q3PRbfDrsLqAbvdd4LY2?= =?us-ascii?Q?mQLgtSplXHJI9vQ42pL7aZqxULRV9Z9b0m5QgIaHl2lmHSpYh1Vms63VFDrT?= =?us-ascii?Q?MJEfURjqgMWpbew7ScIudZeZXcockfDOlsXOw9Z9K6Hw989HKi87MkxlvaYv?= =?us-ascii?Q?HF+Il2hTpSqvrBd0zt+CzZbCqql65UBe2XpaHqXweCPr/pVyChu9UufP2f92?= =?us-ascii?Q?R7b9HhFMmYDdePJfmN1LgS1WPYQ1wFxMQ4g2j9BZkrLrGEJV86ZnV2HHsk7S?= =?us-ascii?Q?xHWzfOp8Di9L3nYKSxEJn9IzotZiMzhc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6/PdxOnz7UHnTuDkMCYpmqG?= 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: DM6PR11MB4491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8921bee2-6668-4163-d2b4-08d992fbf03d X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Oct 2021 12:28:21.3306 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: gd9nnc+p75hiHkosGiBRnJMvr7raZudUw6D4T/uQkQlCcXFmZOjGXH+bfDwpMgdiuoMwaMVxMI7wFpEv3uWfnDdgbLfCCTRzkTU4ZUVII/I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3130 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 6/7] cryptodev: update fast path APIs to use new flat array 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" >=20 > Rework fast-path cryptodev functions to use rte_crypto_fp_ops[]. > While it is an API/ABI breakage, this change is intended to be > transparent for both users (no changes in user app is required) and > PMD developers (no changes in PMD is required). >=20 > Signed-off-by: Akhil Goyal > Acked-by: Fan Zhang > --- > lib/cryptodev/rte_cryptodev.h | 27 +++++++++++++++++---------- > 1 file changed, 17 insertions(+), 10 deletions(-) >=20 > diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.= h > index ce0dca72be..56e3868ada 100644 > --- a/lib/cryptodev/rte_cryptodev.h > +++ b/lib/cryptodev/rte_cryptodev.h > @@ -1832,13 +1832,18 @@ static inline uint16_t > rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id, > struct rte_crypto_op **ops, uint16_t nb_ops) > { > - struct rte_cryptodev *dev =3D &rte_cryptodevs[dev_id]; > + const struct rte_crypto_fp_ops *fp_ops; > + void *qp; >=20 > rte_cryptodev_trace_dequeue_burst(dev_id, qp_id, (void **)ops, nb_ops); > - nb_ops =3D (*dev->dequeue_burst) > - (dev->data->queue_pairs[qp_id], ops, nb_ops); > + > + fp_ops =3D &rte_crypto_fp_ops[dev_id]; > + qp =3D fp_ops->qp.data[qp_id]; > + > + nb_ops =3D fp_ops->dequeue_burst(qp, ops, nb_ops); > + > #ifdef RTE_CRYPTO_CALLBACKS > - if (unlikely(dev->deq_cbs !=3D NULL)) { > + if (unlikely(fp_ops->qp.deq_cb !=3D NULL)) { > struct rte_cryptodev_cb_rcu *list; > struct rte_cryptodev_cb *cb; As I ca see you decided to keep call-back related data-structs as public AP= I. I wonder that's to avoid extra changes with CB related code? Or performance reasons? Or probably something else? >=20 > @@ -1848,7 +1853,7 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_= t qp_id, > * cb and cb->fn/cb->next, __ATOMIC_ACQUIRE memory order is > * not required. > */ > - list =3D &dev->deq_cbs[qp_id]; > + list =3D &fp_ops->qp.deq_cb[qp_id]; > rte_rcu_qsbr_thread_online(list->qsbr, 0); > cb =3D __atomic_load_n(&list->next, __ATOMIC_RELAXED); >=20 > @@ -1899,10 +1904,13 @@ static inline uint16_t > rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id, > struct rte_crypto_op **ops, uint16_t nb_ops) > { > - struct rte_cryptodev *dev =3D &rte_cryptodevs[dev_id]; > + const struct rte_crypto_fp_ops *fp_ops; > + void *qp; >=20 > + fp_ops =3D &rte_crypto_fp_ops[dev_id]; > + qp =3D fp_ops->qp.data[qp_id]; > #ifdef RTE_CRYPTO_CALLBACKS > - if (unlikely(dev->enq_cbs !=3D NULL)) { > + if (unlikely(fp_ops->qp.enq_cb !=3D NULL)) { > struct rte_cryptodev_cb_rcu *list; > struct rte_cryptodev_cb *cb; >=20 > @@ -1912,7 +1920,7 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_= t qp_id, > * cb and cb->fn/cb->next, __ATOMIC_ACQUIRE memory order is > * not required. > */ > - list =3D &dev->enq_cbs[qp_id]; > + list =3D &fp_ops->qp.enq_cb[qp_id]; > rte_rcu_qsbr_thread_online(list->qsbr, 0); > cb =3D __atomic_load_n(&list->next, __ATOMIC_RELAXED); >=20 > @@ -1927,8 +1935,7 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_= t qp_id, > #endif >=20 > rte_cryptodev_trace_enqueue_burst(dev_id, qp_id, (void **)ops, nb_ops); > - return (*dev->enqueue_burst)( > - dev->data->queue_pairs[qp_id], ops, nb_ops); > + return fp_ops->enqueue_burst(qp, ops, nb_ops); > } >=20 >=20 > -- > 2.25.1