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 9672CA0579; Thu, 8 Apr 2021 20:44:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 428B41411A6; Thu, 8 Apr 2021 20:44:59 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 66461141171 for ; Thu, 8 Apr 2021 20:44:57 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 138IQ84a005244; Thu, 8 Apr 2021 11:44:56 -0700 Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2106.outbound.protection.outlook.com [104.47.55.106]) by mx0b-0016f401.pphosted.com with ESMTP id 37swewjbcv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Apr 2021 11:44:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VrSZnkFMyRL92P0eB5DYW8vW2bQPzqouv/dCmE/RWZ+YZsgsmtvXQo5TgA2HuhWC++HiDYr7RDjr7KRcKxblabwQLljhxndJALJyZiWRpojsqZO6o6+nEX47s3JVmCsccoWXMJ58MVcOeMACDw97xg1kmiXpFvA9i9ZapREf2HUfqI6flF+bgkGGLjJaSLPMHlZ1hLZxUDrDysD8krJ5CQSGjqhXLjrgOSmhVfoX10Jyfr+qKztaTiRyC1Fq1RCf+bduVS/XyzBFuG6yBC5XpZ1LLeUHSKotCR9zjwP7rni/uDLPEKLVdxU//z2vNJTiFDk1smDfXoKZGKN83785lg== 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-SenderADCheck; bh=06nJKTSBmR4Bz62sevCn2xZV3EyOoriBdEKVcK7Fl84=; b=d3RD/TaITwDuYnRvUow2GHR/4MR89d9AQPBN9slj22meGumD14admiEKoWOOTCqx7CCFM1mbusN5h98EN9TIQu7ON+ikNp69/7XfdD9uOtxCoiU9WdrBwmDt967tLwVrEU2J1datbVlOduU9rin0kSd24PxCY+jiRRB3QRv9oMxOEZKgUO4+8uHo6WU8xoFD+43MFtfmE5XTB6NnCZqikaSDvxhyvIxlFweFqSXJFltdOjf9X7jAVargSPl8YM1UYqzKOvJH1B5X7Q4leTiZpXGfMRDFP9TjVxVv0a7CoURUmVc39E9rLMIDPSpSbEtN/YIIFUuwjqxxOLxVJCGr/w== 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=06nJKTSBmR4Bz62sevCn2xZV3EyOoriBdEKVcK7Fl84=; b=Vb0Cq8KbJgCZkyIylp6JMCft4OHohKanMvsPAaQ4cjfFzPvKMJg9p7CaMgDhsEBOCRFwx7JXyWlchjfId6soof2feOQXbEEcw0rS/JCpy4U3sSvy3afheCEB2Zgne2OfEMR27QeBsgAbOa4brDvdJofo0YzPF2Pl+KYeGRqXhKI= Received: from MW2PR18MB2284.namprd18.prod.outlook.com (2603:10b6:907:10::16) by MWHPR18MB1247.namprd18.prod.outlook.com (2603:10b6:320:2a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.18; Thu, 8 Apr 2021 18:44:51 +0000 Received: from MW2PR18MB2284.namprd18.prod.outlook.com ([fe80::3168:cb00:6607:743f]) by MW2PR18MB2284.namprd18.prod.outlook.com ([fe80::3168:cb00:6607:743f%7]) with mapi id 15.20.3999.035; Thu, 8 Apr 2021 18:44:50 +0000 From: Akhil Goyal To: "Gujjar, Abhinandan S" , Shijith Thotton , "dev@dpdk.org" CC: "thomas@monjalon.net" , Jerin Jacob Kollanukkaran , "hemant.agrawal@nxp.com" , "nipun.gupta@nxp.com" , "sachin.saxena@oss.nxp.com" , Anoob Joseph , "matan@nvidia.com" , "Zhang, Roy Fan" , "g.singh@nxp.com" , "Carrillo, Erik G" , "Jayatheerthan, Jay" , Pavan Nikhilesh Bhagavatula , "Van Haaren, Harry" Thread-Topic: [PATCH v4 1/3] eventdev: introduce crypto adapter enqueue API Thread-Index: AQHXJ+H7QHX7fl5iEU6e+axEBTKZ86qiuvUAgAN2uaCAAwPbgIABExxQgACYDYCAAB23wA== Date: Thu, 8 Apr 2021 18:44:50 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=marvell.com; x-originating-ip: [182.69.47.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 44f298a0-5a1a-4ae5-3717-08d8fabe647e x-ms-traffictypediagnostic: MWHPR18MB1247: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OYuRkmCka0yevD343avPODmE8QVhkJH2DpCALPUqBJ1jmeBWGHo4juOK+Rn3eKU7R9TnALHMK49kSru4ekJfbvVQJj9nOQC4e/NzaX30N939VXnxZgy2L/fVxyT2J70xlg5sGFngzIMsRqo1Pz1SDh1v+rAKoVzAW0V4oipdD12tLYdLMPxr6YW0yp+pbXxlY9fx/S9p0itwcbwzz7yljxeJ+Slrm982xjD36aw7A/Ve+ZXrXRsDYF06QicCcOYO6/amSNA4hPI68cEmJSPPzn2p8uw+TgZ5UKipCmOokuu7aXdHVy3xYC78JN7ka0DQSjGH7fdAZvFPqJA2kD38yMyukeRb/jVgpIGNqgrJf4AgjHDcBfO2feTHT7TA7UBak4ygpLcWvl/mATOmUG/Mne/pXnb2P7g5wpR1dbdTsPRwRhSzeWHGLz+fXThd+D35EtMfAQzOg8+pCzUIJ6B/LtUbhb9uJZO6nzigkNgqEyu0Mryff59QwsD0frtIIvWsI1uS7E8dXB0bw0CjbMGW3zzQmgCHrZqE9JULxuWv1RCmLTC2NctJ9ZlqmULCwFFFHCvpmyUNx5I19+4Pyh0+UpW8i7IrcIxrufD0gtRgU+7oySUrxtKU1wGcCTWmsA1MQYbgrkGhpBK//n0XlXdTuQe4qNdIeDXWfBHwGvfbASU= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR18MB2284.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(136003)(346002)(376002)(39860400002)(71200400001)(83380400001)(64756008)(5660300002)(7696005)(38100700001)(478600001)(52536014)(33656002)(186003)(7416002)(110136005)(4326008)(316002)(54906003)(2906002)(9686003)(66476007)(26005)(66946007)(76116006)(66446008)(8676002)(8936002)(6506007)(55016002)(86362001)(66556008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?YGmcN3mqEPePrXy1ehjPDt71goe1W9kxAg9r/+1jDZcOB03smG+giDr2JyLJ?= =?us-ascii?Q?qUXnTcvaBi6jL59OpySnu5e5W3ng0km4WK6AnOxvQcTeDjBwyBGyNCYaEnLR?= =?us-ascii?Q?yGmLBBnYqTT0EOH/cTDp0ZngBwO55uOViVEcc0wv1BkuWStnyc60XLMORT2i?= =?us-ascii?Q?jdO3GM4bVxof8fjvL4dusaJXTwsui5NY21sAN0gToD1XaDuLzpcvOkyj7zCe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ZExwsO/xK5TQL6AastFhxRrqugg5wLf?= =?us-ascii?Q?5esM+dzD+9H7nSLFuvjCsQqhSky+nKC9iu1QbhQu5rphqA//xYCQejyJfEOY?= =?us-ascii?Q?a2tUr1zlIk+JUVzUMq5QjILQ+USUwH8jpNws5LmUA9kGbv2TNn6TvrIm1sqn?= =?us-ascii?Q?5ZmNAQGSYGl9TihBrRo+wMSW1XE1g5Ml6jaF+nwTH0Omw8Pss2rF1vE1nxCC?= =?us-ascii?Q?ULk=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: MW2PR18MB2284.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 44f298a0-5a1a-4ae5-3717-08d8fabe647e X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2021 18:44:50.7290 (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: TvSlslcOKQV+hTgC4lreMuRJFRl6k3wyS/MA4KGS9O2EYoqwJnYaDbP+7Xt3kxXx65IEzDNoZnFcBN+ZGQpxwg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR18MB1247 X-Proofpoint-ORIG-GUID: moWPr7rluRLK8GDQbODaMxSatlhreH3r X-Proofpoint-GUID: moWPr7rluRLK8GDQbODaMxSatlhreH3r X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-08_04:2021-04-08, 2021-04-08 signatures=0 Subject: Re: [dpdk-dev] [PATCH v4 1/3] eventdev: introduce crypto adapter enqueue API 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" > > Hi Abhinandan, > > > > > > > > > > > > In case an event from a previous stage is required to be > > > > > > forwarded to a crypto adapter and PMD supports internal event > > > > > > port in crypto adapter, exposed via capability > > > > > > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD, we > > do > > > > not have a > > > > > > way to check in the API rte_event_enqueue_burst(), whether it i= s > > > > > > for crypto adapter or for eth tx adapter. > > > > > I may be missing something here. Crypto adapter is an atomic stag= e > > > > > has a port which is setup during the adapter configuration. > > > > > So, application enqueuing events will end up sending to the crypt= o > > > > > adapter (As the adapter dequeues from a specific port). > > > > > Still wondering why there is requirement for new API. > > > > > > > > While we do rte_event_enqueue_burst(), we do not have a way to > > > > identify whether The event is for crypto adapter or the eth adaptor= . > > > > At the application layer, we know where to send the event, but in > > > > the event lib We do not know which port it need to be sent. > > > > IMO, event port is specifically designed to work for OP_NEW mode. > > > > I did not find a way to make it land into crypto adapter. > > > > Please let me know in case there is a better option other than > > > > adding a new API. > > > This looks like a hack as the new API does not actual enqueue events > > > to eventdev. > > > Rather it directly extracts the crypto info from each event and then > > > enqueue to cryptodev. > > > > > > How about doing this (No changes to rte_event_enqueue_burst(), PMD > > > takes care of things ): > > > uint16_t __rte_hot > > > ssows_enq_burst(void *port, const struct rte_event ev[], uint16_t > > > nb_events) { > > > + struct otx2_ssogws *ws =3D port; > > > + > > > + RTE_SET_USED(nb_events); > > > + > > > + if (cap & > > > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) > > > + return otx2_ca_enq(ws->tag_op, ev); > > > > > > return ssows_enq(port, ev); > > > } > > > > > > Everything will be hidden under the callback and application will not > > > have any changes. > > > > > You want to say we somehow save a flag in struct otx2_ssogws from the > > capability And check that flag here to enq to crypto. But that will not= work, > as > > the events coming In this API can be for both crypto as well as eth tx > adapter. > > If this check is there, all events will go to crypto adapter. > > > > In the library or the driver, we do not have a mechanism to determine t= he > > destination of the event (Note that event type is for source of event a= nd > not > > destination). > > Using some fields of rte_event will be a hack IMO. > > > > The solution proposed in this patchset is not a hack. Here is a reasoni= ng to > it: > > - The application when dequeues an event from the previous stage, knows > > what to do with the event - send it to crypto or send to ethernet. Henc= e it > > makes sense to call the different API there itself as inside the > > rte_event_enqueue_burst() there is no way to determine if it is for cry= pto > > adapter or eth adapter. > > Moreover, the solution is very similar to what eth tx adapter already > support > > (a new API to enqueue). > > > > I hope this make things clearer now. > Yes Akhil. This makes it more clear. Thanks for clarifying. Do you have any further comments on this patchset? If not, could you please= ack it?