DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <gakhil@marvell.com>
To: "Gujjar, Abhinandan S" <abhinandan.gujjar@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: Anoob Joseph <anoobj@marvell.com>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	"Jayatheerthan, Jay" <jay.jayatheerthan@intel.com>,
	"Vangati, Narender" <narender.vangati@intel.com>,
	Volodymyr Fialko <vfialko@marvell.com>
Subject: RE: [PATCH v3 6/7] test/event: add asymmetric cases for crypto adapter
Date: Fri, 29 Apr 2022 12:23:15 +0000	[thread overview]
Message-ID: <CO6PR18MB448439456E8F0CD3B166E14ED8FC9@CO6PR18MB4484.namprd18.prod.outlook.com> (raw)
In-Reply-To: <PH0PR11MB583248D391C3A3630155DD40E8FD9@PH0PR11MB5832.namprd11.prod.outlook.com>

Hi Abhinandan,

> This is failing with asym changes. Please look into this.

Thanks for pointing this out. It is failing as null crypto does not support asym
And asym_session_create would need an op from driver which is NULL for null crypto

Please check if below change is working for you.

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index eecfc22057..2ecc7e2cea 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -934,13 +934,16 @@ test_asym_session_with_op_new_mode(void)
 static int
 configure_cryptodev(void)
 {
+       const struct rte_cryptodev_capabilities *capability;
        struct rte_cryptodev_qp_conf qp_conf;
        struct rte_cryptodev_config conf;
        struct rte_cryptodev_info info;
        unsigned int session_size;
+       unsigned int i = 0;
        uint8_t nb_devs;
        int ret;

+
        params.mbuf_pool = rte_pktmbuf_pool_create(
                        "CRYPTO_ADAPTER_MBUFPOOL",
                        NUM_MBUFS, MBUF_CACHE_SIZE, 0, MBUF_SIZE,
@@ -963,19 +966,6 @@ configure_cryptodev(void)
                RTE_LOG(ERR, USER1, "Can't create CRYPTO_OP_POOL\n");
                return TEST_FAILED;
        }
-       params.asym_op_mpool = rte_crypto_op_pool_create(
-                       "EVENT_CRYPTO_ASYM_OP_POOL",
-                       RTE_CRYPTO_OP_TYPE_ASYMMETRIC,
-                       NUM_MBUFS, MBUF_CACHE_SIZE,
-                       (DEFAULT_NUM_XFORMS *
-                       sizeof(struct rte_crypto_asym_xform)) +
-                       sizeof(union rte_event_crypto_metadata),
-                       rte_socket_id());
-       if (params.asym_op_mpool == NULL) {
-               RTE_LOG(ERR, USER1, "Can't create CRYPTO_ASYM_OP_POOL\n");
-               return TEST_FAILED;
-       }
-

        /* Create a NULL crypto device */
        nb_devs = rte_cryptodev_device_count_by_driver(
@@ -1020,16 +1010,34 @@ configure_cryptodev(void)
        TEST_ASSERT_NOT_NULL(params.session_priv_mpool,
                        "session mempool allocation failed\n");

-       params.asym_sess_mpool = rte_cryptodev_asym_session_pool_create(
-                       "CRYPTO_AD_ASYM_SESS_MP",
-                       MAX_NB_SESSIONS, 0,
-                       sizeof(union rte_event_crypto_metadata),
-                       SOCKET_ID_ANY);
-       TEST_ASSERT_NOT_NULL(params.asym_sess_mpool,
-                       "asym session mempool allocation failed\n");
-
-
        rte_cryptodev_info_get(TEST_CDEV_ID, &info);
+
+       while ((capability = &info.capabilities[i++])->op !=
+                       RTE_CRYPTO_OP_TYPE_UNDEFINED) {
+               if (capability->op == RTE_CRYPTO_OP_TYPE_ASYMMETRIC) {
+                       params.asym_op_mpool = rte_crypto_op_pool_create(
+                               "EVENT_CRYPTO_ASYM_OP_POOL",
+                               RTE_CRYPTO_OP_TYPE_ASYMMETRIC,
+                               NUM_MBUFS, MBUF_CACHE_SIZE,
+                               (DEFAULT_NUM_XFORMS *
+                               sizeof(struct rte_crypto_asym_xform)) +
+                               sizeof(union rte_event_crypto_metadata),
+                               rte_socket_id());
+                       TEST_ASSERT_NOT_NULL(params.asym_op_mpool,
+                                       "Can't create CRYPTO_ASYM_OP_POOL\n");
+
+                       params.asym_sess_mpool =
+                               rte_cryptodev_asym_session_pool_create(
+                                       "CRYPTO_AD_ASYM_SESS_MP",
+                                       MAX_NB_SESSIONS, 0,
+                                       sizeof(union rte_event_crypto_metadata),
+                                       SOCKET_ID_ANY);
+                       TEST_ASSERT_NOT_NULL(params.asym_sess_mpool,
+                               "asym session mempool allocation failed\n");
+                       break;
+               }
+       }
+
        conf.nb_queue_pairs = info.max_nb_queue_pairs;
        conf.socket_id = SOCKET_ID_ANY;
        conf.ff_disable = RTE_CRYPTODEV_FF_SECURITY;


> 
> root@xdp-dev:/home/intel/abhi/dpdk-next-eventdev/abhi# ./app/test/dpdk-
> test
> EAL: Detected CPU lcores: 96
> EAL: Detected NUMA nodes: 2
> EAL: Detected static linkage of DPDK
> EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
> EAL: Selected IOVA mode 'PA'
> EAL: VFIO support initialized
> EAL: Probe PCI driver: net_ice (8086:1593) device: 0000:18:00.0 (socket 0)
> ice_load_pkg_type(): Active package is: 1.3.26.0, ICE OS Default Package (single
> VLAN mode)
> EAL: Probe PCI driver: net_ice (8086:1593) device: 0000:18:00.1 (socket 0)
> ice_load_pkg_type(): Active package is: 1.3.26.0, ICE OS Default Package (single
> VLAN mode)
> TELEMETRY: No legacy callbacks, legacy socket not created
> APP: HPET is not enabled, using TSC as default timer
> RTE>>event_crypto_adapter_autotest
>  + ------------------------------------------------------- +
>  + Test Suite : Event crypto adapter test suite
> CRYPTODEV: Creating cryptodev crypto_null
> 
> CRYPTODEV: Initialisation parameters - name: crypto_null,socket id: 0, max
> queue pairs: 8
> CRYPTODEV: elt_size 0 is expanded to 208
> 
> CRYPTODEV: Could not set max private session size
> 
> EAL: Test assert configure_cryptodev line 1028 failed: asym session mempool
> allocation failed
> 
> EAL: Test assert testsuite_setup line 1361 failed: cryptodev initialization failed
> 
>  + ------------------------------------------------------- +
>  + Test Suite Summary : Event crypto adapter test suite
>  + ------------------------------------------------------- +
>  + Tests Total :       11
>  + Tests Skipped :      0
>  + Tests Executed :     0
>  + Tests Unsupported:   0
>  + Tests Passed :       0
>  + Tests Failed :      11
>  + ------------------------------------------------------- +
> Test Failed


  reply	other threads:[~2022-04-29 12:23 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25 11:16 [PATCH 0/2] Session crypto event metadata api Volodymyr Fialko
2022-03-25 11:16 ` [PATCH 1/2] security: introduce per session event metadata Volodymyr Fialko
2022-04-04  8:38   ` Gujjar, Abhinandan S
2022-04-04  9:48     ` Akhil Goyal
2022-04-04 10:42       ` Gujjar, Abhinandan S
2022-04-13  7:13         ` Akhil Goyal
2022-04-18 19:36           ` Akhil Goyal
2022-03-25 11:16 ` [PATCH 2/2] crypto/cnxk: support for security session enqueue Volodymyr Fialko
2022-04-18 19:33 ` [PATCH v2 0/7] Add new cryptodev op for event metadata Akhil Goyal
2022-04-18 19:33   ` [PATCH v2 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-04-18 19:33   ` [PATCH v2 2/7] crypto/cnxk: add event metadata set operation Akhil Goyal
2022-04-18 19:33   ` [PATCH v2 3/7] crypto/octeontx: use new API for event metadata Akhil Goyal
2022-04-18 19:33   ` [PATCH v2 4/7] test/event: use new API to set event crypto metadata Akhil Goyal
2022-04-18 19:33   ` [PATCH v2 5/7] eventdev: use new API to get " Akhil Goyal
2022-04-18 19:33   ` [PATCH v2 6/7] test/event: add asymmetric cases for crypto adapter Akhil Goyal
2022-04-18 19:33   ` [PATCH v2 7/7] test-eventdev: support asym ops " Akhil Goyal
2022-04-21 14:37   ` [PATCH v3 0/7] Add new cryptodev op for event metadata Akhil Goyal
2022-04-21 14:37     ` [PATCH v3 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-04-27 15:38       ` Zhang, Roy Fan
2022-04-28 14:42       ` Gujjar, Abhinandan S
2022-04-29 12:16         ` Akhil Goyal
2022-05-01 12:24           ` Gujjar, Abhinandan S
2022-05-01 18:37             ` Akhil Goyal
2022-04-21 14:37     ` [PATCH v3 2/7] crypto/cnxk: add event metadata set operation Akhil Goyal
2022-04-27 15:38       ` Zhang, Roy Fan
2022-05-01 13:17       ` Gujjar, Abhinandan S
2022-05-01 18:29         ` Akhil Goyal
2022-04-21 14:37     ` [PATCH v3 3/7] crypto/octeontx: use new API for event metadata Akhil Goyal
2022-04-27 15:38       ` Zhang, Roy Fan
2022-05-01 13:18       ` Gujjar, Abhinandan S
2022-04-21 14:37     ` [PATCH v3 4/7] test/event: use new API to set event crypto metadata Akhil Goyal
2022-04-27 15:39       ` Zhang, Roy Fan
2022-04-28 14:47       ` Gujjar, Abhinandan S
2022-04-21 14:37     ` [PATCH v3 5/7] eventdev: use new API to get " Akhil Goyal
2022-04-27 15:39       ` Zhang, Roy Fan
2022-04-28 15:08       ` Gujjar, Abhinandan S
2022-04-21 14:37     ` [PATCH v3 6/7] test/event: add asymmetric cases for crypto adapter Akhil Goyal
2022-04-27 15:39       ` Zhang, Roy Fan
2022-04-28 15:14       ` Gujjar, Abhinandan S
2022-04-29 12:23         ` Akhil Goyal [this message]
2022-05-01 12:45           ` Gujjar, Abhinandan S
2022-05-01 18:36             ` Akhil Goyal
2022-04-21 14:37     ` [PATCH v3 7/7] test-eventdev: support asym ops " Akhil Goyal
2022-04-27 15:40       ` Zhang, Roy Fan
2022-05-01 13:00       ` Gujjar, Abhinandan S
2022-04-27 15:37     ` [PATCH v3 0/7] Add new cryptodev op for event metadata Zhang, Roy Fan
2022-04-28 14:24     ` Gujjar, Abhinandan S
2022-05-01 19:24     ` [PATCH v4 " Akhil Goyal
2022-05-01 19:24       ` [PATCH v4 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-05-02  9:01         ` Anoob Joseph
2022-05-02 11:06         ` Gujjar, Abhinandan S
2022-05-01 19:24       ` [PATCH v4 2/7] crypto/cnxk: add event metadata set operation Akhil Goyal
2022-05-02 11:07         ` Gujjar, Abhinandan S
2022-05-01 19:24       ` [PATCH v4 3/7] crypto/octeontx: use new API for event metadata Akhil Goyal
2022-05-01 19:24       ` [PATCH v4 4/7] test/event: use new API to set event crypto metadata Akhil Goyal
2022-05-01 19:24       ` [PATCH v4 5/7] eventdev: use new API to get " Akhil Goyal
2022-05-01 19:24       ` [PATCH v4 6/7] test/event: add asymmetric cases for crypto adapter Akhil Goyal
2022-05-02 11:08         ` Gujjar, Abhinandan S
2022-05-01 19:24       ` [PATCH v4 7/7] test-eventdev: support asym ops " Akhil Goyal
2022-05-02 11:08       ` [PATCH v4 0/7] Add new cryptodev op for event metadata Gujjar, Abhinandan S
2022-05-12 12:45       ` [PATCH v5 " Akhil Goyal
2022-05-12 12:45         ` [PATCH v5 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-05-12 12:45         ` [PATCH v5 2/7] crypto/cnxk: add event metadata set operation Akhil Goyal
2022-05-12 12:45         ` [PATCH v5 3/7] crypto/octeontx: use new API for event metadata Akhil Goyal
2022-05-12 12:45         ` [PATCH v5 4/7] test/event: use new API to set event crypto metadata Akhil Goyal
2022-05-12 12:45         ` [PATCH v5 5/7] eventdev: use new API to get " Akhil Goyal
2022-05-12 12:45         ` [PATCH v5 6/7] test/event: add asymmetric cases for crypto adapter Akhil Goyal
2022-05-12 12:45         ` [PATCH v5 7/7] test-eventdev: support asym ops " Akhil Goyal
2022-05-16 18:30         ` [PATCH v5 0/7] Add new cryptodev op for event metadata Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CO6PR18MB448439456E8F0CD3B166E14ED8FC9@CO6PR18MB4484.namprd18.prod.outlook.com \
    --to=gakhil@marvell.com \
    --cc=abhinandan.gujjar@intel.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jay.jayatheerthan@intel.com \
    --cc=jerinj@marvell.com \
    --cc=narender.vangati@intel.com \
    --cc=vfialko@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).