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 36BB2A0548; Sat, 3 Apr 2021 12:21:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A8CE140696; Sat, 3 Apr 2021 12:21:02 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 617954067B for ; Sat, 3 Apr 2021 12:21:00 +0200 (CEST) IronPort-SDR: eur1eGB3HNXTYpbseDp42vtTtc22a2xIGxfwwmCHIpeVfOYImcTWKi8rbDsad/GKqgvWHTjGBk nuVchjFLTj9g== X-IronPort-AV: E=McAfee;i="6000,8403,9942"; a="172639854" X-IronPort-AV: E=Sophos;i="5.81,302,1610438400"; d="scan'208";a="172639854" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2021 03:20:59 -0700 IronPort-SDR: O9dO/T+doqm4FX7dWtd9UGp6nE3YDeuKyffqY+nZemkY1JeWSR3gQzgNbr90RfLzQIPYPlkRGj diiT+Qw+TnSQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,302,1610438400"; d="scan'208";a="379958282" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga006.jf.intel.com with ESMTP; 03 Apr 2021 03:20:58 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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; Sat, 3 Apr 2021 03:20:58 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Sat, 3 Apr 2021 03:20:57 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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 via Frontend Transport; Sat, 3 Apr 2021 03:20:57 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.174) 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; Sat, 3 Apr 2021 03:20:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G1WZT79e7zKV2wPYQ4g7EtEDB2HTbVPGWNkg10x98C2ezwT5kfF5TSU9FdOkWsyxa1vcCq/fhfrP4hxxLCQllTvp6aGJGPhAIDdRQszJYLosxkibUN8/V+cGmYigIjiSCC1WGO8k0d7BsF3WKUSyKpY2cozmGDhuvgIqiar9HB+rrz8Oj33t2Od7vFZh1WV6Dd+A5tsXMaq+LPw8Agvvnz2XVZnR8ZOUclHuJA+BOwPjMUJl7AiyG1jUKrDyMsHZJItmty/57xElHtDEqP920mopWLyt8/dwewXta5eQSQOwPwf1Rk+5gd7U0aejfgfxdpe5zuh8awSea3mp5zT6Rg== 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=oFexVvPNrObVddqyi60nOw6ZmJISWKJJiSp0SXalD3Y=; b=QdxB5TvMBNhf6Ir2yVWydG1OIvrJpN54bmGTBaXsQfb7MnIq0ugvtibDI3VWB3J+XUaG5KbflbsZNbC/HvGFrouJO+Nz61J/iicWM6OJ2AbV800hNiHXh0XZKuDILtXMdVr5ZvL2R5fpkf6a5eG/kCKwLzBUAX/J0d5sNpBjxB+Gb5yxaXOkxf3EL4Z4Xxj/U3xUsLE6eIk7YB3p+ClzVovOTm7vVF9VaX+Q1TfWXOGN4rGQ+XSDYTN+UuCwqsN4TmieiHQN2nrD12Jao762/nX/Lk69JAhSAgvYPpVPLofT0z18OcSZx4zHcZ/OvIbfmBnwharZxjR2wXm4tADWLw== 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=oFexVvPNrObVddqyi60nOw6ZmJISWKJJiSp0SXalD3Y=; b=Qem24ma7Cnr4mnLZa0x2fhyMy18nXHtHYQXiF7AKMgU7EFiCDKGOozhj0HbbBZsS+qFe9JvuKbaaiTZQPecyMrcDf6oWdCTGoS6LetlNg3Gj172IYhJROVWFZzZ+gF7lHs/O5cFNbBFaWRJt1VaFgp3Ho2BZcCFsALNGpYjkUzs= Received: from DM6PR11MB3548.namprd11.prod.outlook.com (2603:10b6:5:143::18) by DM6PR11MB2569.namprd11.prod.outlook.com (2603:10b6:5:c6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.29; Sat, 3 Apr 2021 10:20:56 +0000 Received: from DM6PR11MB3548.namprd11.prod.outlook.com ([fe80::1952:a31:a852:cf70]) by DM6PR11MB3548.namprd11.prod.outlook.com ([fe80::1952:a31:a852:cf70%4]) with mapi id 15.20.3955.033; Sat, 3 Apr 2021 10:20:56 +0000 From: "Gujjar, Abhinandan S" To: Shijith Thotton , "dev@dpdk.org" CC: "thomas@monjalon.net" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , "nipun.gupta@nxp.com" , "sachin.saxena@oss.nxp.com" , "anoobj@marvell.com" , "matan@nvidia.com" , "Zhang, Roy Fan" , "g.singh@nxp.com" , "Carrillo, Erik G" , "Jayatheerthan, Jay" , "pbhagavatula@marvell.com" , "Van Haaren, Harry" , Akhil Goyal Thread-Topic: [PATCH v4 2/3] event/octeontx2: support crypto adapter forward mode Thread-Index: AQHXJ+IndzV60aDNMUmWtQ6ycmqvlKqilNTA Date: Sat, 3 Apr 2021 10:20:55 +0000 Message-ID: References: <91bf3d89521f46fb714c12d0a7f7eb5c7f7c8e01.1617382596.git.sthotton@marvell.com> In-Reply-To: <91bf3d89521f46fb714c12d0a7f7eb5c7f7c8e01.1617382596.git.sthotton@marvell.com> 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: a4900ba7-c109-4962-790c-08d8f68a2b1b x-ms-traffictypediagnostic: DM6PR11MB2569: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:23; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0NKAyiUT+vB9BDzIFz3l5SHRa8vg2J+3b/pJjqEzOmy1wAYxSzWDjjJvdEd/AmSv0e4bST9vyCWjv2m9h0wBJpXpgT9C57Ofh6gTZPkKqPt+taNPIKIgJg7QhfBCHKYZZVrZuGMPIgRj2zRFfc6jm6/9dFINQsJIj3UXqD60bjC80W7zixNqPOXI8J2dEiLiwYPKGLaQm4kIMrZtYTTgp301Lr/uXG7eeDAabQG/F61vCidf1ASL+sWoBfKXlhpmc7qY0L4OUdF4Pe6r8SrOI8ZJeW/Hzqho0K0zyLrD5oyRzZr1RAohMN2NdMxaUVC1fB29qOHOsKjVtwHkEJ+XAUD8eIFCSBq+NFXvxJCOklrn4sVpPl/FppWINoor44sRr1AUERW4aPNGz5xi37y1LZDmJhCaObM7+PjGUn7TIYg+1giw5+hbALUNB5bRw+Z36pfs9IodP+ntiRwpWdyewlUcIU0edb5iTrAon4TvbPwgVC68Lqu6rVu8PIAamTuVuklKA+grkfRcjLpjMQNu3hO9q4oLIkn/0HZWsqBFViIhTRUO0d2IYHGp/dgPBm9R6fFgavbxpUaZPq8PfxNswxTJ8C4gEisOSL4KJNokCBKKLzCIpxbi94XXbGRXsTwFvIeFhm/QH8mTXAcC8KiiGoj47A5RsZSPl4Zx95XvPKM= 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)(366004)(346002)(39860400002)(396003)(136003)(66946007)(66556008)(64756008)(66446008)(76116006)(66476007)(9686003)(53546011)(52536014)(7416002)(55236004)(6506007)(8676002)(478600001)(71200400001)(4326008)(7696005)(316002)(8936002)(110136005)(186003)(38100700001)(26005)(55016002)(5660300002)(30864003)(2906002)(54906003)(86362001)(83380400001)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Xf6QUCI3fj3qqIxbRwKmYrMYwaiHFpxYlmQwKM8wolz6lnI6qft17xeogTm+?= =?us-ascii?Q?JHTfSvwCrdLi0ih4+mB1ViYzrCskvNoELrhU+UZQHAq+pyau26nI93NXYM+v?= =?us-ascii?Q?E7D/TZ3VVjObhYaaxS0l0MnG6puBYO1I9nsnllrpem5drwcmhCoqgH/xBsZC?= =?us-ascii?Q?+Wueg8B2EGqKmd4P7TTgNrOaAIAm7xEGhmjvlfhEn8wMxb7p++CgH/Z7PBYl?= =?us-ascii?Q?wkIBUQuKmsH07vqa9733N2EgNZJUM0wDRv58/na/LLa1Dk4TRzNUn+F9h/Za?= =?us-ascii?Q?BV96h9XgTB3pi7f/H2yJe7PpjdtNiEKkFoc7+FFoEQafVsUjrg6Ws1vLhLDx?= =?us-ascii?Q?zsuY4J0fWtZ96MsSEFq+4X1vCHOE3GSauQ2sM/infHjC9gKiZXnZAt98fCVu?= =?us-ascii?Q?XDDlVAqb7hyrP/3QwkzmymcKvUZLeaujbfNeCDlUEt6IsfdHpsXDQDHDy/vJ?= =?us-ascii?Q?Af8JKIhReTWO3TMPCBU1H4fQ4ZQDQiDTNT+iGiPTvyvFohliFG9WaaaEKPEv?= =?us-ascii?Q?Bg79QtgX4pLjoNzuvYJ9XB1HHcT4IhfQDSLnFiWc1PPoLj0c72+Xuw74Oi3n?= =?us-ascii?Q?8JE4+svZCMZYiI7TdfqOg5SENKxprejK1RPTjqHNrCGOFseC7X3GtVGM1CwQ?= =?us-ascii?Q?idUCEvKxnbNBN/Rd57NXh++tOelqQnzC0BvFNjeinT9/189xsprH3ce2vKUt?= =?us-ascii?Q?qZK83dvkr+eX9XsPoBHmxV3YyAGAHzvbqTNtuGIMaRt7TQf8FQ/dGUQsP29b?= =?us-ascii?Q?wPRRBCugQYYGtjvIZaOZeVacQ6uPG18FXWbTQshcwjuDSaFKK4YLw3h7fKnQ?= =?us-ascii?Q?JxhkcKL46gOA2eOVcValIoRaSJuH2yrL2d3FmXgtt2jaVzNhQrAtTjTlJso0?= =?us-ascii?Q?udVWFNWdmz7QMo88TJLLyefYpWFTADGhhxCb8ljg1T54UwLcgX4Z4DxPdXi8?= =?us-ascii?Q?gEek8gdb50I6YhhW473Jyd9xGh2dcbrddh6oZj2IgnM6JDrqvddMF/TiXkUe?= =?us-ascii?Q?QpsnAX+7dLfYVXZliDpbbs5tG3OhfZSCdV+Gwk61MthmpT6sHaSdv6tCQA1L?= =?us-ascii?Q?hfl9BEacjr+Fq90eThCGBX8X1xwQKgyyJ9Yh0PV2cTs5QlHVPzBlD2qfNCaU?= =?us-ascii?Q?mSo0KZNV2DXWuVXCto32kT5MkePjWCNNmsUimw0Latuxt61BewhXqTONl9sS?= =?us-ascii?Q?ssmfbhxd7KEPCMA8liwiGT8ISROhyS0tjPrekTaGUsG0lL4UheNczELHTImY?= =?us-ascii?Q?bsqhQjCc9S1Owcd3+z3/svc/bC4u6YpMDglfK/ZVJPhCzP/4EfxjxGw3yESH?= =?us-ascii?Q?jYk=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: a4900ba7-c109-4962-790c-08d8f68a2b1b X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Apr 2021 10:20:55.9916 (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: 5vLhRxrPBu4ESfre0MHxl+WbSYwpnDWmLIfqGHuHkdtlCLcadgCNhiddFOBmegF/VBircVJHQnPG0mGVpXDDslmnCAKW+xNO4aieQuBWuvs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2569 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: Shijith Thotton > Sent: Friday, April 2, 2021 10:31 PM > To: dev@dpdk.org > Cc: Shijith Thotton ; thomas@monjalon.net; > jerinj@marvell.com; Gujjar, Abhinandan S ; > hemant.agrawal@nxp.com; nipun.gupta@nxp.com; > sachin.saxena@oss.nxp.com; anoobj@marvell.com; matan@nvidia.com; > Zhang, Roy Fan ; g.singh@nxp.com; Carrillo, Erik > G ; Jayatheerthan, Jay > ; pbhagavatula@marvell.com; Van Haaren, > Harry ; Akhil Goyal > Subject: [PATCH v4 2/3] event/octeontx2: support crypto adapter forward > mode >=20 > Advertise crypto adapter forward mode capability and set crypto adapter > enqueue function in driver. >=20 > Signed-off-by: Shijith Thotton > --- > drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 42 ++++++---- > drivers/event/octeontx2/otx2_evdev.c | 5 +- > .../event/octeontx2/otx2_evdev_crypto_adptr.c | 3 +- ...dptr_dp.h =3D> > otx2_evdev_crypto_adptr_rx.h} | 6 +- > .../octeontx2/otx2_evdev_crypto_adptr_tx.h | 82 > +++++++++++++++++++ > drivers/event/octeontx2/otx2_worker.h | 2 +- > drivers/event/octeontx2/otx2_worker_dual.h | 2 +- > 7 files changed, 121 insertions(+), 21 deletions(-) rename > drivers/event/octeontx2/{otx2_evdev_crypto_adptr_dp.h =3D> > otx2_evdev_crypto_adptr_rx.h} (93%) create mode 100644 > drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h >=20 > diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c > b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c > index cec20b5c6..4808dca64 100644 > --- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c > +++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c > @@ -7,6 +7,7 @@ > #include > #include > #include > +#include >=20 > #include "otx2_cryptodev.h" > #include "otx2_cryptodev_capabilities.h" > @@ -434,15 +435,28 @@ sym_session_configure(int driver_id, struct > rte_crypto_sym_xform *xform, > return -ENOTSUP; > } >=20 > -static __rte_always_inline void __rte_hot > +static __rte_always_inline int32_t __rte_hot > otx2_ca_enqueue_req(const struct otx2_cpt_qp *qp, > struct cpt_request_info *req, > void *lmtline, > + struct rte_crypto_op *op, > uint64_t cpt_inst_w7) > { > + union rte_event_crypto_metadata *m_data; > union cpt_inst_s inst; > uint64_t lmt_status; >=20 > + if (op->sess_type =3D=3D RTE_CRYPTO_OP_WITH_SESSION) > + m_data =3D rte_cryptodev_sym_session_get_user_data( > + op->sym->session); > + else if (op->sess_type =3D=3D RTE_CRYPTO_OP_SESSIONLESS && > + op->private_data_offset) > + m_data =3D (union rte_event_crypto_metadata *) > + ((uint8_t *)op + > + op->private_data_offset); > + else > + return -EINVAL; > + > inst.u[0] =3D 0; > inst.s9x.res_addr =3D req->comp_baddr; > inst.u[2] =3D 0; > @@ -453,12 +467,11 @@ otx2_ca_enqueue_req(const struct otx2_cpt_qp > *qp, > inst.s9x.ei2 =3D req->ist.ei2; > inst.s9x.ei3 =3D cpt_inst_w7; >=20 > - inst.s9x.qord =3D 1; > - inst.s9x.grp =3D qp->ev.queue_id; > - inst.s9x.tt =3D qp->ev.sched_type; > - inst.s9x.tag =3D (RTE_EVENT_TYPE_CRYPTODEV << 28) | > - qp->ev.flow_id; > - inst.s9x.wq_ptr =3D (uint64_t)req >> 3; > + inst.u[2] =3D (((RTE_EVENT_TYPE_CRYPTODEV << 28) | > + m_data->response_info.flow_id) | > + ((uint64_t)m_data->response_info.sched_type << 32) | > + ((uint64_t)m_data->response_info.queue_id << 34)); > + inst.u[3] =3D 1 | (((uint64_t)req >> 3) << 3); > req->qp =3D qp; >=20 > do { > @@ -475,22 +488,22 @@ otx2_ca_enqueue_req(const struct otx2_cpt_qp > *qp, > lmt_status =3D otx2_lmt_submit(qp->lf_nq_reg); > } while (lmt_status =3D=3D 0); >=20 > + return 0; > } >=20 > static __rte_always_inline int32_t __rte_hot otx2_cpt_enqueue_req(const > struct otx2_cpt_qp *qp, > struct pending_queue *pend_q, > struct cpt_request_info *req, > + struct rte_crypto_op *op, > uint64_t cpt_inst_w7) > { > void *lmtline =3D qp->lmtline; > union cpt_inst_s inst; > uint64_t lmt_status; >=20 > - if (qp->ca_enable) { > - otx2_ca_enqueue_req(qp, req, lmtline, cpt_inst_w7); > - return 0; > - } > + if (qp->ca_enable) > + return otx2_ca_enqueue_req(qp, req, lmtline, op, > cpt_inst_w7); >=20 > if (unlikely(pend_q->pending_count >=3D > OTX2_CPT_DEFAULT_CMD_QLEN)) > return -EAGAIN; > @@ -594,7 +607,8 @@ otx2_cpt_enqueue_asym(struct otx2_cpt_qp *qp, > goto req_fail; > } >=20 > - ret =3D otx2_cpt_enqueue_req(qp, pend_q, params.req, sess- > >cpt_inst_w7); > + ret =3D otx2_cpt_enqueue_req(qp, pend_q, params.req, op, > + sess->cpt_inst_w7); >=20 > if (unlikely(ret)) { > CPT_LOG_DP_ERR("Could not enqueue crypto req"); @@ - > 638,7 +652,7 @@ otx2_cpt_enqueue_sym(struct otx2_cpt_qp *qp, struct > rte_crypto_op *op, > return ret; > } >=20 > - ret =3D otx2_cpt_enqueue_req(qp, pend_q, req, sess->cpt_inst_w7); > + ret =3D otx2_cpt_enqueue_req(qp, pend_q, req, op, sess- > >cpt_inst_w7); >=20 > if (unlikely(ret)) { > /* Free buffer allocated by fill params routines */ @@ -707,7 > +721,7 @@ otx2_cpt_enqueue_sec(struct otx2_cpt_qp *qp, struct > rte_crypto_op *op, > return ret; > } >=20 > - ret =3D otx2_cpt_enqueue_req(qp, pend_q, req, sess->cpt_inst_w7); > + ret =3D otx2_cpt_enqueue_req(qp, pend_q, req, op, sess- > >cpt_inst_w7); >=20 > if (winsz && esn) { > seq_in_sa =3D ((uint64_t)esn_hi << 32) | esn_low; diff --git > a/drivers/event/octeontx2/otx2_evdev.c > b/drivers/event/octeontx2/otx2_evdev.c > index 770a801c4..59450521a 100644 > --- a/drivers/event/octeontx2/otx2_evdev.c > +++ b/drivers/event/octeontx2/otx2_evdev.c > @@ -12,8 +12,9 @@ > #include > #include >=20 > -#include "otx2_evdev_stats.h" > #include "otx2_evdev.h" > +#include "otx2_evdev_crypto_adptr_tx.h" > +#include "otx2_evdev_stats.h" > #include "otx2_irq.h" > #include "otx2_tim_evdev.h" >=20 > @@ -311,6 +312,7 @@ SSO_TX_ADPTR_ENQ_FASTPATH_FUNC > [!!(dev->tx_offloads & > NIX_TX_OFFLOAD_OL3_OL4_CSUM_F)] > [!!(dev->tx_offloads & > NIX_TX_OFFLOAD_L3_L4_CSUM_F)]; > } > + event_dev->ca_enqueue =3D otx2_ssogws_ca_enq; >=20 > if (dev->dual_ws) { > event_dev->enqueue =3D otx2_ssogws_dual_enq; > @@ -473,6 +475,7 @@ SSO_TX_ADPTR_ENQ_FASTPATH_FUNC > [!!(dev->tx_offloads & >=20 > NIX_TX_OFFLOAD_L3_L4_CSUM_F)]; > } > + event_dev->ca_enqueue =3D otx2_ssogws_dual_ca_enq; > } >=20 > event_dev->txa_enqueue_same_dest =3D event_dev->txa_enqueue; > diff --git a/drivers/event/octeontx2/otx2_evdev_crypto_adptr.c > b/drivers/event/octeontx2/otx2_evdev_crypto_adptr.c > index 4e8a96cb6..2c9b347f0 100644 > --- a/drivers/event/octeontx2/otx2_evdev_crypto_adptr.c > +++ b/drivers/event/octeontx2/otx2_evdev_crypto_adptr.c > @@ -18,7 +18,8 @@ otx2_ca_caps_get(const struct rte_eventdev *dev, > RTE_SET_USED(cdev); >=20 > *caps =3D > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND | > - > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW; > + > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW | > + > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD; >=20 > return 0; > } > diff --git a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_dp.h > b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h > similarity index 93% > rename from drivers/event/octeontx2/otx2_evdev_crypto_adptr_dp.h > rename to drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h > index 70b63933e..9e331fdd7 100644 > --- a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_dp.h > +++ b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h > @@ -2,8 +2,8 @@ > * Copyright (C) 2020 Marvell International Ltd. > */ >=20 > -#ifndef _OTX2_EVDEV_CRYPTO_ADPTR_DP_H_ > -#define _OTX2_EVDEV_CRYPTO_ADPTR_DP_H_ > +#ifndef _OTX2_EVDEV_CRYPTO_ADPTR_RX_H_ > +#define _OTX2_EVDEV_CRYPTO_ADPTR_RX_H_ >=20 > #include > #include > @@ -72,4 +72,4 @@ otx2_handle_crypto_event(uint64_t get_work1) >=20 > return (uint64_t)(cop); > } > -#endif /* _OTX2_EVDEV_CRYPTO_ADPTR_DP_H_ */ > +#endif /* _OTX2_EVDEV_CRYPTO_ADPTR_RX_H_ */ > diff --git a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h > b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h > new file mode 100644 > index 000000000..bcc3c473d > --- /dev/null > +++ b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h > @@ -0,0 +1,82 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright (C) 2021 Marvell International Ltd. > + */ > + > +#ifndef _OTX2_EVDEV_CRYPTO_ADPTR_TX_H_ > +#define _OTX2_EVDEV_CRYPTO_ADPTR_TX_H_ > + > +#include > +#include > +#include > +#include > + > +#include > +#include > + > +static inline uint16_t > +otx2_ca_enq(uintptr_t tag_op, const struct rte_event *ev) { > + union rte_event_crypto_metadata *m_data; > + struct rte_crypto_op *crypto_op; > + struct rte_cryptodev *cdev; > + struct otx2_cpt_qp *qp; > + uint8_t cdev_id; > + uint16_t qp_id; > + > + crypto_op =3D ev->event_ptr; > + if (crypto_op =3D=3D NULL) > + return 0; > + > + if (crypto_op->sess_type =3D=3D RTE_CRYPTO_OP_WITH_SESSION) { > + m_data =3D rte_cryptodev_sym_session_get_user_data( > + crypto_op->sym->session); > + if (m_data =3D=3D NULL) > + goto free_op; > + > + cdev_id =3D m_data->request_info.cdev_id; > + qp_id =3D m_data->request_info.queue_pair_id; > + } else if (crypto_op->sess_type =3D=3D RTE_CRYPTO_OP_SESSIONLESS > && > + crypto_op->private_data_offset) { > + m_data =3D (union rte_event_crypto_metadata *) > + ((uint8_t *)crypto_op + > + crypto_op->private_data_offset); > + cdev_id =3D m_data->request_info.cdev_id; > + qp_id =3D m_data->request_info.queue_pair_id; > + } else { > + goto free_op; > + } > + > + cdev =3D &rte_cryptodevs[cdev_id]; > + qp =3D cdev->data->queue_pairs[qp_id]; > + > + 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 fun= ction 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? > + > +static uint16_t __rte_hot > +otx2_ssogws_ca_enq(void *port, struct rte_event ev[], uint16_t > +nb_events) { > + struct otx2_ssogws *ws =3D port; > + > + RTE_SET_USED(nb_events); > + > + return otx2_ca_enq(ws->tag_op, ev); > +} > + > +static uint16_t __rte_hot > +otx2_ssogws_dual_ca_enq(void *port, struct rte_event ev[], uint16_t > +nb_events) { > + struct otx2_ssogws_dual *ws =3D port; > + > + RTE_SET_USED(nb_events); > + > + return otx2_ca_enq(ws->ws_state[!ws->vws].tag_op, ev); } #endif > /* > +_OTX2_EVDEV_CRYPTO_ADPTR_TX_H_ */ > diff --git a/drivers/event/octeontx2/otx2_worker.h > b/drivers/event/octeontx2/otx2_worker.h > index 2b716c042..fd149be91 100644 > --- a/drivers/event/octeontx2/otx2_worker.h > +++ b/drivers/event/octeontx2/otx2_worker.h > @@ -10,7 +10,7 @@ >=20 > #include > #include "otx2_evdev.h" > -#include "otx2_evdev_crypto_adptr_dp.h" > +#include "otx2_evdev_crypto_adptr_rx.h" > #include "otx2_ethdev_sec_tx.h" >=20 > /* SSO Operations */ > diff --git a/drivers/event/octeontx2/otx2_worker_dual.h > b/drivers/event/octeontx2/otx2_worker_dual.h > index 72b616439..36ae4dd88 100644 > --- a/drivers/event/octeontx2/otx2_worker_dual.h > +++ b/drivers/event/octeontx2/otx2_worker_dual.h > @@ -10,7 +10,7 @@ >=20 > #include > #include "otx2_evdev.h" > -#include "otx2_evdev_crypto_adptr_dp.h" > +#include "otx2_evdev_crypto_adptr_rx.h" >=20 > /* SSO Operations */ > static __rte_always_inline uint16_t > -- > 2.25.1