> -----Original Message-----
> From: Akhil Goyal <gak...@marvell.com>
> Sent: Friday, April 29, 2022 5:53 PM
> To: Gujjar, Abhinandan S <abhinandan.guj...@intel.com>; dev@dpdk.org
> Cc: Anoob Joseph <ano...@marvell.com>; Jerin Jacob Kollanukkaran
> <jer...@marvell.com>; Jayatheerthan, Jay <jay.jayatheert...@intel.com>;
> Vangati, Narender <narender.vang...@intel.com>; Volodymyr Fialko
> <vfia...@marvell.com>
> Subject: RE: [PATCH v3 6/7] test/event: add asymmetric cases for crypto
> adapter
>
> 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.
I could not apply this patch cleanly. I see that you are skipping the asym test
for NULL PMD.
Can I use openssl or any open source PMD to test this feature? If yes, please
provide the command line.
>
> 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