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 5B39144100; Wed, 29 May 2024 10:35:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03129402CD; Wed, 29 May 2024 10:35:29 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 7F9F7402B9 for ; Wed, 29 May 2024 10:35:27 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44T3XEXH007517; Wed, 29 May 2024 01:35:26 -0700 Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3yddnvcc9t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 May 2024 01:35:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JdCLByqxs4yztOwMjjEuM4DoW1kTrfjgFU3UU/vKONbAbWWK+oOrWSLSHaFVVcfhog7JVqQTLS5rHaIlIAaQGPpCDuahUIewXBBvuEE/vRD3szkXbxVfUn/HrImQTceaVF2WKSnwUegT6Yw90PHX+M35GVF6v7EPP3cQnO+FW+PY67ykL/trWipAmak0TPPr9FwWQkb3vo6C3Is1yFbRGK2FfKMXMzc5NVaEFRy+bZtpyuBO1HdcwUtVjysRLIl9uhWTxPL6IKuKvIxI6VcIYkBCb4nqqJ0+kQ7u8tAWLVadDcA7PkZgO0n2OX6cmrk9L/3Cd6wqOR+8/fJ6sc6odQ== 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=KP9A4hpEQL2DETKP1U4eghSlHuJy+cykI5R2bhX37cM=; b=n4jGP+jQbKh5seSsSDVUw3uerE1JFu4wesDF0bkUBJAEgenX2s3bpQnGldhQkyosRobv9f3qpSuNV6qIBJnhqbFV2VZZym/yAXlSIlxElgBjpbdQBOUzW6sCDwq3mpp5L/jl/gIJRj8fmCjWXZPFcjuCBFPnhPYAGHccmWVDPJ/8iZVIqMxNy5O7JfaH05o9Y7IjQDVgvKC1oCDjAamMtmZJSaUStOuEqwLkKptu+62K4qQQnLEax5pp/hCegftBhmduOWi80upVTxSr1QZb7ygPTOVLLhrAgGkaDRq1JdnltnXp9cEqhB+eJSKjxBbPuFyjVuwb13iu6cELsn1B9Q== 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.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KP9A4hpEQL2DETKP1U4eghSlHuJy+cykI5R2bhX37cM=; b=PKdi5JrgSDq1sTybp2RbpqBwLcfwTQaw5904VHJ3ddebJP3ArfBoP2UBY4Kd15dJl04zjuPUc4hv1TPu0WRMzJB7fR6T6oDWBOzWwBW0DvfCcRmRcatink/5tBe0XO4YoeYzBTxzvYOjQDl45XYfd/JexmJ/U4C15A1Dajy5MYA= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by SN4PR18MB4993.namprd18.prod.outlook.com (2603:10b6:806:219::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.30; Wed, 29 May 2024 08:35:23 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::3c98:dd36:4897:a51d]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::3c98:dd36:4897:a51d%4]) with mapi id 15.20.7611.030; Wed, 29 May 2024 08:35:23 +0000 From: Akhil Goyal To: Ganapati Kundapura , "dev@dpdk.org" , Ferruh Yigit , "thomas@monjalon.net" , "bruce.richardson@intel.com" CC: "abhinandan.gujjar@intel.com" , "ciara.power@intel.com" , "fanzhang.oss@gmail.com" Subject: RE: [EXTERNAL] [PATCH v1] crypto: fix build issues on crypto callbacks macro undefined Thread-Topic: [EXTERNAL] [PATCH v1] crypto: fix build issues on crypto callbacks macro undefined Thread-Index: AQHaj9XTIO40MUrBWka2XFvYjOzk6bGuJHyQ Date: Wed, 29 May 2024 08:35:23 +0000 Message-ID: References: <20240416081222.3002268-1-ganapati.kundapura@intel.com> In-Reply-To: <20240416081222.3002268-1-ganapati.kundapura@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO6PR18MB4484:EE_|SN4PR18MB4993:EE_ x-ms-office365-filtering-correlation-id: 181dad6e-8376-4a16-f68a-08dc7fba4849 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|376005|366007|1800799015|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?WBQ2nUwi+ljEw6qQYtZRF9MHhV+wCLNJUJN+WPLEhitOicJGukjRdnrNVNi+?= =?us-ascii?Q?TQ9urum7E5fEcGW1uT8CDS+vsUa6W1/mB5NOZJW/bPf99Lb0tMdLIgJbzIz0?= =?us-ascii?Q?KYE8NArVtkivMJS2H+rvZyvDVOZVbPhhrLjDrXMrsWc2N/1C7yzgkFIgnIog?= =?us-ascii?Q?wUOVoUeqxraxWrU6QjZmEuFdd//iL5pE847vkJ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P4oPe2ZTOClofPQkdK5678WGXHwt5osiJ4cyEODalO76sXDozssC6vSBVlTr?= =?us-ascii?Q?LWB2fBAvxqqUee5P5IOgHEXvQKa/yAmM12R5jQIaQUEw2Yx4E/xJabSbpVMR?= =?us-ascii?Q?FO//T1N9YT/gxq7JgMd3E3zvtAcJwH8ZiuJwVex4D92fd0HcxC2ydq+PD4GT?= =?us-ascii?Q?i4D7MNxxyyXGqO4uHXwCyUjJpl53v+sVmSPnKmW8T7aOLdQ7UIlGrndQio5j?= =?us-ascii?Q?JkKa5I9yBfJGqQuUvtvTq8zQ?= 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:(13230031)(376005)(366007)(1800799015)(38070700009); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?SnTZ8XVwxFm9gnvPDweSrrLDBgIackWEjh8EMLGTDVou1UQswBj7nYHCwxqx?= =?us-ascii?Q?k+H2jtzEX6cViFAJ6RhnQJd3uPxUAANbnZr/QugK535XYe2bSDxkYtIIEEc9?= =?us-ascii?Q?DRRIFFNbdEWDWPiaczHbKWl6ydunbV1097ch+3AFYbzGr8B+bq8FxVdD9uOH?= =?us-ascii?Q?N+ljtQz0PHqB/vzGcaG5i53cBg36Ai+XxX8oGDfTw2Q1/15ISlhgg5iLQyc3?= =?us-ascii?Q?I54VIrT7kVlupPPvWA2YVsnYsHepJyKT3daMZ7ZrDKNJ7+V37xpfHiuw4wAx?= =?us-ascii?Q?6e4Lw05Ew8nH8gdetb2tAbrX9X08qlzu0xmF8lIaj18appowhiMb95dI/4ti?= =?us-ascii?Q?6NY5PAvfNZeqQg8e0H0Rg3A13PAaCQiuoSAzwfShE6QLCdzgahCqipeMOjGg?= =?us-ascii?Q?hBaXCBTGcnzGDYIjxX+5qyX3L91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VIvoC0p35E+DoEFqtON3gkr9vsnTKWX/k0REA4OYBKaPPxb6VUjm8q?= =?us-ascii?Q?/FVdG++HncZnZHNI6dt7f7Ff+RD0zu2cxAbkZ3apa63RSwzFhZxy8qZNC1zB?= =?us-ascii?Q?STc2L7LhW28Ztq6mFYdS9YJLukBXolJotzyfqoqMcpCPec/dVi7bNBIMYvEz?= =?us-ascii?Q?Bfymky9RVmaZuMHrC7XZ8d+Woo/kVUm7B748yiVSNy2oN4nWiS83B8UyFEOC?= =?us-ascii?Q?5Pk0RYjJguJ1x92UuFjSAm4zXaWAM+Xw4F2FBs0t?= 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: 181dad6e-8376-4a16-f68a-08dc7fba4849 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 May 2024 08:35:23.2677 (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: 1ObTx7CKyCDXESGOAKJt4uXBT31qBSGwGnwoRjidoD13Fdb6mBjGugjsK2M/ysft20X6eBFhWQP6Wo4oQ2gUSg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR18MB4993 X-Proofpoint-GUID: l1NTqHkqS8tuykR5cuC2g-UZIMiWsmjY X-Proofpoint-ORIG-GUID: l1NTqHkqS8tuykR5cuC2g-UZIMiWsmjY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-28_14,2024-05-28_01,2024-05-17_01 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 > Crypto callbacks macro is defined with value 1 and being used with ifdef, > on config value is changed to 0 to disable, crypto callback changes > still being compiled. I believe we can use #if instead of ifdefs. It seems convenient to enable/disable in my opinion. We can use both, but whatever we use should be same as that for ethdev call= backs. The same issue would be for ethdev callbacks too. Ferruh, can you check? >=20 > Defined crypto callbacks macro without value, undef to disable >=20 > Wrapped crypto callback changes with RTE_CRYPTO_CALLBACKS macro > to fix build issues when macro is undefined. >=20 > As callback head nodes have valid pointer, this patch checks the next > node from the head if callbacks registered. >=20 > Fixes: 1c3ffb9 ("cryptodev: add enqueue and dequeue callbacks") > Fixes: 5523a75 ("test/crypto: add case for enqueue/dequeue callbacks") >=20 > Signed-off-by: Ganapati Kundapura > diff --git a/config/rte_config.h b/config/rte_config.h > index dd7bb0d35b..b647a69ba8 100644 > --- a/config/rte_config.h > +++ b/config/rte_config.h > @@ -72,7 +72,7 @@ > /* cryptodev defines */ > #define RTE_CRYPTO_MAX_DEVS 64 > #define RTE_CRYPTODEV_NAME_LEN 64 > -#define RTE_CRYPTO_CALLBACKS 1 > +#define RTE_CRYPTO_CALLBACKS /* No Value, undef/comment out to > disable */ >=20 > /* compressdev defines */ > #define RTE_COMPRESS_MAX_DEVS 64 > diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.= h > index 00ba6a234a..b811b458d5 100644 > --- a/lib/cryptodev/rte_cryptodev.h > +++ b/lib/cryptodev/rte_cryptodev.h > @@ -1910,7 +1910,7 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id, > uint16_t qp_id, > nb_ops =3D fp_ops->dequeue_burst(qp, ops, nb_ops); >=20 > #ifdef RTE_CRYPTO_CALLBACKS > - if (unlikely(fp_ops->qp.deq_cb !=3D NULL)) { > + if (unlikely(fp_ops->qp.deq_cb[qp_id].next !=3D NULL)) { > struct rte_cryptodev_cb_rcu *list; > struct rte_cryptodev_cb *cb; >=20 > @@ -1977,7 +1977,7 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, > uint16_t qp_id, > fp_ops =3D &rte_crypto_fp_ops[dev_id]; > qp =3D fp_ops->qp.data[qp_id]; > #ifdef RTE_CRYPTO_CALLBACKS > - if (unlikely(fp_ops->qp.enq_cb !=3D NULL)) { > + if (unlikely(fp_ops->qp.enq_cb[qp_id].next !=3D NULL)) { > struct rte_cryptodev_cb_rcu *list; > struct rte_cryptodev_cb *cb; >=20 This is a separate issue. Please create a separate patch.