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 9D44DA0093; Mon, 2 May 2022 11:01:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3DD5740F35; Mon, 2 May 2022 11:01:14 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id DB9F340E28 for ; Mon, 2 May 2022 11:01:12 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24238Xn1030645; Mon, 2 May 2022 02:01:11 -0700 Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2175.outbound.protection.outlook.com [104.47.56.175]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3fs4mkmwv6-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 May 2022 02:01:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eT8kI9Ft3hb7DKhYYU1oKKLbL4lq6tOyUW7s8bNrX5DklHnM/cMCNNVNL+WsVww0MNQYMKSxbPODg5mrxyqZfqTTE6y3iqSMEu5agFKKzFFLgbH88Q+rMry0+KdB7J1QMlz0O7qtOyFqORJVxFrQLxNr/An7QIXHo5iINssOxvObPiibVGPP+sjwpNngtwvXUDaKBh0V1CpxodTz9n0MkJq9GhzxNatCxLmju3InrVx3g+qnViEhUNVNo45K7JxJPk5aGYEdeDMmxfZ3/ZPyhWBE5vT/0K0ezct5VjlF18pJ4gfaOhaS0d8PTFTxbNhQPLqW0tGZtfIqtdAlMUGI/Q== 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=N0B9BJE6wV9p4Q8afWJaG0tZkQR90fMjhOr5RzKGIio=; b=ORhdefFZWtskaTmUdbrx7hDreLsautA+29YhUuw/XXfnAJOLMa0yHlbIedn20MjD5LQs8DQY0emLMG3eELaCvBa8z8gzPC3AT96hSzy2BucbyPgMfNNQxcP4nLGiaKN6vmgFyaH6Q1HVZanh07Z8s7nAr2haoEEVJGqv7MhIwn0IgUYli8Gr+z+4QGmAWG/N1EPagn2u9cMrJ3pTr7bvUhRAKt/Rl6mYTnT81KQKt0S2LSiecMP78Cli7dODx+4a4GbOeN49NMO7JZiEtZ1JwNH15/I+SoEpH27GE5QGMIZktzNygeG0DNnlBRsL9DabsWLx7MJmknCvr+RrONzXsA== 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=N0B9BJE6wV9p4Q8afWJaG0tZkQR90fMjhOr5RzKGIio=; b=YFP3Txk5j4+cUF7NeAF3cM5KASKZCNKQfEKoxQ+ONKThJD7KbQuCMFqd1jWVr7GHMvDKTh6g8Exf7frbMRtJGGVuW8kxfm3ngwUWdhIqcgCvP+SrqFaGMpIUZV+HcYDcQNZQ6BM2BfiZ/I3tDh8XnHjb+81WiwJ44DozMg8AejY= Received: from PH0PR18MB4672.namprd18.prod.outlook.com (2603:10b6:510:c9::16) by CH0PR18MB4369.namprd18.prod.outlook.com (2603:10b6:610:d4::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.14; Mon, 2 May 2022 09:01:06 +0000 Received: from PH0PR18MB4672.namprd18.prod.outlook.com ([fe80::141b:43fb:348e:f3a]) by PH0PR18MB4672.namprd18.prod.outlook.com ([fe80::141b:43fb:348e:f3a%5]) with mapi id 15.20.5206.024; Mon, 2 May 2022 09:01:06 +0000 From: Anoob Joseph To: Akhil Goyal , "dev@dpdk.org" CC: Jerin Jacob Kollanukkaran , "abhinandan.gujjar@intel.com" , "jay.jayatheerthan@intel.com" , "narender.vangati@intel.com" , Volodymyr Fialko , Akhil Goyal , Fan Zhang Subject: RE: [PATCH v4 1/7] cryptodev: add APIs to get/set event metadata Thread-Topic: [PATCH v4 1/7] cryptodev: add APIs to get/set event metadata Thread-Index: AQHYXZEz/WCg7KZmNkWJt3cideDjx60LSpMA Date: Mon, 2 May 2022 09:01:06 +0000 Message-ID: References: <20220421143720.1583062-1-gakhil@marvell.com> <20220501192457.3670278-1-gakhil@marvell.com> <20220501192457.3670278-2-gakhil@marvell.com> In-Reply-To: <20220501192457.3670278-2-gakhil@marvell.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 01bb4837-a867-4a85-f7e7-08da2c1a4b15 x-ms-traffictypediagnostic: CH0PR18MB4369:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: irb1cv8E1vt4jpJ4R6Ota09ofcdeJnu7HCymPLct75TfTBaQnE1x17wH0IwLh8pxgYfdlZC0n/NgqACg8gZgdm9/aGvh99zkA+m8Ix8JLbayDx3Njryv4szyHLsqaKl6hzAlovAiAbST9BQx+nfgNiODcqfiAwvfrKbjMJrWV63LkA/f3oDLZY7ph4t2vJP/f+JUanJ1pIjfNtzj1LRDIO19mX2id9twfu7l7WjAbp4+YXGuFIpNE4v8Qo8nO2wATdb7U8QXmpn5wdA0Zq3YR8eY9eVzKDNWvH/7J0j+SiVa8T+6BC37qk4qXupkMfpcU0IX822XnUFVs/hxbOSJ9P0UfJt2rUxu2V5VY6jGNa0BSgWPuDKSV5cf0O4vw5jeS60UVFLRic/QpZDZmOaODQl93uiZQpQ7S106IgU0/ZK9OGWJu+LATLvfAQhXE2exxaGwuzNs3BDrilGjyFRVd9dJlcnSzZMQXBLDeAmXIkKfZ5G/5WPj6kEqTx2tftYBQEFFUUhN9ndtCVB1O++27AXtaBmzQ2PT0ErxL/8uXB/n+8Qa5G3BW986+jlvh7yivF688YjCp4Io22mKnIdp8qh3KaNQpY8AeQBOtJwb4t+emWp/bnHa657e690cDFb1mF/DvA8RfkjNdSlArMi0+g/OHtlHHsAK+yJvgeMkGczbtxODF7it3r3xFRLC20GZ03gQoOMMMtnIDa5vhSCFTw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4672.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(7696005)(33656002)(55016003)(71200400001)(5660300002)(6506007)(122000001)(508600001)(52536014)(8936002)(186003)(83380400001)(26005)(2906002)(86362001)(4326008)(9686003)(110136005)(53546011)(66556008)(66476007)(66446008)(64756008)(76116006)(66946007)(8676002)(316002)(54906003)(38070700005)(38100700002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/tJy1OBW5dfmAr5aQ2UN54VvGzHhHSl9qbpJ0c9TBhuqTaSB9aHJu3Uy7r6d?= =?us-ascii?Q?r2jMf43PKpTjdgw2Zbp4B0TxLBZVzyCSepEaeB6NbP0vdeVkNb+fi1l1OCMA?= =?us-ascii?Q?AGpWHgezZuEWKpesQKR6WrMaAk0UcXLQcdYjKVSA1iMzhodku6Mq6M2I2SfE?= =?us-ascii?Q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omcwKHlpw/?= =?us-ascii?Q?UjBGfHtdFz1qoQWREuoKGJswzpEOCLZn0baN1lgCNSjGzlPE4N8Xv/EHamgl?= =?us-ascii?Q?B2a/VfcNE/6Xh9nem0xPLjhQEXbguDf4rj03uGqghlVHOiz9VTJkt3I0V1nW?= =?us-ascii?Q?SihfPTVsa+3Hvwh53vpdlkYsNeXrfCADhvC3im3bQYuB6dI8QfihaD0KTsl4?= =?us-ascii?Q?PvFqVQamCzKXQM14pJ3ZSbgLqg2CB9Ek5aYfOrKFDdUJHZsh2SjboGGg1dEj?= =?us-ascii?Q?UDvuV1DsKymss/tljZtY6uTVe2FpSqKoAv5ySeu85U5h78lstaC4wSlqhQxJ?= =?us-ascii?Q?eU/HxxhG9llIOgazL9AFbMyjPJ26biGgnxBqs7QvXjbOC7TLEsEd4KpYIKZr?= =?us-ascii?Q?fdX1z2jWIwUaVrojDkIL+CdfRJ9tGavoqVvPHCid3VvHSbJp0W8/x5vaUcd6?= =?us-ascii?Q?+CX9danrGucoF4NjOmYURKEf2jSDZukjX2tm/SqPK4hh94Ccqkla985PDBoq?= =?us-ascii?Q?91zGIMVsGthgwwZO00hCw+j46uANGMuWytlNDtfEv/7k0IbSo1a1Krq6d0t7?= =?us-ascii?Q?culfOkmrHkn+BSPI/z7hUguW4rt6JmC+2QlD8euoI6/k8PcTN4ZGzhJ/gsto?= =?us-ascii?Q?I9p0QmtvcPSQ++OAYJet9Ky7+0xyhqS5fH2xoZ1/fVuAHPQiMlbtByJuW99/?= =?us-ascii?Q?pE7rIDkkcQ=3D=3D?= 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: PH0PR18MB4672.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01bb4837-a867-4a85-f7e7-08da2c1a4b15 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 May 2022 09:01:06.6380 (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: zQKfQrjU/hpRMUUBmxl9tESt5KLsbADVHE4ZmWhSRXy9JkftSBI3Ww7Huc5zemF9Fwph9ntRW2aXHgYOtRD0+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR18MB4369 X-Proofpoint-GUID: 3KtNs3Ou9pfeZqaAdl6o-Hjwo4GAPLM2 X-Proofpoint-ORIG-GUID: 3KtNs3Ou9pfeZqaAdl6o-Hjwo4GAPLM2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-02_03,2022-04-28_01,2022-02-23_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 Hi Akhil, Minor nit inline.=20 With that addressed, Series Acked-by: Anoob Joseph Thanks, Anoob > -----Original Message----- > From: Akhil Goyal > Sent: Monday, May 2, 2022 12:55 AM > To: dev@dpdk.org > Cc: Anoob Joseph ; Jerin Jacob Kollanukkaran > ; abhinandan.gujjar@intel.com; > jay.jayatheerthan@intel.com; narender.vangati@intel.com; Volodymyr > Fialko ; Akhil Goyal ; Fan Zhang > > Subject: [PATCH v4 1/7] cryptodev: add APIs to get/set event metadata >=20 > From: Volodymyr Fialko >=20 > Currently, crypto session userdata is used to set event crypto metadata f= rom > the application and the driver is dereferencing it in driver which is not= correct. > User data is meant to be opaque to the driver. > To support this, new API is added to get and set event crypto metadata. T= he > new API, rte_cryptodev_set_session_event_mdata, > allows setting event metadata in session private data which is filled ins= ide > PMD using a new cryptodev op. This operation can be performed on any of > the PMD supported sessions (sym/asym/security). > For SW abstraction of event crypto adapter to be used by eventdev library= , a > new field is added in asymmetric crypto session for now and for symmetric > case, current implementation of using userdata is used. Symmetric cases > cannot be fixed now, as it will be ABI breakage which will be resolved in= DPDK > 22.11. >=20 > Signed-off-by: Volodymyr Fialko > Signed-off-by: Akhil Goyal > Acked-by: Fan Zhang > --- > lib/cryptodev/cryptodev_pmd.c | 16 +++++++++++++ > lib/cryptodev/cryptodev_pmd.h | 36 ++++++++++++++++++++++++++++ > lib/cryptodev/rte_cryptodev.c | 44 > +++++++++++++++++++++++++++++++++++ > lib/cryptodev/rte_cryptodev.h | 22 ++++++++++++++++++ > lib/cryptodev/version.map | 4 ++++ > 5 files changed, 122 insertions(+) >=20 [snip] =20 > diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.= c > index 3500a2d470..5ebc423afa 100644 > --- a/lib/cryptodev/rte_cryptodev.c > +++ b/lib/cryptodev/rte_cryptodev.c > @@ -2051,6 +2051,9 @@ rte_cryptodev_asym_session_free(uint8_t dev_id, > void *sess) >=20 > dev->dev_ops->asym_session_clear(dev, sess); >=20 > + if (((struct rte_cryptodev_asym_session *)sess)->event_mdata !=3D > NULL) > + rte_free(((struct rte_cryptodev_asym_session *)sess)- > >event_mdata); > + [Anoob] rte_free would do a NULL check. So the other NULL check may not be = required.