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 25419A0548; Sat, 3 Apr 2021 13:09:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D51040696; Sat, 3 Apr 2021 13:09:00 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 0C6424067B for ; Sat, 3 Apr 2021 13:08:58 +0200 (CEST) IronPort-SDR: Cq3iTWjXVHdFYM9avE1O4cTchVZJk9e3hLaDlzTzxoodprBaMKJ6wz6uXJXYmw5nbc2wwpDua5 8lzVbFVSM4uQ== X-IronPort-AV: E=McAfee;i="6000,8403,9942"; a="190378014" X-IronPort-AV: E=Sophos;i="5.81,302,1610438400"; d="scan'208";a="190378014" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2021 04:08:57 -0700 IronPort-SDR: NdiC9W866D6Yu9FtOS81xoY5LhwJODnr3WOjkS5yvKFhODDNs92z5bbGnZdTSvx00iehAxrgsB BC5kwx1dfEcQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,302,1610438400"; d="scan'208";a="379964404" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga006.jf.intel.com with ESMTP; 03 Apr 2021 04:08:57 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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 04:08:56 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) 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 04:08:56 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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 via Frontend Transport; Sat, 3 Apr 2021 04:08:56 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.104) 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; Sat, 3 Apr 2021 04:08:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JpI410bcTqEQ8lqLA7PRlfnbcsnryUVB6k8rLgtygKOKnrOQvr7VmVBHy3z9SNYgBGkJ1UStf6L7iKzf3DmQeUAPMlObzmYQpjYFZfalaCgo73bQuWhJcfCzPQ/FXDeVULdZimrT27bDDoA/IGhKP+vRDC40GBwCImHks503moXUylusyGavdzOvKegaQ22FX7M8vzEiavhsXvKqndi1knDEI149ZEsj2pcJGyMrW7qlfb8IqC9cq78jb3kXBrUNG8Mz/Iv2Sg00Fj9Vtj4dWA//KNBOCs8/sg5VXWkcnIb/C5Ca0TcS5VnVxAtq9XiyWI+Tsz0a47LLY6/ldP9KzQ== 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=478A9E29uPQEYek3J5Wz8i7YwucD9t8QLHAomiT5nh8=; b=L12JG2z+IlAy4bsJ2XZ9uRctjp8mCHIUO0tQdvkPPw1Rl+sZqHXCRfmzjKXLCwp/Gok3VmNsi6fWncr7KOz13hPbccZiHb6qVktUFZCgOrVtRkgBNrHf25ewGJ1b9aCDY2FYAaM8AMSkOp2syrmpUDb/m+rjb61SQ9DSIWe3d5jB8IWgolpXonuS3lzVjJQhz5318/vta4GQMhBA91TtpdD8DT06VX5sS47twiMGPn9YJibCyRhKJap5g+Smrc++kZVQnOVlfTvHaWtkDJFu4unXoLyk8bC/KoUPQBS4s2An0swnORGVfhsGQQV1tLn7P+DvZaji/5HaPZKrU+bLwA== 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=478A9E29uPQEYek3J5Wz8i7YwucD9t8QLHAomiT5nh8=; b=q7Ir+Cf+nPgMeW+KR5wmFH/NLT50GJbkESzP0DmlM0Hcei0NYoBr2MvCdEm1bjGP7pGy6OCLCokFCrTmeDyuuN6pyJWI0MMgBdw3ahfSd7OPfqVe3dL/ykCLThaKnl4Ljl6G26q+a60xN1bRC/Y44r8/vjj9VYQAGtfEt+RYKLc= Received: from DM6PR11MB3548.namprd11.prod.outlook.com (2603:10b6:5:143::18) by DM6PR11MB3659.namprd11.prod.outlook.com (2603:10b6:5:13f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.28; Sat, 3 Apr 2021 11:08:29 +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 11:08:28 +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 3/3] test/event_crypto: use crypto adapter enqueue API Thread-Index: AQHXJ+IjDi0x0LhiRU6LOQlX4yR/M6qimpzQ Date: Sat, 3 Apr 2021 11:08:28 +0000 Message-ID: References: <3a6ffaa3fce062ff335ed90c81bdb50b02e7e6fa.1617382596.git.sthotton@marvell.com> In-Reply-To: <3a6ffaa3fce062ff335ed90c81bdb50b02e7e6fa.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: e8ddc1ef-2dec-43db-a045-08d8f690cf72 x-ms-traffictypediagnostic: DM6PR11MB3659: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:883; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0siDtVIGF98ZTkCYKMpZJSy3EIZ2fyhEdhpMN/Q2sOfV7AsZzPPpLmjommLaxgj3ynnfm2UotaJHMWHz37XqvCDJJjONT4tup0e4oUpclrEvl4287//e/jsWMLI8ahKM8V5xfRJgF/vr46daa60/dzM4i0IhShDHXLGJdP5xcGCrISDrDd8eplE1TBIFSb2gwevup2Vcofs0nH557y300b3TD9aTR/FmWyVdQf/qQmuDsNdMNQwP8EeGRmEoXwiGZDFbkWngrRYlgpZZBQzMZkmnrzu6hWPwrLez/T+ahaEZxKNGLStQ8XEF5e499laxXYuAI8a5QdQb/gvSWsAHTCAmQbUaTYSUVo2xZZv/A7fylBQW45opEjpCUJbkXEsMTbecwTSZX+LodJPbT3MaQj8EqGe9QHntYP1rfF53fb2arNTrHYDLn9FdSz5tyzomts2kNZG3gTsZJP3Vm8SrG+hCYqJYE/mkl5qFfNXAwc3YCR2Mvg1HqaIQWlSJ+/IcVMhtu1mutEkOBKglRvIIALNkgYwmU/y/42uIhxeVIauNomSjfmciwDlVhXNhUcJxrhIa2KvdCcGpE/j6sRNXmMFdz0Ce7G0qe7Rbt3WfpwSlFUXdXPYNkFQ/hrepBpziBMXp3YDLhGtV61BVqEuKbaaYngrwSWCT5/QxjYbyNCk= 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)(39860400002)(346002)(136003)(396003)(366004)(83380400001)(478600001)(5660300002)(9686003)(86362001)(55016002)(316002)(55236004)(186003)(6506007)(52536014)(53546011)(71200400001)(7696005)(38100700001)(64756008)(7416002)(66556008)(66476007)(54906003)(26005)(66946007)(33656002)(76116006)(66446008)(110136005)(8936002)(8676002)(4326008)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?9gh4uHYU7m/FrsBb4nDS/vekk/br7axc+JQBosox1IbNLC8C0vIn+KsVaeDd?= =?us-ascii?Q?xexwS4fPsHBMJW8tgNL2nXg24YTNNL+KhRPo/lknu6muAUIbU8ihFDAjg71s?= =?us-ascii?Q?b+Md2ZQR+GXEi2AEvmaAzfaezz836O3QaLJh9QwHw9PYLDchHKv5GxRg51Kd?= =?us-ascii?Q?Qv+Oj/7j6ZGDEP2DwyNLa2MRtep8r/pDOqK82J7Y6LdnIydgsG9y+yan1ggQ?= =?us-ascii?Q?46u+gLZ6YEhEbwCpCVnJ1mLEDil3fNS5sqDwvfOaJZCNGJsFI9nxQwze/Hup?= =?us-ascii?Q?/m7pmMvpfmPlTjNzZoR0lNbHSHXmOHapmNA1i6sdENh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QIdUDMTs5H8e4xrm5MM9PU+GKpHXs2A1LMarUEemeRg9sav?= =?us-ascii?Q?lPkNsO7BBBEg/TOcISpm63V3RE0UI5KExRvewstvTRogaBPez8Rbm3NJckkA?= =?us-ascii?Q?uLk=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: e8ddc1ef-2dec-43db-a045-08d8f690cf72 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Apr 2021 11:08:28.7825 (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: Dpl19Og8Hk+lrSzfU3FYPoLujCh6Dsqtco1XINcyudqt8QSo81KQ4cozYYPhyzzNxG2bDEiFtluEJT9L6bHHQBG3OgxgFTX12Jd9RL88TDM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3659 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v4 3/3] test/event_crypto: use 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: 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 3/3] test/event_crypto: use crypto adapter enqueue API >=20 > Use rte_event_crypto_adapter_enqueue() API to enqueue events to crypto > adapter if forward mode is supported in driver. >=20 > Signed-off-by: Shijith Thotton > --- > app/test/test_event_crypto_adapter.c | 29 +++++++++++++++++++--------- > 1 file changed, 20 insertions(+), 9 deletions(-) >=20 > diff --git a/app/test/test_event_crypto_adapter.c > b/app/test/test_event_crypto_adapter.c > index 335211cd8..2b07f1582 100644 > --- a/app/test/test_event_crypto_adapter.c > +++ b/app/test/test_event_crypto_adapter.c > @@ -64,6 +64,7 @@ struct event_crypto_adapter_test_params { > struct rte_mempool *session_priv_mpool; > struct rte_cryptodev_config *config; > uint8_t crypto_event_port_id; > + uint8_t internal_port_op_fwd; > }; >=20 > struct rte_event response_info =3D { > @@ -110,9 +111,12 @@ send_recv_ev(struct rte_event *ev) > struct rte_event recv_ev; > int ret; >=20 > - ret =3D rte_event_enqueue_burst(evdev, TEST_APP_PORT_ID, ev, > NUM); > - TEST_ASSERT_EQUAL(ret, NUM, > - "Failed to send event to crypto adapter\n"); > + if (params.internal_port_op_fwd) > + ret =3D rte_event_crypto_adapter_enqueue(evdev, > TEST_APP_PORT_ID, > + ev, NUM); > + else > + ret =3D rte_event_enqueue_burst(evdev, > TEST_APP_PORT_ID, ev, NUM); > + TEST_ASSERT_EQUAL(ret, NUM, "Failed to send event to crypto > +adapter\n"); >=20 > while (rte_event_dequeue_burst(evdev, > TEST_APP_PORT_ID, &recv_ev, NUM, 0) =3D=3D 0) @@ - > 741,6 +745,11 @@ configure_event_crypto_adapter(enum > rte_event_crypto_adapter_mode mode) > ret =3D rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, > &cap); > TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); >=20 > + if (cap & > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) > + params.internal_port_op_fwd =3D 1; > + else > + params.internal_port_op_fwd =3D 0; > + There is a check at line 760 for FWD mode. Can't this be set there? > /* Skip mode and capability mismatch check for SW eventdev */ > if (!(cap & > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW) && > !(cap & > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && @@ - > 771,9 +780,11 @@ configure_event_crypto_adapter(enum > rte_event_crypto_adapter_mode mode) >=20 > TEST_ASSERT_SUCCESS(ret, "Failed to add queue pair\n"); >=20 > - ret =3D > rte_event_crypto_adapter_event_port_get(TEST_ADAPTER_ID, > - ¶ms.crypto_event_port_id); > - TEST_ASSERT_SUCCESS(ret, "Failed to get event port\n"); > + if (!params.internal_port_op_fwd) { > + ret =3D > rte_event_crypto_adapter_event_port_get(TEST_ADAPTER_ID, > + > ¶ms.crypto_event_port_id); > + TEST_ASSERT_SUCCESS(ret, "Failed to get event port\n"); > + } >=20 > return TEST_SUCCESS; > } > @@ -809,15 +820,15 @@ test_crypto_adapter_conf(enum > rte_event_crypto_adapter_mode mode) >=20 > if (!crypto_adapter_setup_done) { > ret =3D configure_event_crypto_adapter(mode); > - if (!ret) { > + if (ret) > + return ret; > + if (!params.internal_port_op_fwd) { > qid =3D TEST_CRYPTO_EV_QUEUE_ID; > ret =3D rte_event_port_link(evdev, > params.crypto_event_port_id, &qid, NULL, > 1); > TEST_ASSERT(ret >=3D 0, "Failed to link queue %d " > "port=3D%u\n", qid, > params.crypto_event_port_id); > - } else { > - return ret; > } > crypto_adapter_setup_done =3D 1; > } > -- > 2.25.1