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 4AFFDA0A0C; Thu, 8 Apr 2021 18:58:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB69A141181; Thu, 8 Apr 2021 18:58:36 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id E6B7E14117E for ; Thu, 8 Apr 2021 18:58:34 +0200 (CEST) IronPort-SDR: BgogMk/CRdX5blyc3BnoaOcM0qDJD4S2N5yU6wKAi1EjOFDVdFatyvIVl0geFO0wWvWp1IcWJj 4tvvbQ5yshVg== X-IronPort-AV: E=McAfee;i="6000,8403,9948"; a="254924804" X-IronPort-AV: E=Sophos;i="5.82,207,1613462400"; d="scan'208";a="254924804" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2021 09:58:33 -0700 IronPort-SDR: xH7zovVUH8MXefYPobGIlp+z71yhJZtfHS8AnB/l0QbamrL4a5o9UJHchA6gFg6Pd0fk1gmffS /x59Mi405osg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,207,1613462400"; d="scan'208";a="415858356" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga008.fm.intel.com with ESMTP; 08 Apr 2021 09:58:33 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 8 Apr 2021 09:58:32 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 8 Apr 2021 09:58:32 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Thu, 8 Apr 2021 09:58:32 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.59) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Thu, 8 Apr 2021 09:57:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G9DB3R7kxsbE6H4uTItoegvEYAgGTom5nmlhfx5mDfUL0cbSLhYbzdStw41v6Z6OvtNHsEq0mT7PwCIHVDADcUfZ8oChO04QOas8kBp7iUR2OMCxh8vd3atA84TPQHiZG8LowvSE9B7F+w4bh01cHpNJevD7EwEOn7GAJv/tgNj80s/EKEW5CrqnLM7vBmuOwCFRGh+11j8Aek9u5E5O9zQNI6Es3FaNzY6KrdYi/Q2xAe4D6y6DaX1ykhqQ0NsKsU4uaIpaYpf/wLDWWJqZMNSalHVVAfPzCn01+yla585MuaWy5NLe9Dzz6UgKyCN5knBqfFraRfitYD/Wmc/DMw== 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=2qUmZesPOY5u77Go+LIs5ofg7+7CcVuDzZag9a7NIZI=; b=mRlzC63z5a2u/NUkm51Ci5F0jHm/i3kjJ7NXjBSQR0ilF/To4bmd7W9NSzs2TI8sjYU+oovIZiKd8iWwXw25qO5NDQ9//uVn73WIVmdGqoka5k2dWY5wzmDfT8TLXu9qWv1QrxZbdD9o+Q3smizgw0aAJAojwHGWbv2xvWqu8eUHkqOrU1UyjyDN6T+ZR/e47kD5qXcRfl6DiafLgSoirRR2KdrmCkV29SqQOfvQ019W3hvQQwOB/SRlW/Wxu0ofgGlb2Gh4C95dMwF0MJiswV3C9g6NVuFBUEphz0TrMB48ZjH3bgoQaaJpmFJjbFSvgYTr+TI0GXj8LW4VpLNNlA== 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=2qUmZesPOY5u77Go+LIs5ofg7+7CcVuDzZag9a7NIZI=; b=t8tdveI7x4nsBc6h1IVJAXQOuPRBkjvlyFzuh+P8Q1RdsHoYK+3+DY+IhD6h2QJmlWMjb0smyk915bpLI8T0FY3D3Zud130MItiUF0jcyHMQpc6fUhpWaEVoYsED6K1GPPJjXBvLbW/ZfU8voLgvRlOZhEpCbw+vEgiBoxn+8eA= Received: from DM6PR11MB3548.namprd11.prod.outlook.com (2603:10b6:5:143::18) by DM5PR11MB1770.namprd11.prod.outlook.com (2603:10b6:3:10d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17; Thu, 8 Apr 2021 16:57:18 +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; Thu, 8 Apr 2021 16:57:18 +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+Yc7oWy8t5OqqisAQwgAOFxoCAAv2SYIABi6oAgAAgziA= Date: Thu, 8 Apr 2021 16:57:17 +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: c876f7b7-7583-435f-c6c3-08d8faaf5e86 x-ms-traffictypediagnostic: DM5PR11MB1770: 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: rrxLZL9wDZV6xSjQppo9iLckP9BhbWP2GlJPLrrUP/+ypBUS0vtIrQmMIdNJkFIbjn5cHsdj0z8c4bcgXi7RAsvOcvO+dBP1ECpRpIOdJDnbdpbjE16J2d1PXk261/viueOb1zI1lrUDg0rtGEP+99HcaiALy5zbwMU2uf92xraV1+CNiNAHtVBRys5OOzJArPRyO73wDK0c7L7GHAxYIgLJN34AT7r980WLSOxTczOZq1OFJi/Qu13j4DH1tsbibVg2mt8k0OL+qAqDJ6ad5XhpNVyRSYgYIGnhW8jZJPtk4/4B4TYQ9+pzYrXy7OMTPD3roAyU/NyRwfLRyEQZ1xMUw89NdVs/NkV8KVzrRI+kkgLLC4PqUxwJ5Fagm2DkgSk3l/vgBgLudb3b831Y3yCVoZ4uXDXpjIo7BEL2xNGSGQuY4FIitJPQcx5XESoLfT6rPwvD/mrWXpM0562RCE1oxBBoEP9hm1FNqmmPCWZLC9gEk12b3ebPwZu04xljIDTRcN1TnR5ckqq6mQzyVPDvEtcWAuoXCbdku/kItsAT/ZZ04T7GpvQCucwhPhPQqM9+wFIQFMwqIjaLgvek0CmK8FiQsELXIydvKC89Ad9gsHWivYiOO7YTdPPVKVLywdYyVeCBVn8XRfWV9UqCzDSe82P3GO0q92apK9CFya0= 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:(376002)(136003)(346002)(396003)(39860400002)(366004)(8676002)(86362001)(107886003)(54906003)(5660300002)(52536014)(33656002)(478600001)(66556008)(64756008)(66446008)(66946007)(76116006)(71200400001)(66476007)(8936002)(186003)(83380400001)(7416002)(4326008)(26005)(55236004)(316002)(55016002)(9686003)(53546011)(6506007)(38100700001)(7696005)(2906002)(110136005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?uu8w0eVhYNFIGwwGOWUfNMAn9Xuhy2baCTMmS6SIubj0wflEUXnWh2l1Dao4?= =?us-ascii?Q?AShiboGEcS9lxrSjHplT3DEX0OK3iSWDQKk94EaxphOsDxEnO0PWVyrMQ3in?= =?us-ascii?Q?GcDNeWBnBuxbwkSR2w8N7pkxWFTHyPOmAUYecnuHPem7qFZ7oFcqlWnvy+9V?= =?us-ascii?Q?s6LnjJTzJ7PX9shtiVC9glMSkGUKhQ1alphM036MK8kHkcBSfJrcfSM74vIf?= =?us-ascii?Q?joQvCW7PE/pLhio49jcK57n9FhsvLeg5TqiWzILrMzkbH1HiQ5FQZuGosws8?= =?us-ascii?Q?eoKXULKpCVtVerm3QKkiWaSeljYGGQetzQ+5pewi0+X7jbzzvB7LHerDusx8?= =?us-ascii?Q?YcqQOkmEb/GYh2kQbuFVt440oh8VH3IEDc82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W1X1PXE5LhgWwJW4ZwFlj+00gQ/AG3Y+JTyk/iZb?= =?us-ascii?Q?Cu0=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: c876f7b7-7583-435f-c6c3-08d8faaf5e86 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2021 16:57:18.3277 (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: lobo2qFX6yUEUErAMPTA9xOryvhAzKyqc1jbLAQERs3MoqLUYqKr2ALago2aeKtlBrglbBiLyWePk6Vmb/pWk07P36v8Jz7brzhGLMW3lD0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1770 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: Thursday, April 8, 2021 8:27 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 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 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. > > > > > > 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 w= ork, as > the events coming In this API can be for both crypto as well as eth tx ad= apter. > If this check is there, all events will go to crypto adapter. >=20 > In the library or the driver, we do not have a mechanism to determine the > destination of the event (Note that event type is for source of event and= not > destination). > Using some fields of rte_event will be a hack IMO. >=20 > The solution proposed in this patchset is not a hack. Here is a reasoning= 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. Hence = 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 crypt= o > adapter or eth adapter. > Moreover, the solution is very similar to what eth tx adapter already sup= port > (a new API to enqueue). >=20 > I hope this make things clearer now. Yes Akhil. This makes it more clear. Thanks for clarifying. >=20 > Regards, > Akhil > > > > > > > > > > > > > > > > > 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