Hi Akhil
   Agreed that callbacks are not getting called if not NULL PMD as it is 
designed to be run for NULL PMD.
Tested your patch with qat pmd and callbacks are getting called. Both the 
patches can go in.

+ ------------------------------------------------------- +
 + Test Suite : Crypto General Unit Test Suite
 + ------------------------------------------------------- +
CRYPTODEV: rte_cryptodev_configure() line 1150: Invalid dev_id=4
CRYPTODEV: rte_cryptodev_configure() line 1150: Invalid dev_id=255
CRYPTODEV: rte_cryptodev_stop() line 1247: Device with dev_id=0 already stopped
 + TestCase [ 0] : test_device_configure_invalid_dev_id succeeded
CRYPTODEV: rte_cryptodev_queue_pair_setup() line 1370: Invalid queue_pair_id=1
CRYPTODEV: rte_cryptodev_queue_pair_setup() line 1370: Invalid 
queue_pair_id=65535
CRYPTODEV: rte_cryptodev_stop() line 1247: Device with dev_id=0 already stopped
 + TestCase [ 1] : test_queue_pair_descriptor_setup succeeded
CRYPTODEV: rte_cryptodev_queue_pairs_config() line 1088: invalid param: dev 
0x7fb24d547940, nb_queues 0
CRYPTODEV: rte_cryptodev_configure() line 1175: dev0 
rte_crypto_dev_queue_pairs_config = -22
CRYPTODEV: rte_cryptodev_queue_pairs_config() line 1103: Invalid num 
queue_pairs (65535) for dev 0
CRYPTODEV: rte_cryptodev_configure() line 1175: dev0 
rte_crypto_dev_queue_pairs_config = -22
CRYPTODEV: rte_cryptodev_queue_pairs_config() line 1103: Invalid num 
queue_pairs (2) for dev 0
CRYPTODEV: rte_cryptodev_configure() line 1175: dev0 
rte_crypto_dev_queue_pairs_config = -22
CRYPTODEV: rte_cryptodev_stop() line 1247: Device with dev_id=0 already stopped
 + TestCase [ 2] : test_device_configure_invalid_queue_pair_ids succeeded
CRYPTODEV: rte_cryptodev_stats_get() line 1695: Invalid dev_id=88
CRYPTODEV: rte_cryptodev_stats_get() line 1700: Invalid stats ptr
CRYPTODEV: rte_cryptodev_stats_reset() line 1723: Invalid dev_id=44
 + TestCase [ 3] : test_stats succeeded
CRYPTODEV: rte_cryptodev_add_enq_callback() line 1428: Invalid dev_id=64
CRYPTODEV: rte_cryptodev_add_enq_callback() line 1435: Invalid queue_pair_id=2
CRYPTODEV: rte_cryptodev_add_enq_callback() line 1422: Callback is NULL on 
dev_id=0
crypto enqueue callback called
CRYPTODEV: rte_cryptodev_remove_enq_callback() line 1495: Invalid dev_id=64
CRYPTODEV: rte_cryptodev_remove_enq_callback() line 1503: Invalid 
queue_pair_id=2
CRYPTODEV: rte_cryptodev_remove_enq_callback() line 1490: Callback is NULL
 + TestCase [ 4] : test_enq_callback_setup succeeded
CRYPTODEV: rte_cryptodev_add_deq_callback() line 1566: Invalid dev_id=64
CRYPTODEV: rte_cryptodev_add_deq_callback() line 1573: Invalid queue_pair_id=2
CRYPTODEV: rte_cryptodev_add_deq_callback() line 1560: Callback is NULL on 
dev_id=0
crypto dequeue callback called
crypto dequeue callback called
crypto dequeue callback called
CRYPTODEV: rte_cryptodev_remove_deq_callback() line 1634: Invalid dev_id=64
CRYPTODEV: rte_cryptodev_remove_deq_callback() line 1642: Invalid 
queue_pair_id=2
CRYPTODEV: rte_cryptodev_remove_deq_callback() line 1629: Callback is NULL
 + TestCase [ 5] : test_deq_callback_setup succeeded
 + ------------------------------------------------------- +
 + Test Suite Summary : Crypto General Unit Test Suite
 + ------------------------------------------------------- +
 + Tests Total :        6
 + Tests Skipped :      0
 + Tests Executed :     6
 + Tests Unsupported:   0
 + Tests Passed :       6
 + Tests Failed :       0
 + ------------------------------------------------------- +
 + -------------------------------------------------------

Thanks,
Ganapati

> -----Original Message-----
> From: Akhil Goyal <gak...@marvell.com>
> Sent: Thursday, May 23, 2024 12:06 AM
> To: Kundapura, Ganapati <ganapati.kundap...@intel.com>; dev@dpdk.org
> Cc: Gujjar, Abhinandan S <abhinandan.guj...@intel.com>;
> fanzhang....@gmail.com; 'Power, Ciara' <ciara.po...@intel.com>
> Subject: RE: [PATCH v1] crypto: fix build issues on crypto callbacks macro
> undefined
> 
> > Hi Akhil,
> >    My patch addresses build issue on setting RTE_CRYPTO_CALLBACKS to 0
> > and Checks for callback registered or not from the next node instead
> > of head node as callback head node is always valid pointer.
> >
> Agreed but your patch cannot be verified without the fix as the callbacks are
> not getting called if using PMD other than NULL.

Reply via email to