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 6BAA5A0579; Wed, 7 Apr 2021 17:06:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EDE8140F7A; Wed, 7 Apr 2021 17:06:36 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 9F8D3140F79 for ; Wed, 7 Apr 2021 17:06:34 +0200 (CEST) IronPort-SDR: YJ1ucIYIZv/ktZqmfDUwa8H0+/n43+2rEcK7LuirXZK4hlEnopTmnc30eEJmqGm/q40S31dPhg 7PwuyZPmdH5g== X-IronPort-AV: E=McAfee;i="6000,8403,9947"; a="191166232" X-IronPort-AV: E=Sophos;i="5.82,203,1613462400"; d="scan'208";a="191166232" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 08:06:21 -0700 IronPort-SDR: r4cSih3krDfzezWulHVuPALZWuRH6HbrBnDEhnjXvHXM6KWK1j8d9nwovuzskMC0XMX9i7j65V hoBBGlUuNH3A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,203,1613462400"; d="scan'208";a="387032668" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga007.fm.intel.com with ESMTP; 07 Apr 2021 08:06:20 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx605.amr.corp.intel.com (10.18.126.85) 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:06:19 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx609.amr.corp.intel.com (10.18.126.89) 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:06:18 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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 via Frontend Transport; Wed, 7 Apr 2021 08:06:18 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.102) by edgegateway.intel.com (192.55.55.71) 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:06:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ae0hMEGy2a+rxsv/rpkHB74mbcHZ5mLfkhH/+f3SNedOZruaBja7XMtaD1VySOTrTJYozNdsC/YV4c1eCo8QV7d0SfSasmGA3BniMmZ5p/zldF7NKZ1w2GtVDBLYn8dFvhoYBLLz62nx5N0SF/4dGjADRuhsbv51BSGEMypsQxHAcx4aCKyCVbe0j84jdJvBadax9PsL+Qb3QpYhUpQ45iUvdMxCV6RqISTrizi07YoPlUt4hZIbLQ6OcYaNOIVe92vfVpWdY4AwwDpxrDNGrj7kbO9MJkDDXkLCNw+5ypAkk7YnYC+EOctFib0jIGE0pEv3T+/DB42OEVkcI5LKRg== 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=Uy/dKsV5/BY3yTUaH9UoejDV0WM7osvyloiqelJKlQc=; b=YdVWIDDPtlaQIf2wgzqSTxt7VoQPSKEJ+R3kgUv/kGGoJ/lBplrmLBl0xcYnIdIWkwm5sd6Hn+CIME6g3R3Ai3hdYIoS+uPaU17CBIhEtpnszk79o+NzrO4m/hAbkv7TOWGqxpoxei0NW7tzSJyjFWxnWWI8tnCCcZuhAawguyaTq0QCMHCYZy/nvaeNsHBOiaIuy+SMJzfKhHDPAVaGbUlVP2Av0vLMhORBNjgjoRgCEX4T2xF0XqTMdqFtkst0kmD8izeU3868oCeh9FfJaiepir9XEiLyhqn/8IzQQbe1HE0xhDrDGrVtY59BujngCof9nYEOlxhxOYDzN0pBkw== 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=Uy/dKsV5/BY3yTUaH9UoejDV0WM7osvyloiqelJKlQc=; b=suKyVRuRk9GaP30So3kLSGrcRGcDbHi0zYpeJAsEJ/a6j8Zl6baLpVCUMEpHB94+kkcD4TIzxf+Uj9SJIOrGt0C2DRmWtjhD+BC7F9VD2PO+qwY1/fMElhlOQ2TIlWWcUZy21UCX+45Me4MXSoj9vEC8tEPiTUjCKba7ypfYuro= Received: from DM6PR11MB3548.namprd11.prod.outlook.com (2603:10b6:5:143::18) by DM6PR11MB4043.namprd11.prod.outlook.com (2603:10b6:5:199::23) 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:06:17 +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:06:16 +0000 From: "Gujjar, Abhinandan S" To: Anoob Joseph CC: "thomas@monjalon.net" , Jerin Jacob Kollanukkaran , "hemant.agrawal@nxp.com" , "nipun.gupta@nxp.com" , "sachin.saxena@oss.nxp.com" , "matan@nvidia.com" , "Zhang, Roy Fan" , "g.singh@nxp.com" , "Carrillo, Erik G" , "Jayatheerthan, Jay" , Pavan Nikhilesh Bhagavatula , "Van Haaren, Harry" , Akhil Goyal , Shijith Thotton , "dev@dpdk.org" Thread-Topic: [PATCH v4 2/3] event/octeontx2: support crypto adapter forward mode Thread-Index: AQHXJ+IndzV60aDNMUmWtQ6ycmqvlKqilNTAgAUGygCAAZKT8A== Date: Wed, 7 Apr 2021 15:06:16 +0000 Message-ID: References: <91bf3d89521f46fb714c12d0a7f7eb5c7f7c8e01.1617382596.git.sthotton@marvell.com> 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: 86589f30-e5d8-4b98-065e-08d8f9d6b186 x-ms-traffictypediagnostic: DM6PR11MB4043: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1FK98hmZ89MOgkI3bXCH2gj7tXsemjL2luloM9tMUovWvXgjVV3ENxmOEA6qUtRVuYkQNCSRoJOWySDQARbfZfwPfp/5EZdvQlO18WrXlMf6RfX+DE+E+T056hFGTtnVXlXuOdMCDr90aLCet6AxO5xlelJ/5GC/pSX/0jF+YAFBLJPj6RG5eFJEmNI2aMDdBLQ8sUKbHBVEXtHrQbQ7rXPp2WVLXA77LZDvP+IQv2KJGTIVY9i65ghoUC1IDiTwkuBIEcHZ4Zo+Udho75XnIycioJaQ7sZco3ZTXLIqziQmNMxtz+3G+9F0ou+KwIUJm2a+hT4Zv1WZ7mnOOiIZjrJoHNQ0Yg1UY4vxUdGqe0uy3fOunS+XId+yCA7tJEI1Hu7H2M/vZrICakiVndsqW6RlRYr8YQJILunUqDWBEN/K0qPKCACOi8AsPhPqWHHdlkKgt9XgpGPdlct5YMXdq/HGtXJyjs8NN7lWSrjM0rfl8eev+DtWXXGNim07/oPM2ldGzlsAO+EIgD8kXJP5ZaDiudjfOC/btSLrhpV9UwyvqGUvo9G7SDVrJe/4yz6iY4tdl0BiGcUVy4T+JX5Db9YfZAK9MmlelLnUKNttWy4jb+Maec+KMUgf3YfQx+ksMfNgSzgtQcKAJ5k8eQr5j+xrs9ENC8Z3p1lTTg7cUGo= 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:(396003)(376002)(136003)(366004)(346002)(39860400002)(6916009)(8676002)(7696005)(26005)(33656002)(6506007)(66476007)(86362001)(478600001)(83380400001)(2906002)(76116006)(66556008)(8936002)(66446008)(64756008)(53546011)(55236004)(66946007)(7416002)(4326008)(52536014)(38100700001)(54906003)(5660300002)(71200400001)(316002)(55016002)(9686003)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?42mLV//y1MOWf6BzTdqOqblVgrY9JIkt5a97N+ee3dODq313IxH0Oc3Tp3Nf?= =?us-ascii?Q?ky4i/57IUJivSE7JTibmY2Fh7vlaQUUOp/wZQiav5xjiXlPkz2JfaaVGQxd3?= =?us-ascii?Q?028xnieiIi1qm2nxK3vMUhUp77MhfxhBghufQUSzjIcFu7BP3ub+8pG2JJ9B?= =?us-ascii?Q?zON394qMkXHM9Gd0DdqnCnRL6Mszhmy8QJJirw0qo3+JYAT7OD3KpxA2d1KW?= =?us-ascii?Q?0gBOBAx0zmk9xANmZJvS20cKRMj5/ZC0gVTFjbizH9i4ze0n0X56dM5RfXhA?= =?us-ascii?Q?n2kLTOL3yiiZfv3wEs4I49h6BRSD/jQv/knaeRu4Ar3BiWvEyfn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q8GYK2ueeLmHeoBiOzT4AsyLPT3gJ82eoj4HU?= =?us-ascii?Q?ju8MFPUPCrDSKLh+6Y2ejS17o/bi4Od4qR+PL/WeColjPe2DEqTwLfqV6zpJ?= =?us-ascii?Q?lR8=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: 86589f30-e5d8-4b98-065e-08d8f9d6b186 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Apr 2021 15:06:16.7884 (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: b69CYd1xiifHztRoAlLDEs9IJXo7KIqQVgcVXM3/EKWxJqeLUCnb6rzjptSLvSYYbRxVYytInaraZ5Tx1xnglvKC8i50iIPU5oWRrmxNhlE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4043 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v4 2/3] event/octeontx2: support crypto adapter forward mode 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: Anoob Joseph > Sent: Tuesday, April 6, 2021 8:31 PM > To: Gujjar, Abhinandan S > Cc: thomas@monjalon.net; Jerin Jacob Kollanukkaran ; > hemant.agrawal@nxp.com; nipun.gupta@nxp.com; > sachin.saxena@oss.nxp.com; matan@nvidia.com; Zhang, Roy Fan > ; g.singh@nxp.com; Carrillo, Erik G > ; Jayatheerthan, Jay > ; Pavan Nikhilesh Bhagavatula > ; Van Haaren, Harry > ; Akhil Goyal ; Shijith > Thotton ; dev@dpdk.org > Subject: RE: [PATCH v4 2/3] event/octeontx2: support crypto adapter > forward mode >=20 > Hi Abhinandan, >=20 > Please see inline. >=20 > Thanks, > Anoob >=20 > > > > > > Advertise crypto adapter forward mode capability and set crypto > > > adapter enqueue function in driver. > > > > > > Signed-off-by: Shijith Thotton >=20 > [snip] >=20 > > > + > > > + if (!ev->sched_type) > > > + otx2_ssogws_head_wait(tag_op); > > > + if (qp->ca_enable) > > > + return cdev->enqueue_burst(qp, &crypto_op, 1); > > > + > > > +free_op: > > > + rte_pktmbuf_free(crypto_op->sym->m_src); > > > + rte_crypto_op_free(crypto_op); > > > + return 0; > > > +} > > > > I am trying to understand this in requirement perspective. This > > enqueue function is same as SW adapter's enqueue function. > > Currently, application could directly enqueue to cryptodev in NEW > > mode. By having this in PMD, how is FORWARD mode taken care? > > >=20 > [Anoob] Difference is the ordering point when used with ORDERED flows. >=20 > If application is working on an ORDERED flow, with OP_NEW, application > would require to queue to an ATOMIC queue before submitting to cryptodev > (to maintain ordering). But with OP_FORWARD, application can provide an > event to the event PMD and internally it can take care of ordering as wel= l > enqueue to crypto "hardware". This becomes particularly useful when event > hardware can support ordering while enqueueing to crypto hardware(and > hence the "internal port"). Got it. Referring to the above code, if qp->ca_enable is not enabled, the ops and m= buf will be freed and returned 0. Does not this make the application/worker to think that enqueue is not succ= essful and it should retry enqueuing same buffers again? >=20 > With the current spec, OP_FORWARD would allow application to enqueue > crypto_op as an event to event device. But this event doesn't have any > additional information which would indicate it is destined to crypto. The= new > API would solve this issue. >=20 > [snip]