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 0E2A4A09E4; Mon, 5 Apr 2021 08:10:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 85A384067C; Mon, 5 Apr 2021 08:10:47 +0200 (CEST) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mails.dpdk.org (Postfix) with ESMTP id 68E6A4014E for ; Mon, 5 Apr 2021 08:10:46 +0200 (CEST) Received: by mail-pj1-f43.google.com with SMTP id nh5so3330744pjb.5 for ; Sun, 04 Apr 2021 23:10:46 -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=lMm+EYFHMKaSj0tCqFa1VHgrpr2xE/ILkXGv31jTY2Y=; b=fZLKx//WrgdQ1xEjQOf1umb/R1ahRQ1K6HONrPRkfBGnI+3wjgTWLhxPv3ah4y4Skq 4J0LVxkxt6mzyuopaIE09tmt+/I2pigXfSQoLgPuqeichyqe/HecRus8Lk8CHC2WPoiD EZZbhg6nnZVL5w28Y+Y61ocK2nImfxozjI/TKd1A8SAMyfz1ofGiWBZyWWA15ZO/cWVj 2PciUP5tE9GQX+E3gSkqF+Kn0VU5Dfb8KPjHD5k1qcSh1MPHcpDF67L7TrtC0zz756v1 sapXG909ofAKF+mtkbjU08Pk3vHqwyvqiibbufE3ApZo+QAZQ7oY7jTDc+To74P1AsM+ 2PAw== 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=lMm+EYFHMKaSj0tCqFa1VHgrpr2xE/ILkXGv31jTY2Y=; b=ekGs+HfOJX95bh528z864FbsQ8fxJiDhZ2NBsvXeIxveUEgPhgF7KeE5wPXm9F+mFa MyOc3bCgq5lizSgbOnkKai36Vky/e/Zt49RkQMPqPHmSvtMEgYFqidQrS17NEpAT+cxY 9pVUAwNPz6kZZThkOQhYOqd31yNiGLFc4TbE4Yq3yRRoMcZer2oqokLOQWBoBhvhmzD6 GGw1wuLdHe/wq5kRtl/O6pNxR3YbBZqPlHFmUo22TVFyGVUTqOCvsOI8lDANGKp6UaJr Zb9d0UghDpsIBj7X7Cl44wI9zSifpqoqZtEMtFe25O/9lRVx+KbtRt917xCs3AAAXcL0 A3YQ== X-Gm-Message-State: AOAM5304Rv0/rqDguhKYP8DJmEImKZy0/0EQdhp1hjqckG5K3LQ7o3zb 5S26DhR2wXrJQbogRkYhHxY= X-Google-Smtp-Source: ABdhPJysN42BWVwhnFzGGbk5QKrkZGjhjpRG8+pPhE5f342NE2mBFdbmFN6UEagxrWVzO/+Xd5lRtA== X-Received: by 2002:a17:90a:be09:: with SMTP id a9mr24839833pjs.219.1617603045553; Sun, 04 Apr 2021 23:10:45 -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 i21sm4495802pjv.22.2021.04.04.23.10.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Apr 2021 23:10:45 -0700 (PDT) Date: Mon, 5 Apr 2021 11:40:35 +0530 From: Shijith Thotton To: "Gujjar, Abhinandan S" Cc: Shijith Thotton , "dev@dpdk.org" , "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 Message-ID: <20210405061035.GA21@BG-LT7405.marvell.com> References: <3a6ffaa3fce062ff335ed90c81bdb50b02e7e6fa.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 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" On Sat, Apr 03, 2021 at 11:08:28AM +0000, Gujjar, Abhinandan S wrote: > > > > -----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 > > > > Use rte_event_crypto_adapter_enqueue() API to enqueue events to crypto > > adapter if forward mode is supported in driver. > > > > Signed-off-by: Shijith Thotton > > --- > > app/test/test_event_crypto_adapter.c | 29 +++++++++++++++++++--------- > > 1 file changed, 20 insertions(+), 9 deletions(-) > > > > 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; > > }; > > > > struct rte_event response_info = { > > @@ -110,9 +111,12 @@ send_recv_ev(struct rte_event *ev) > > struct rte_event recv_ev; > > int ret; > > > > - ret = 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 = rte_event_crypto_adapter_enqueue(evdev, > > TEST_APP_PORT_ID, > > + ev, NUM); > > + else > > + ret = rte_event_enqueue_burst(evdev, > > TEST_APP_PORT_ID, ev, NUM); > > + TEST_ASSERT_EQUAL(ret, NUM, "Failed to send event to crypto > > +adapter\n"); > > > > while (rte_event_dequeue_burst(evdev, > > TEST_APP_PORT_ID, &recv_ev, NUM, 0) == 0) @@ - > > 741,6 +745,11 @@ configure_event_crypto_adapter(enum > > rte_event_crypto_adapter_mode mode) > > ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, > > &cap); > > TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); > > > > + if (cap & > > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) > > + params.internal_port_op_fwd = 1; > > + else > > + params.internal_port_op_fwd = 0; > > + > There is a check at line 760 for FWD mode. Can't this be set there? > Yes, I will move it over 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) > > > > TEST_ASSERT_SUCCESS(ret, "Failed to add queue pair\n"); > > > > - ret = > > 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 = > > 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"); > > + } > > > > return TEST_SUCCESS; > > } > > @@ -809,15 +820,15 @@ test_crypto_adapter_conf(enum > > rte_event_crypto_adapter_mode mode) > > > > if (!crypto_adapter_setup_done) { > > ret = configure_event_crypto_adapter(mode); > > - if (!ret) { > > + if (ret) > > + return ret; > > + if (!params.internal_port_op_fwd) { > > qid = TEST_CRYPTO_EV_QUEUE_ID; > > ret = rte_event_port_link(evdev, > > params.crypto_event_port_id, &qid, NULL, > > 1); > > TEST_ASSERT(ret >= 0, "Failed to link queue %d " > > "port=%u\n", qid, > > params.crypto_event_port_id); > > - } else { > > - return ret; > > } > > crypto_adapter_setup_done = 1; > > } > > -- > > 2.25.1 >