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 B0E0AA0524; Tue, 13 Apr 2021 21:40:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 750D116129D; Tue, 13 Apr 2021 21:40:38 +0200 (CEST) Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) by mails.dpdk.org (Postfix) with ESMTP id 6E78A16129C for ; Tue, 13 Apr 2021 21:40:37 +0200 (CEST) Received: by mail-io1-f47.google.com with SMTP id v123so11416111ioe.10 for ; Tue, 13 Apr 2021 12:40:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kBKhurF4UOzcdH6bXTk3tEyV9BQhNq5ydS3nHnIrpcc=; b=qu14XI9D/YTV5dycaPIIdclKpwh4/lnrdAdXsyY1o9krHiGv+S2344T0t4QkXDnvWQ 8Ve73aR4cEDuEcGlzSHrppsZWQHlyaDcmyD6Z+fWn6xlzorkrntCXAUdlWWn4u8JyZyI kOu/dtrd5obYfh+G08PhPLjcDMoshEN/icym9IpHnVsdYhFsJzDASz+KrsQz5Zp3OMhu vPaztbWc7+DuCO3kjEmlvGpnQ3uPm88tN9LcXnae0OngMhTNuWuPoUA6yAE91x2bQ+Uv f3LM/dsxphTwtxyZ4zYdO+fwZzZGKi/Nh/YhGIk/bI0dMhMMFfjm1FP0s2PV6rPP9j4b lgVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kBKhurF4UOzcdH6bXTk3tEyV9BQhNq5ydS3nHnIrpcc=; b=b0LkcEk0iqkh4M1JEmoa8q0b3PMGNSbEk3dIGWjb4eySj245eNnAXTcKzZ3dU6W8NA c+OfBAJK6GWveq1WPsgwV/poRt2B9Smtb03PDz0U0LZEH/gF9CQ51ugU9Ert89/gHUd6 Kc/58PZmBeUuGfQVD0FXtRsez9YKqqBCxqGFtbne6VhqUlIi+r8Pzqe1lkyjx6ZGlzXg 4oPR7sU25hJ5vX/x8qTERSWxkdiWH5MMtECipmSUaY/Dyrnd4+inQom45feW0HcUm8ew O3shfViGQQExIeRHs3/m4aXcc80DpsYuYY55Uudtw6FrZIvnmQasgsyjdvRwggJB2OGg r/aA== X-Gm-Message-State: AOAM533zlGFn1s1qTRLCsv6pOPe33aRmIYPfrGWRV99Fza2CzCBOSHxZ A1B9f4iNlYHNW+CuIpIXMjoWsYaugeoY5tuMaU0= X-Google-Smtp-Source: ABdhPJyprZT9jxd5Ecae1fnARpF07H9qshOLNIjuS4ftGF2o0tyIHaoacRMIEwnVE4vvW9++g6a7r4+5adABi5Pv29M= X-Received: by 2002:a05:6602:722:: with SMTP id g2mr27783867iox.1.1618342836728; Tue, 13 Apr 2021 12:40:36 -0700 (PDT) MIME-Version: 1.0 References: <0ec2e4a2aea0d71b8fa19cc1c1d44cee0eb7533f.1618309291.git.sthotton@marvell.com> In-Reply-To: <0ec2e4a2aea0d71b8fa19cc1c1d44cee0eb7533f.1618309291.git.sthotton@marvell.com> From: Jerin Jacob Date: Wed, 14 Apr 2021 01:10:20 +0530 Message-ID: To: Shijith Thotton Cc: dpdk-dev , Thomas Monjalon , Jerin Jacob , "Gujjar, Abhinandan S" , Hemant Agrawal , Nipun Gupta , sachin.saxena@oss.nxp.com, Anoob Joseph , Matan Azrad , "Zhang, Roy Fan" , Gagandeep Singh , Erik Gabriel Carrillo , "Jayatheerthan, Jay" , Pavan Nikhilesh , "Van Haaren, Harry" , Akhil Goyal , Aaron Conole , David Marchand Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v8 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 Tue, Apr 13, 2021 at 4:00 PM Shijith Thotton wrote: > > 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 Could you check this CI failure? http://patches.dpdk.org/project/dpdk/patch/0ec2e4a2aea0d71b8fa19cc1c1d44cee0eb7533f.1618309291.git.sthotton@marvell.com/ > Acked-by: Abhinandan Gujjar > --- > app/test/test_event_crypto_adapter.c | 33 ++++++++++++++++++---------- > 1 file changed, 21 insertions(+), 12 deletions(-) > > 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; > }; > > 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) > @@ -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; > > - if ((mode == RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD) && > - !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD)) > - return -ENOTSUP; > + if (mode == RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD) { > + if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) > + params.internal_port_op_fwd = 1; > + else > + return -ENOTSUP; > + } > > if ((mode == 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) > > 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 +818,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 >