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 16106A0C43; Tue, 19 Oct 2021 13:50:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A6B75410FA; Tue, 19 Oct 2021 13:50:10 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 6EF0C410F4 for ; Tue, 19 Oct 2021 13:50:09 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19J8OEEe032019; Tue, 19 Oct 2021 04:50:02 -0700 Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2045.outbound.protection.outlook.com [104.47.66.45]) by mx0b-0016f401.pphosted.com with ESMTP id 3bsfk4bha0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Oct 2021 04:50:02 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MV0QvAqVUP9WMqZ4OhXahVbxOZDWdjTSo/NzL4Za7p7/ZxX4ZJSoHVjobXLZx854yiLQ0N5dCAtHw9UzS3nTP2E6CDczIRSOO9K37lvcB80rJm+48KXV+WwOiOSdMBzZNWlLnKo7pQSWlbgs9hNUQZrryx18LvG8nGWMCEfrGS/A1s2dTKIjMBkLWaEglci8lUUYS4Vl4fpZIJqgf+n4AHW6UqkwfMwIIFn7bohoA4elVPDCDMQYR7Cdl9STQ1WsBCzjgnecN0BUKfp5l6eKHxUuNusw5M3Y1P6MmsUvQCPC1qNy7fvZNjzZu1J3wKIJbL6wWqtdmaJDIPtN9tu2Ww== 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=TjuNMeUI0QNTXF6IJYLsFoxx7j0ZwLJSmvm4yIuEhlM=; b=LFlDTmx9WegE++hN/T6VcqpkoZB5Ms2QGRoZATjh48THkgRS+H00+LN7BxomXA7jpTpZawyIoH/FVNDnX6pxhaprlYEOuc6mMe9B+Jpm+TfFjRyZyr9/WMhCMyC8Qobv1QTZJRoIoLZrJthTCSSr/jsEWls+HHaGW+l/mheet17SOBhNDMfnEHSLw4oLvUM9CzQbNhoLL/+93hyXM4G9nDlwcxjb1AGhGDE4k1qZJljLxEzz9F7OOX8vD5+6w5gDK6zacYrmbkmobARwpXsR0fR1CDBdzvoy9vbbchqKY7kBkLZRNtWsbff9pcGo5TZ6Iqyq2ltS9lG4tnNPdHW/1g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TjuNMeUI0QNTXF6IJYLsFoxx7j0ZwLJSmvm4yIuEhlM=; b=oZBwqdoAMhG4fsjiw84fIrlpLnyw2ciftSlbk0C/ixskvd8QMpeZgY7bc8sCpkVGUenW8cqTziqGNcUD0T1k+fY1JgiZsiiMbOEcPtZa2lbkh9b2080/dHwvb7Ujj9CC8teK9g0D2hk9m59GW2IkFeGW2dfaDes37nWEYWsp5Jc= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by CO1PR18MB4827.namprd18.prod.outlook.com (2603:10b6:303:ee::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Tue, 19 Oct 2021 11:50:00 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::c41e:707:3f91:71b8]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::c41e:707:3f91:71b8%8]) with mapi id 15.20.4608.018; Tue, 19 Oct 2021 11:50:00 +0000 From: Akhil Goyal To: "Ananyev, Konstantin" , "dev@dpdk.org" CC: "thomas@monjalon.net" , "david.marchand@redhat.com" , "hemant.agrawal@nxp.com" , Anoob Joseph , "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" , Nagadheeraj Rottela , Ankur Dwivedi , "Power, Ciara" , "Troy, Rebecca" Thread-Topic: [PATCH v3 3/7] cryptodev: move inline APIs into separate structure Thread-Index: AQHXxC5maV8Y9EwPzEGgDtV6ZECFjqvaK8mAgAAJ4GA= Date: Tue, 19 Oct 2021 11:50:00 +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: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 54e130c5-e6f2-4e47-cf05-08d992f694f9 x-ms-traffictypediagnostic: CO1PR18MB4827: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pfcwts0bAK2ju1ONvvHKKWhzS8qwk5gh0uQ3yNZgOMiLntnUWMFgx+mq4uZ/94q5rWB9gX5ItirAsF58ewPv6hItOMQajB65IyxJxZqlo3IIjFzxp8Qc/mihfHlsNSOCBv/Ckz7aeekmkPvKOotgi3xiIN/LjRLK7SqRnbySDOwJ7kllMxSLRUyCUBkKuTMCEVDIfUC4YLuSl6Fr6nkvadNSWVgaNCcxbHsCDR99Xx60E6ffZ2BV0Br2mqaZc96nO2wKhXOhcNhSGYca9UtHbm16RAsKnM6XdfCi4IvaSlHL9BJ/nc9v1rT04DeBEDJjAQN1WDNjiCFkeJIAPtjQrjN+uy2mPoZdk0v11OtnSheoxp8wMDEVbJg9E52q+xqInrHEkQqUf5YdwaYhjWAd29ZpB6gtvEvTaMI6T/2H+Inaji+EXPAMv+HLWpBAVY1iE7IDwmLXsPP1yvdcJ6DNjrezfY1xS5kFZie9CtgP+X7YmIwUGQFWYUGJpn0dlV8ffc/eJksdblf1lBuEv2+rLVPaHOgMYhYm/IkxmPS0ciclG2QOQIDfrZjDkPQVYrqtapZMmb8LuNMw75Vt8Y3In0Oza3BSlf4K8MKj36JIOkRUdBqT2g2q2t5Rl9w2ExZV/qrws83Sbc5c4dBG4UBLghFy0F0D9s7aZemIDau2v3tXPGIZLknf2TlJvHellPNWHAuBRUqT477zKwU+VU9Sqw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(54906003)(55016002)(71200400001)(6506007)(9686003)(86362001)(66556008)(7416002)(2906002)(55236004)(4326008)(110136005)(8936002)(66476007)(508600001)(38070700005)(38100700002)(186003)(76116006)(52536014)(8676002)(7696005)(122000001)(26005)(83380400001)(66946007)(64756008)(66446008)(5660300002)(33656002)(316002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?OUNhwUWQhPZP8a+xhdXm/LCSAtL8L+vKbyucm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OEqxAwKI0B03LP7aMsrC9pnnkArQ/IG2VQ9Np7qkdKI6V6vQe/?= =?us-ascii?Q?UlP3SogIJ54++sr9TRnxx7qkxs4Fy5lsBoNe3JGA8Qtz9K7ZajtYpuIA90O5?= =?us-ascii?Q?REVTAxSPU7HHxa1s9Qm3sdFhaukSdwCSr79eK4mhfE8KBiVkZwwrvdxPOkQh?= =?us-ascii?Q?fll9TcOsLlxSLlbmDRx9Gr3DOJxxdAHBjnhgacaVHd0TtTzzOpnIaMMH+/yG?= =?us-ascii?Q?MFKHd0JAoLLSBL/XToaTP7yZYf8MVCwiz2RjLl8+ojgclEoPQecgG+zEFNvZ?= =?us-ascii?Q?8CTelFxmGukX1iSeZ+Vo3N24a2fmz3hHVj2SLUbhmW8H903PE1DBKd1kqx2t?= =?us-ascii?Q?5jSYiaU6S30zh1peDIq71auo7Q7oLvtO34xY3SrXFQsoFqW09AoO4m4qMYqb?= =?us-ascii?Q?kCbgpyjiU5TdaM1/oox/ZtX6?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54e130c5-e6f2-4e47-cf05-08d992f694f9 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Oct 2021 11:50:00.6793 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: N2JN4Wq4tp39/4N7Hx6QJH2TboYcRGtc1paRxzCAkKPIvPrxi5Wzp8RJcfuAM1MatYbXOlty4OAuBYtGH0be/g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR18MB4827 X-Proofpoint-ORIG-GUID: VmU_Zt2iH6WG2niLJvWj85d434CUXq3k X-Proofpoint-GUID: VmU_Zt2iH6WG2niLJvWj85d434CUXq3k X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-19_01,2021-10-19_01,2020-04-07_01 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_cryptodev_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. */ > > > > +/** > > + * @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 adva= nce. > > + */ > > +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]; >=20 > 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. Yep, I missed decrementing it. Thanks. Will update in v4. Please review others also and ack if no comments. We need to close all the patches(including the control path) by tomorrow EOD.