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 4DC4DA0A0E; Wed, 7 Apr 2021 17:28:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EED62140FC7; Wed, 7 Apr 2021 17:28:34 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 7A2E3406A3 for ; Wed, 7 Apr 2021 17:28:33 +0200 (CEST) IronPort-SDR: KIum3oRLcCUK0h2FYTyLGpAUPOSGeMHM7QwTYs/D38esK8kpIfO6XYsMWFKHiePr7R+Mp0MAVS QSbJLPFnZxig== X-IronPort-AV: E=McAfee;i="6000,8403,9947"; a="278598276" X-IronPort-AV: E=Sophos;i="5.82,203,1613462400"; d="scan'208";a="278598276" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 08:28:32 -0700 IronPort-SDR: YR6R2tvzylS9neQc5x4+52kM1cTsJ9Vk38rb06va5bnsOQzGD36fLIWO6TNijEohGiI3WMPkft iEyar9abwHaA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,203,1613462400"; d="scan'208";a="530244551" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga004.jf.intel.com with ESMTP; 07 Apr 2021 08:28:31 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 7 Apr 2021 08:28:31 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 7 Apr 2021 08:28:28 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Wed, 7 Apr 2021 08:28:28 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.177) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Wed, 7 Apr 2021 08:28:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=arZcXL3dyO7RuNTyZGX8tliDYjzLjSEyGqJG2j1rL5JPepV9hCV6075EpMmR5GWM8k4379celzV0lgJmVOB5y0Bi25/2MKywhXWrUnbXjVlPHQHHWWu9K8njVDvZOKW3z2DMo6DQKc5ahvdoy54rhr3xe//r9voLX4fIGu6HKs7UJfxfCQeJ46ASTY/i9xNYQoi4A5TswmvW/kOf+27toTPFE54ytk/0ZHlWAMkLa4g8VjZ4TUi5bXDlJnLe5I+F52sKctC5ephTXAvz/Q0mxPryWFclBzWf8UCnLz1BsL/NqAJQizCgQOndCKgut7Dz1aRi7iREkQK/geBGF96A9w== 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=/HsBy8F0YM+MBktWCxk2tpuKMSNQ4xAJNncpCnb48dY=; b=Ke3SGe0sLJvIPdK2EjYst8QeV5lFIMxZPAtMNeVQGNn7Xj17e9dveCOcdzfg/acxr394C2EieUu5zAyfnMYvEOc5D1wECG8K47cW05fF7pIx0t+nybUN6lue+NG3QdrJ3uZqof/Ik6PQ/V59ygnxtS2fg4tLC9k3BLIIHyP6MjiCc7xOVfR39ownr9vxJ+7dbLLxhZ2SbFjyykjfR/mSVy5jvqtNEvZOlJxo7zDKC2721qmdp56cvvZfIINVmPbuEsLR/x71QaCOxT0WP8E+NfufPMwLdnip2NnEqaze1jVKj/VdEMSmMZgUAYKmpTV6lYxQNdMcgbd3kSzO8TrUdg== 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=/HsBy8F0YM+MBktWCxk2tpuKMSNQ4xAJNncpCnb48dY=; b=mrwwal5K0sQ6O2IOt7kvRlBdmR0muJUvFUOyKBnNG552MOeVH7+mNhCyuE5ThnJkHF4nRLIghTeEFM7bepJs9bTBamjRp7a9dhDGqldJq6zFect5kTJ5Rn8ZRUvMdbySl0yKvFF9ctjbqcow5UaFEXSX+xulWIg8BAYa/7rTRAE= Received: from DM6PR11MB3548.namprd11.prod.outlook.com (2603:10b6:5:143::18) by DM5PR11MB1468.namprd11.prod.outlook.com (2603:10b6:4:4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.29; Wed, 7 Apr 2021 15:28:25 +0000 Received: from DM6PR11MB3548.namprd11.prod.outlook.com ([fe80::b865:77e3:1509:e121]) by DM6PR11MB3548.namprd11.prod.outlook.com ([fe80::b865:77e3:1509:e121%3]) with mapi id 15.20.3999.032; Wed, 7 Apr 2021 15:28:25 +0000 From: "Gujjar, Abhinandan S" To: Akhil Goyal , 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+InK6Y4FrRP00+Yc7oWy8t5OqqisAQwgAOFxoCAAv2SYA== Date: Wed, 7 Apr 2021 15:28:25 +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: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [103.5.135.70] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2de78c77-bb99-4699-a701-08d8f9d9c9a9 x-ms-traffictypediagnostic: DM5PR11MB1468: 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: LMWQ5wlTaM8UQki7xa5EToT+SJMhJEbjFtqR5blzAdmX7YRx5nMIKRcMzfPPWMkDewoEuqQ20KUC39H5HfsRZitRIYu8FV8z7lJpK4Jam+KKk3AugEecOjIc+RhgzQOnfVaIduj9rl55+c7ewMACNXXFusAYhBrONmLdTGj5ZyeOXVcNhKD3V17pJuyGNIXeG2rWhp2T11gqTGYRUu2l31w+gxbJdgcO+mOrTdcvxkURmCyafwKVFdy6YCA2fZQIeXONj1x4MF/QCOfEWy7a0vuK7v8d85ejkpHQliTMi3npY07ojmAaw7LWYpNwQVVs7ii0WpZ7P7M6ChEgJiRlie5ItbOOUaBgTOwy18zuy/kVn2wNZ4yzHzHiPnof5rtoDQ7THnDzJXn5S33y2k7Ed2JhBzi3Lf4p3b0DzrADJ1THWvAyEAEES2nfMs7ij+fpHqBEzT0nLHz2Zv/Gvf5Ko1eq+Hb0AvYO+RaZi0ULjhP/P+eqxsV/69IbwVMjm5Hzk8qnfnBXMvMFgmz0muVwWeT1yG3uTbfaAooxAbUh8PgvY15oiNxb/IBw9rfdXfiEc+T5Eyx4NvseenD4xQsWHK6typMV3wXAMAAlbSQTQs1m7x2rsL2jL+e0r1qzfQo+CcJGPuTIin/HxJQBBhzvh22bETzN01FhLH72YhtG7eg= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3548.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(39860400002)(136003)(346002)(376002)(396003)(33656002)(8936002)(66946007)(66446008)(64756008)(66556008)(86362001)(316002)(55016002)(5660300002)(2906002)(107886003)(26005)(7416002)(38100700001)(66476007)(55236004)(52536014)(186003)(53546011)(83380400001)(110136005)(8676002)(478600001)(54906003)(7696005)(71200400001)(9686003)(76116006)(4326008)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?f18S2CZCbrxiKvDVtZO8V5P132LDbhfjLNJ76ZN3HMhSGhoGOZwctGiXVTtt?= =?us-ascii?Q?uBAyYDmto30/HrdcF+tAy2fDswN8sVPA2lrrTRHKZtw7vf+BsTMvcjKwBhbt?= =?us-ascii?Q?LCCLfdfDHw/59y9nKeeLKAUcJsKLh05wYYyEwGcS/DF1L6MTAECaPidiFJwM?= =?us-ascii?Q?UJQV9GGKOw6iW2ceOecjsP4J7+q6MQG2pWMqQK5hoFryqMYnyjl/TL0snJxD?= =?us-ascii?Q?x1gaGFoHfwa9pk7lNFyQt32dm/iMAQxmyXbHiq8r6JEYHWH1YrOjcrjAmXGI?= =?us-ascii?Q?HoMNl/cV8RVJgZ7siKwWxQNXHwkBXKGbhrjyRVQBbVdAA/aAimZbb1fEvHoL?= =?us-ascii?Q?SMr4JHvSyXnkW2qJVzY355dkwPWdT29DsJSTjkGm8xumgu3PofW09Ldbzi26?= =?us-ascii?Q?JNMztptJyXtBoaFDCW7CTUN4fLy3cA3yZ/gPjlMcG7WsbCIfLPnm9XY01lEt?= =?us-ascii?Q?lsEla902x1fYcOB1251mas6ne6CkNIi5sNJkHIUgIlVukis6xJyRVt7oXoPY?= =?us-ascii?Q?GjK4t3zC3XRHOWHGgKg1d65yOAoSga7l0VO+fGmUVA0qCRU143VdJGaYIk3e?= =?us-ascii?Q?B/w2xnasB3NG41oQyVAYcxEtxAl25+i7tzdVFKGFggViBUcaSFMp0MFIwPCR?= =?us-ascii?Q?X73sW4JhI6LQtduZRKMhwc1FG9LFtjHKsyqhzrzNfaXVCMmrhJRdLgE2swfR?= =?us-ascii?Q?PjX+teK4OezzzlICquX7tGxThUcAa/Uc7jDjr3EPKcfTJOJ3KHFsnW4dTpyR?= =?us-ascii?Q?rdAf0RRjd5hpIW5daXebQSV3Medl131vvZyVVMTakb1ckVAIp5mjnEP6EMy9?= =?us-ascii?Q?baniOIjQsN+2je30DYTt7hRBpWyLTXuywWE9Jj4f66aI/1iOaeQcJSpvKHbs?= =?us-ascii?Q?aOXaQeP4IjYWKieTLATFkLRP0YjuUwlMNU6TeqXXsBjT5QEnrd7GXjMaF523?= =?us-ascii?Q?bN4boYjy+F0xG+Scgw5qm9iulkmW8zkujMzt6Exj25EAGp3dCINdXG3t3o9S?= =?us-ascii?Q?wR8QNXzh3WUsZgfRdhWpmZHtdwNxEAxvLFrcBma1a7vQ9INUbUK9PIb65wWf?= =?us-ascii?Q?LTAcdmXDzb7/gtj17r6BiVK1x23TlM3nmIOlAWepNiYwNIdeSODH9YrT+X2c?= =?us-ascii?Q?bUjZw9XSf2WedcemBYaHdsa6XkagO2ULh8LOSaDlNd2CNlJIxJPyhISn6VpL?= =?us-ascii?Q?VyFapDBcP1cCX0HhKLxlkP4Ic3l+4mu/7JvT0R80rRRzMEHsxxYFi9Wdziu6?= =?us-ascii?Q?XiUnK+lmR/OaOyf4Eb56urLoh/+QdO1yTYvLQdU5C59y6nfnUzYV4wAFoNaL?= =?us-ascii?Q?u6k=3D?= 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: DM6PR11MB3548.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2de78c77-bb99-4699-a701-08d8f9d9c9a9 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Apr 2021 15:28:25.7954 (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: ZE4jFcG130DFFVDH6zlfQQcrhALPYE/R3kHKRL9V2reAKp2uv8ZpNXNxiTRPXS3kxEcNeLW5RH9fvyj5Pr7vh/CuH9r38FC5zWqtkwYf6+Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1468 X-OriginatorOrg: intel.com 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" > -----Original Message----- > From: Akhil Goyal > Sent: Monday, April 5, 2021 11:11 PM > 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 ; Jayatheert= han, > Jay ; Pavan Nikhilesh Bhagavatula > ; Van Haaren, Harry > > Subject: RE: [PATCH v4 1/3] eventdev: introduce crypto adapter enqueue AP= I >=20 > Hi Abhnandan, > > > > > > 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 is for > > > crypto adapter or for eth tx adapter. > > I may be missing something here. Crypto adapter is an atomic stage has > > a port which is setup during the adapter configuration. > > So, application enqueuing events will end up sending to the crypto > > adapter (As the adapter dequeues from a specific port). > > Still wondering why there is requirement for new API. >=20 > 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 eve= nt > 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 n= ew > API. This looks like a hack as the new API does not actual enqueue events to eve= ntdev. Rather it directly extracts the crypto info from each event and then enqueu= e to cryptodev. How about doing this (No changes to rte_event_enqueue_burst(), PMD takes ca= re 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. >=20 > > > > > > > > Hence we need a new API similar to > > > rte_event_eth_tx_adapter_enqueue(), > > > which can send to a crypto adapter. > > > > > > Note that RTE_EVENT_TYPE_* cannot be used to make that decision, as > > > it is meant for event source and not event destination. > > > And event port designated for crypto adapter is designed to be used > > > for OP_NEW mode. > > > > > > Hence, in order to support an event PMD which has an internal event > > > port > > in > > > crypto adapter (RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD mode), > exposed > > > via capability > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD, > > > application should use rte_event_crypto_adapter_enqueue() API to > > > enqueue events. > > > > > > When internal port is not > > available(RTE_EVENT_CRYPTO_ADAPTER_OP_NEW > > > mode), application can use API rte_event_enqueue_burst() as it was > > > doing earlier, i.e. retrieve event port used by crypto adapter and > > > bind its event queues to that port and enqueue events using the API > > > rte_event_enqueue_burst(). > > > > > > Signed-off-by: Akhil Goyal