Hi Akhil,
>-----Original Message----- >From: Akhil Goyal <[email protected]> >Sent: Monday 18 October 2021 15:42 >To: [email protected] >Cc: [email protected]; [email protected]; >[email protected]; [email protected]; De Lara Guarch, Pablo ><[email protected]>; Trahe, Fiona <[email protected]>; >Doherty, Declan <[email protected]>; [email protected]; >[email protected]; Zhang, Roy Fan <[email protected]>; >[email protected]; [email protected]; [email protected]; >Ananyev, Konstantin <[email protected]>; Nicolau, Radu ><[email protected]>; [email protected]; >[email protected]; [email protected]; Power, Ciara ><[email protected]>; Akhil Goyal <[email protected]> >Subject: [PATCH v3 0/7] cryptodev: hide internal structures > >Structures rte_cryptodev and rte_cryptodev_data are not supposed to be >directly used by the application. These are made public as they are used by >inline datapath public APIs. >This patchset, creates a new rte_cryptodev_core.h file which helps in defining >a data structure to hold datapath APIs in a flat array based on the device >identifier which is filled by the PMD. > >Similar series for ethdev and eventdev are also floated on ML. >https://patchwork.dpdk.org/project/dpdk/list/?series=19428 >https://patchwork.dpdk.org/project/dpdk/list/?series=19405 > > <snip> With this patchset I see a seg fault with the cryptodev_scheduler_autotest. It is due to the worker PMDs using the direct device start functions rather than rte_cryptodev_start(), so fp_ops never get set. I believe this fix is needed: diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c index 465b88ade8..d6f8d3ab78 100644 --- a/drivers/crypto/scheduler/scheduler_pmd_ops.c +++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c @@ -181,10 +181,8 @@ scheduler_pmd_start(struct rte_cryptodev *dev) /* start all workers */ for (i = 0; i < sched_ctx->nb_workers; i++) { uint8_t worker_dev_id = sched_ctx->workers[i].dev_id; - struct rte_cryptodev *worker_dev = - rte_cryptodev_pmd_get_dev(worker_dev_id); - ret = (*worker_dev->dev_ops->dev_start)(worker_dev); + ret = rte_cryptodev_start(worker_dev_id); if (ret < 0) { CR_SCHED_LOG(ERR, "Failed to start worker dev %u", worker_dev_id); @@ -208,10 +206,8 @@ scheduler_pmd_stop(struct rte_cryptodev *dev) /* stop all workers first */ for (i = 0; i < sched_ctx->nb_workers; i++) { uint8_t worker_dev_id = sched_ctx->workers[i].dev_id; - struct rte_cryptodev *worker_dev = - rte_cryptodev_pmd_get_dev(worker_dev_id); - (*worker_dev->dev_ops->dev_stop)(worker_dev); + rte_cryptodev_stop(worker_dev_id); } if (*sched_ctx->ops.scheduler_stop) Thanks, Ciara

