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 10C4AA0C43; Tue, 19 Oct 2021 13:11:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB44240683; Tue, 19 Oct 2021 13:11:39 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 1B6534003E for ; Tue, 19 Oct 2021 13:11:36 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10141"; a="215646365" X-IronPort-AV: E=Sophos;i="5.85,384,1624345200"; d="scan'208";a="215646365" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2021 04:11:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,384,1624345200"; d="scan'208";a="490242701" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga007.fm.intel.com with ESMTP; 19 Oct 2021 04:11:35 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx602.amr.corp.intel.com (10.18.126.82) 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 04:11:35 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx607.amr.corp.intel.com (10.18.126.87) 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 04:11:34 -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 04:11:34 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.175) 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 04:11:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ETVgk+giS9rLuSKjvuh7q3qbTphRdeOcjlESKOLaeHiVBU8v1f6BZ06JgF9YXllUkk8LfaoHkmvkY8MIU3FaErwnC4sz2EFq405/UDmjrFpy+nTdzZgOcz6YhsIaJXMdQDfJufqbara3YVpERNiFc50MC0h6yETyCJ2xIwyFWdnzALRzt6bXPUDpO3aIgPKTjGmZUTPEVx71KY1WC/1QOpL4dirjSLAXQPGXH1QNfUoDj0tc8pnpChEkFWoibdZGJ7lxh9L850hFv8OXY5k/nO6HaT7SZlHwbQ9NtWorVMB6OfexqQrgPujGnUTXkaHXQWUGqF8MzY4jMQFc0cLWIw== 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=d3OcXUD3UYSD9o42AUB9Hgr/HDUmUDkkgl6t5XLr8GQ=; b=DhlDqeGWaK9YTCwnEE7lfzfYulNfwVPA84OLgB+5ReP7adoKzO3wqjHjd/v/Cp6ixpUu3IT/z8V11Z2c4ds18rFzyqfR6L1W3YgD99xlMbmjeVZdHlxsU2abr4GdTawPcsvYAddwNawJANwZmgzvJvnwoBrRnqoT78vTipshrQQ8SvfEf/HHf/qnTgBjOJGhba09/sLOtSKW+ixdH1sqgFD2+4MTRdLNsKbVqdN2itarklJWGlItu/8nQTGTcIgOt1eKUnWvrTv3MxCF2SmJ/IzjwxXB+uO0mTHOlbFRhJ5e+1GvawOqbh5UHCvRV4ekcvR7e+Q2QWy9MU02/stDsA== 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=d3OcXUD3UYSD9o42AUB9Hgr/HDUmUDkkgl6t5XLr8GQ=; b=r7c98y986TW+UXAvpJonoTjPcdxZyKEam5xt2ExgzjLVC3qZ6/saDzdrv4Ad/pPcYG74zCZbOamvlIPHCNjs9Z6CvAY4XI5TtKjFdai9T2Uv/gjCKSrJDhDtoKxijZN0/2qZrpvxfdNoZKvcab+Em5Jv4J5RZZQY4/9zvzEfXaw= Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by DM6PR11MB4532.namprd11.prod.outlook.com (2603:10b6:5:2aa::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.17; Tue, 19 Oct 2021 11:11:33 +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 11:11:33 +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" , "Troy, Rebecca" Thread-Topic: [PATCH v3 3/7] cryptodev: move inline APIs into separate structure Thread-Index: AQHXxC5zOSYlIuAiq0O4ieviKPZKYavaK0Jg Date: Tue, 19 Oct 2021 11:11:33 +0000 Message-ID: References: <20211011124309.4066491-1-gakhil@marvell.com> <20211018144201.2028022-1-gakhil@marvell.com> <20211018144201.2028022-4-gakhil@marvell.com> In-Reply-To: <20211018144201.2028022-4-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: cd2a0b58-3b93-4d8e-51e9-08d992f13585 x-ms-traffictypediagnostic: DM6PR11MB4532: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 89Xn6WRV1A4tjim4hTBPFIpYQ9SLFsyEiLKdzAOp0ETitSP5XIGJG7OwA746VGPwBjhTrgWu2ffFfTyy9cA1kx0+y+ya1TwLljrV9yaiK77Xwtc3IHoqSAQkkZz8iPyLmkOfqLkm9y16IxA6g6bLoaVaZgq/HouhzlnT1wHPDvvot/5haVnT020Gn0o0SsjaiCIniOBVsM4MM+7nA7e4XpY707sjU23gVelqwB/iLrJBaVbnl4XRX79wOjmsIYyDDaTXrJaIoEL/dif8rwPLAZ+DREIq5i7c5br++Dm2pGakstZlcs3Kek6LPTlpZLxTiXTFdhsbQ1qb13JcB4UDzEfBzbST91GLmuxYO3ozIXq43i8aaC8cZm0s41rhokc64lvf9yIsBjQGjwtrMLg9uBybUhM0qJQWZCFjo3u3pkka0JeZqup5dWnCXtkq9WM71vWSRTvID7tBppxnyXF6jEaJ+GhOAr1caa6ixoqyBLgcGTDlX0CuRx+WotTVoN/A2FZVwHVB5ihpZuLuuCRW0kiwffLgxUpVdn6iyISu77zSv54DJuBkV3aRjQWWaY8LkoyAZF1DYoAsIZ5c0XDNOl2GaMqq17E62y96/OAxfQZ/dd+3L+k8AczEBBqm0lCFX3zobfeUrjR7IU+OmWT7fxSA3HXaZ9gZjjDrTZtCJlJkUgzba5C9QXtibnRsKOo0FsOgcEGpjmXhmDvK4QAt4w== 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)(38100700002)(122000001)(38070700005)(316002)(66946007)(66446008)(76116006)(2906002)(508600001)(52536014)(71200400001)(33656002)(110136005)(54906003)(6506007)(55236004)(7696005)(9686003)(66556008)(186003)(107886003)(66476007)(5660300002)(82960400001)(86362001)(7416002)(64756008)(4326008)(8936002)(55016002)(26005)(8676002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?yNmt9UEtOCCZRgPNUDyAn3tqp81kgU8V1Kfcg4/nZrYZQkv/eZQA8bRDcQtg?= =?us-ascii?Q?rf1DU7Fidl4JDWobTn27Go1bGmstrMFh34Nux42YkpnG28cc9zxUGwO+Agyi?= =?us-ascii?Q?LNGYNj7ydDlY3P9B6p/x77GqHsJY/ivdEByeb2iPEVSiD8AJRXK02AqHhQ7O?= =?us-ascii?Q?NfbjSsyTzQx70Aiyzg5XKoJLBGRouCXRnrRD7XrftLiCOSm1+sJxgHvytrIb?= =?us-ascii?Q?ykMvAO2w1w9LX93TK5jJ9X5t5BdkAAE8qm6ywuuw9lbr3sBXi5qvtE6v8L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oCxNAUQnzPRrcHktE/Ut4t/ydg0eboF3qtcr?= =?us-ascii?Q?LKKnv8LQpNpebwPHItrFy2LyGvPOKeY7EI0wMI0F7O2BBCUQGbpAKQMbnBo3?= =?us-ascii?Q?SNMSDQw5+0qaV1eOXNnHmUC7bBkOhC1dsXarr82b9VFnPf3/Ft2Yf33I9CgY?= =?us-ascii?Q?Nv2AxNWo2gQTDQAuJTvfmuWS?= 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: cd2a0b58-3b93-4d8e-51e9-08d992f13585 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Oct 2021 11:11:33.0360 (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: HgEtQMBtVs4TcNRjroyi7DCQ6+DvRkTJUFU4jj+VFF6dhzyurPPhfPCjfJP8rikg0MgdTIqytB5AmH1u2xBDCk/Wanf+5sqhQCTXahTrwz4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4532 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 3/7] cryptodev: move inline APIs into separate structure 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" > diff --git a/lib/cryptodev/rte_cryptodev_core.h b/lib/cryptodev/rte_crypt= odev_core.h > index 1633e55889..e9e9a44b3c 100644 > --- a/lib/cryptodev/rte_cryptodev_core.h > +++ b/lib/cryptodev/rte_cryptodev_core.h > @@ -25,6 +25,35 @@ typedef uint16_t (*enqueue_pkt_burst_t)(void *qp, > struct rte_crypto_op **ops, uint16_t nb_ops); > /**< Enqueue packets for processing on queue pair of a device. */ >=20 > +/** > + * @internal > + * Structure used to hold opaque pointers to internal ethdev Rx/Tx > + * queues data. > + * The main purpose to expose these pointers at all - allow compiler > + * to fetch this data for fast-path cryptodev inline functions in advanc= e. > + */ > +struct rte_cryptodev_qpdata { > + /** points to array of internal queue pair data pointers. */ > + void **data; > + /** points to array of enqueue callback data pointers */ > + struct rte_cryptodev_cb_rcu *enq_cb; > + /** points to array of dequeue callback data pointers */ > + struct rte_cryptodev_cb_rcu *deq_cb; > +}; > + > +struct rte_crypto_fp_ops { > + /** PMD enqueue burst function. */ > + enqueue_pkt_burst_t enqueue_burst; > + /** PMD dequeue burst function. */ > + dequeue_pkt_burst_t dequeue_burst; > + /** Internal queue pair data pointers. */ > + struct rte_cryptodev_qpdata qp; > + /** Reserved for future ops. */ > + uintptr_t reserved[4]; I think it has to be uintptr_t reserved[3]; 2 function pointers + 3 data pointers +3 reserved pointers. Otherwise it will occupy extra 64B line. > +} __rte_cache_aligned; > + > +extern struct rte_crypto_fp_ops rte_crypto_fp_ops[RTE_CRYPTO_MAX_DEVS]; > + > /** > * @internal > * The data part, with no function pointers, associated with each device= . > diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map > index 43cf937e40..ed62ced221 100644 > --- a/lib/cryptodev/version.map > +++ b/lib/cryptodev/version.map > @@ -45,6 +45,9 @@ DPDK_22 { > rte_cryptodev_sym_session_init; > rte_cryptodevs; >=20 > + #added in 21.11 > + rte_crypto_fp_ops; > + > local: *; > }; >=20 > @@ -109,6 +112,8 @@ EXPERIMENTAL { > INTERNAL { > global: >=20 > + cryptodev_fp_ops_reset; > + cryptodev_fp_ops_set; > rte_cryptodev_allocate_driver; > rte_cryptodev_pmd_allocate; > rte_cryptodev_pmd_callback_process; > -- > 2.25.1