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 C78A9A0524; Tue, 13 Apr 2021 05:45:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C992160A18; Tue, 13 Apr 2021 05:45:54 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 143A9160A17 for ; Tue, 13 Apr 2021 05:45:52 +0200 (CEST) IronPort-SDR: IYHDbpMhvhfSYIRNoPKxbVc2aWctBhpSi9RmwKy7cKe4I4mkI3/E1R8jlprS1JGRntaEx28zwA uTosdfca3Yhw== X-IronPort-AV: E=McAfee;i="6200,9189,9952"; a="194362869" X-IronPort-AV: E=Sophos;i="5.82,218,1613462400"; d="scan'208";a="194362869" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2021 20:45:51 -0700 IronPort-SDR: 9Qhv7CwLHtv4EkrZdUSJ+YmLJhxqWrgJHCSg5TGiAiUtR+mnHGLtOFgE4jWy3zS4IL3xwe+i7s sr+NpMC6hyNw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,218,1613462400"; d="scan'208";a="611600242" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga006.fm.intel.com with ESMTP; 12 Apr 2021 20:45:50 -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; Mon, 12 Apr 2021 20:45:50 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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; Mon, 12 Apr 2021 20:45:50 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.177) 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; Mon, 12 Apr 2021 20:45:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H9RNrUNiLprf1wTUlmRoDuTXGiNwSVPaYr4TLaThGNYH7piDQbjb+41W8Y1I/h30ud436XvUmIz/isugRELXhW9JPejZWmLphjd/rBMcYGuEczSzJbsaWIHBzJSrMY0yrLjbMfLPv1VeArkZ8X8MIdgRjSXlZIb0GmaPdnXudMurncG6ELOz8gXG96A3CKcF3RhXmouYCWBnqA6bO4z/SnJYlrZ+XlSZ0TssubEQ+oKMrg+r2nKaJ4pYLV4jsHUpSSJiLScSj0r7KnhTn5TC7rXRT1IbaV7l6CDzim+7rfEULg+5ykCp7y9YZEGYq7n1OuiT63+JOnJW1Dj5zbp2tw== 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=zg8+ZVX3Hq/mhwdkpkqqkj1inK3kY4ZPwM9TwD6lFXQ=; b=SH59kVOSFBl8VWMNU8++AtzFdAZ2unNW9YjTgwALjG3oWc7Ej4dtWJXbmHvWkoFehQOMjzos+sAaDJ6WLbb8fDl/JEKBiuqbcwX8/0Oai5bHUtXyyJGp/p+KvyVdOytiMf6XAHbIuoJMFlEXycJcwDrktQB+2QAMPd99RRCu5IbSCb4FeJLKr45ltrWt+zzvyDtKhVrcF3oBQbMYSn9ohs/ZTdg9vfUVX7qOBqbrhT+KTLYJ0bncctE0aLyTwNYA11ER7VyVArSBvgnqPJmJEO5lNqj8anqDVN1KBD8r916Nwc7ftWwMFE2gDXy5KZRbSwiCFd8P1dIEfopnmPNuRA== 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=zg8+ZVX3Hq/mhwdkpkqqkj1inK3kY4ZPwM9TwD6lFXQ=; b=EIbBu/JybxF1eD9hotOizHRp7iFx0zfD0fnzmNHtz4Umzeeopp5JSxd6XgHhZCM0B3o7bk9rsupPyaWu8yXR30eh/cBgoaS+v6vOQBgFsNe+kI35UqVBosXhMto37PV4gD/hSRHAFNEYrCfW2KDDqyE7xPQuAHgF/cpZ3ByAXd8= Received: from DM6PR11MB3548.namprd11.prod.outlook.com (2603:10b6:5:143::18) by DM5PR11MB1467.namprd11.prod.outlook.com (2603:10b6:4:a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.18; Tue, 13 Apr 2021 03:45:47 +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.4020.022; Tue, 13 Apr 2021 03:45:47 +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 v7 3/3] test/event_crypto: use crypto adapter enqueue API Thread-Index: AQHXL2+3Wrb+Yazawk2E41mFq83sf6qx0AVg Date: Tue, 13 Apr 2021 03:45:47 +0000 Message-ID: References: <3f8ad4dded3ef392dde960e2c3377a808ec8ae32.1618213226.git.sthotton@marvell.com> In-Reply-To: <3f8ad4dded3ef392dde960e2c3377a808ec8ae32.1618213226.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: 4d09cb6b-77bd-4637-9cad-08d8fe2e9f98 x-ms-traffictypediagnostic: DM5PR11MB1467: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:324; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5GHLFZqUxi4J+z8fH61/YDRl9j2874QfBHijIJ3nv0N97Miw9QLbDi2OZy+pF3lv31Bwb74lk6rohAeX84HhvMgBvmo2W2enUx/C8HeDv+oDSA++h60ld87TDjjTOi2lErIWhJlSgcrMnUUP789BFV32ye0vr/LsWWT4nyNu3TBzuJ1KC27uXTk9xKNtwrONE+JlRMDMaJpAK4lNQeEJBAmwxsBOQWnB8InRS5fw8uhr1IyS+N+Bv1Vk8S1hQG9NK0Y6etx9T9YveXuvc59RUXJlqPR99aFKnd8CamJgvwTuIzQ3/Usi2yEN8QCN5nEYMDm04B92+N0unlOqTYUzFm3BwpfdBCwcaWQn0UStqHJC6ltYQ13ddDN9pgNozuOE7QlQyuvTEoIISa1k1GF7NkA6VnaDeFciZcTwOVr5yvpDb/cNBgLC8bVGFA2A3vcFvnxGjN29H4r4H27rBFnnAeJF/6z6Lkqv3e/O+Hwlt3Usk09at6ymKfi5pAuv2h4IcXltRo5ZaY8a6za2iUtTv1ES30QXclA/NbgT/M5dYhFhW46a4MxOoJ6mEJTbfgyPklejcImPDbQSsA5Vpz/Xpku2HIA/qpuDd9Bsi8jvh5M= 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:(366004)(396003)(346002)(376002)(39860400002)(136003)(55016002)(9686003)(316002)(53546011)(7696005)(122000001)(55236004)(66556008)(38100700002)(71200400001)(26005)(6506007)(8936002)(66446008)(186003)(5660300002)(110136005)(83380400001)(33656002)(52536014)(86362001)(76116006)(478600001)(8676002)(7416002)(66946007)(2906002)(54906003)(66476007)(4326008)(64756008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?VDnACg5mDkcTbI7tPnA9MkFihA4RarR9N1Bb0Q04L9gOAA3Ii5mW7t98lZhv?= =?us-ascii?Q?Q9yrdqKlmdO7SYEbHN4LZ/swlahQ4kzZ4CQDpSdh10DYklqU+t7batsxq6aa?= =?us-ascii?Q?Ou94g7xMbYDY16wQu3yJmh71xuifGx+TPhqhnpNPlUDAdz0new4iE3vZPiOI?= =?us-ascii?Q?a3xZnfl/ZHNGqBNKLyHHEmWp1l7L4trCNKe/lDKS0qwguikdhnAmQIe5H0et?= =?us-ascii?Q?faMIWQb5f6+AYiyEXJCXwWJhNBrD1saYQnyof4d85kJpZy76tbg0jYuS7LhE?= =?us-ascii?Q?HKZ7sJuvhYBxtuVOUSxYbAn+wnmcMLLbJdqLPs6FNLwHm56Xu1hJvNHlQ0a0?= =?us-ascii?Q?jqXVRKgh5uM0oPM6vLuYb5WkfNZ7JJOfNFg5G2o8UJUq0pQKKyuLXEfSA0NU?= =?us-ascii?Q?7cqXJH2t2DH2R0HhN31rzD2F78JHQHr7IfG7ofdLi4oQgGt7W+i9J+4MUqRI?= =?us-ascii?Q?yc/CEuB90w1CniKPA8Qxm9ga+Az4yq7SnPcSHrcuWDwKNhHmm1kZTzuqsVGh?= =?us-ascii?Q?U2wix2U92IlHx9CfNOKH18eyt0HgrbhyB3Pm04M8cNt7Nt9Fiy5GFq3bDWUN?= =?us-ascii?Q?r3AhIwJLd3VOn2lzyLFgRHP2rlY7HuB3qqdMXrW0YmmD0SKiftCXmVD8TiWd?= =?us-ascii?Q?mkiMF/eW8PaB61Y25adWWKgPm9iL1WV6HXaCFHx/ZgR3zSR3j9ka2ZcsLyWD?= =?us-ascii?Q?FB7biQR+gyMl2Gv8qXJvr1uESH5ZaABP8p7KH/UKSIN6EsGUV9sDsVhiet+v?= =?us-ascii?Q?JLjY/DvDrXcfp5DEdHdJiNdNoWZt/Jl+NqOMm4zwK3p8iw5mRrc/v+lqolWh?= =?us-ascii?Q?slZn9/xDQpqcJqj7VFxeEx4ZPShmdslZrjRorEM16skVmLgC5LZ17MNY91qm?= =?us-ascii?Q?096DcxcFM1MMaQgFvhQ0UGkOt7vOMQapxqhbW+oRtlKgEY/VqlATukc3tFJG?= =?us-ascii?Q?vGBBJW5DTnqd5Z/yYWqPmh1mUnAWkSs0IUwWESSBq0Y7zcTf+ZxosXVYDHkd?= =?us-ascii?Q?mvWiahEG8ijmhsXzbmQrroEYkePmPLWLc3b4D3fgQHlhx9U+T0f3qHoEik+8?= =?us-ascii?Q?B8JxwfG+A05UxHlcp5NYEC8sdphtNcySXHMJpknih+jpd4BqVpWjL2pswHC0?= =?us-ascii?Q?BpMpShoxrHsOXtnJ33EV5micHswBrW5x5w8EfYBzjhYIzxSaprReR43qSiXp?= =?us-ascii?Q?X/y4Bews2xN2yHU1NnNgauDwNZgrVyTSy2cmevcyGkEsdmq3O/90n7p2ZrE+?= =?us-ascii?Q?DdXJ+WqgUNZmCE/vkBZ9Q0r69zE4oXgNqQMboeTTMrdXdEK33lAlEQLcx87U?= =?us-ascii?Q?sbw=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: 4d09cb6b-77bd-4637-9cad-08d8fe2e9f98 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Apr 2021 03:45:47.1355 (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: 6RSzkJ3sonlgfbQh5R9Le7MXQfbVOzyZ762WK7/YHDZCNXBCL790ZadRyiL5xc5jSDNjkJ7aTTyA6dAwikDbgB6/l69+djaZaQmPbAKAXu4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1467 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v7 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" Acked-by: Abhinandan.gujjar@intel.com > -----Original Message----- > From: Shijith Thotton > Sent: Monday, April 12, 2021 1:14 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 v7 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 | 33 ++++++++++++++++++---------- > 1 file changed, 21 insertions(+), 12 deletions(-) >=20 > diff --git a/app/test/test_event_crypto_adapter.c > b/app/test/test_event_crypto_adapter.c > index 335211cd8..f689bc1f2 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) @@ - > 747,9 +751,12 @@ configure_event_crypto_adapter(enum > rte_event_crypto_adapter_mode mode) > !(cap & > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND)) > goto adapter_create; >=20 > - if ((mode =3D=3D RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD) && > - !(cap & > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD)) > - return -ENOTSUP; > + if (mode =3D=3D RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD) { > + if (cap & > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) > + params.internal_port_op_fwd =3D 1; > + else > + return -ENOTSUP; > + } >=20 > if ((mode =3D=3D RTE_EVENT_CRYPTO_ADAPTER_OP_NEW) && > !(cap & > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW)) > @@ -771,9 +778,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 +818,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