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 2A3BCA0579; Thu, 8 Apr 2021 08:45:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF89040698; Thu, 8 Apr 2021 08:45:50 +0200 (CEST) Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mails.dpdk.org (Postfix) with ESMTP id 516F240138 for ; Thu, 8 Apr 2021 08:45:49 +0200 (CEST) Received: by mail-pj1-f49.google.com with SMTP id z22-20020a17090a0156b029014d4056663fso818795pje.0 for ; Wed, 07 Apr 2021 23:45:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ykbVoWiZZDKxcHMI9UbeFLuNT/hfhq5kgehZyJoKCCE=; b=tZ7CJ6llNkDuxx3hjADHyYoKvFKiDVhCOo29FIzA3C3nv/ougfqSyR+I6y1H/fuIHW 5NiMe/1ef5/4wfPp3mI/CfRPIbIydiExaFYTm4qEGv69QpsVPOlcvfy66SuLqf98Cl6D u0msuJ2QTRhUUNiORqMvxMfzMUIfbH1n7hthNHzhUyikQXgjeb2sL1mjtfM4k2mk4L7R 5E1O5HPDX2BmMFD9HZN1W1KYb0wOKE7AW8hLz+l/yaVRvzokZTTT95/ImTlRMwqJowKB 7hwFwYNzZN7Y2dNswS69d9ATOrdvs09qmODqwvvrCCHYdGywdbNpN4aW0iPFmdB6w8Cx dtFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ykbVoWiZZDKxcHMI9UbeFLuNT/hfhq5kgehZyJoKCCE=; b=kQuByiwxaLkZzU5L4pHnJxmMpBOVdd1ary7wlGKG6MH1eJtnD+T/0Csvl04Xt2CKPL oGVriS+uavCzP6t6O0/mpsr5mDEo6u0ffbeRhEv3f3oSu5CahsNosvK0Vdrzy9b51W/n JSMMhO7XRUA9w7G//GY0zY1aSHCgVcGEzBUdbAedeZ7wZUop3AkZjJWT134g119Ptaps QqkHEPPrp+gFL9GAcZqAEUhVIGONEKZDoU5rnpI5mRFOkcKb84gyc412RtmjeH6aXNRN 3MY3JjCZ8F+YPC46YrNDWyXLozgUP47+9dZQfp34K4/KZGzZ/ld6o0tGSdFOsQPrf/TM 3+4Q== X-Gm-Message-State: AOAM532rKJRqDYknl5G/nJne0VHHfQyFUgRIM+O3jtGkkOKiue0FAYGO bw8rNisLM/h3OU0BGy9sCTs= X-Google-Smtp-Source: ABdhPJyltWFLsxv0NYQZg8DTi2uER7BorxLjR67EbSwBVi+lqZjsWHU4oqWDCv+OCqOVY6oD7ig2Rg== X-Received: by 2002:a17:90b:f04:: with SMTP id br4mr6982020pjb.99.1617864348447; Wed, 07 Apr 2021 23:45:48 -0700 (PDT) Received: from BG-LT7405.marvell.com (117.205.98.34.bc.googleusercontent.com. [34.98.205.117]) by smtp.gmail.com with ESMTPSA id s29sm6429085pfd.7.2021.04.07.23.45.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Apr 2021 23:45:48 -0700 (PDT) Date: Thu, 8 Apr 2021 12:15:39 +0530 From: Shijith Thotton To: "Gujjar, Abhinandan S" Cc: Anoob Joseph , "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" Message-ID: <20210408064539.GA21@BG-LT7405.marvell.com> References: <91bf3d89521f46fb714c12d0a7f7eb5c7f7c8e01.1617382596.git.sthotton@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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" On Wed, Apr 07, 2021 at 03:06:16PM +0000, Gujjar, Abhinandan S wrote: > > > > -----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 > > > > Hi Abhinandan, > > > > Please see inline. > > > > Thanks, > > Anoob > > > > > > > > > > Advertise crypto adapter forward mode capability and set crypto > > > > adapter enqueue function in driver. > > > > > > > > Signed-off-by: Shijith Thotton > > > > [snip] > > > > > > + > > > > + 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? > > > > > > > [Anoob] Difference is the ordering point when used with ORDERED flows. > > > > 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 well > > 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 > mbuf will be freed and returned 0. Does not this make the application/worker > to think that enqueue is not successful and it should retry enqueuing same > buffers again? > Thanks for pointing out. Will use proper error number for failures in next version. > > > > 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. > > > > [snip]