Hi Akhil,

> -----Original Message-----
> From: Akhil Goyal <gak...@marvell.com>
> Sent: Monday, October 11, 2021 1:43 PM
> To: dev@dpdk.org
> Cc: tho...@monjalon.net; david.march...@redhat.com;
> hemant.agra...@nxp.com; ano...@marvell.com; De Lara Guarch, Pablo
> <pablo.de.lara.gua...@intel.com>; Trahe, Fiona <fiona.tr...@intel.com>;
> Doherty, Declan <declan.dohe...@intel.com>; ma...@nvidia.com;
> g.si...@nxp.com; Zhang, Roy Fan <roy.fan.zh...@intel.com>;
> jianjay.z...@huawei.com; asoma...@amd.com; ruifeng.w...@arm.com;
> Ananyev, Konstantin <konstantin.anan...@intel.com>; Nicolau, Radu
> <radu.nico...@intel.com>; ajit.khapa...@broadcom.com;
> rnagadhee...@marvell.com; adwiv...@marvell.com; Power, Ciara
> <ciara.po...@intel.com>; Akhil Goyal <gak...@marvell.com>
> Subject: [PATCH v2 3/5] cryptodev: move inline APIs into separate structure
> 
> Move fastpath inline function pointers from rte_cryptodev into a
> separate structure accessed via a flat array.
> The intension is to make rte_cryptodev and related structures private
> to avoid future API/ABI breakages.
> 
> Signed-off-by: Akhil Goyal <gak...@marvell.com>
> ---
>  lib/cryptodev/cryptodev_pmd.c      | 51
> ++++++++++++++++++++++++++++++
>  lib/cryptodev/cryptodev_pmd.h      | 11 +++++++
>  lib/cryptodev/rte_cryptodev.c      | 29 +++++++++++++++++
>  lib/cryptodev/rte_cryptodev_core.h | 29 +++++++++++++++++
>  lib/cryptodev/version.map          |  5 +++
>  5 files changed, 125 insertions(+)
> 
> diff --git a/lib/cryptodev/cryptodev_pmd.c
> b/lib/cryptodev/cryptodev_pmd.c
> index 44a70ecb35..4646708045 100644
> --- a/lib/cryptodev/cryptodev_pmd.c
> +++ b/lib/cryptodev/cryptodev_pmd.c
> @@ -4,6 +4,7 @@
> 
>  #include <sys/queue.h>
> 
> +#include <rte_errno.h>
>  #include <rte_string_fns.h>
>  #include <rte_malloc.h>
> 
> @@ -160,3 +161,53 @@ rte_cryptodev_pmd_destroy(struct rte_cryptodev
> *cryptodev)
> 

When a device is removed - aka when rte_pci_remove() is called 
cryptodev_fp_ops_reset() will never be called. This may expose a problem.
Looks like cryptodev_fp_ops_reset() needs to be called here too.

>       return 0;
... 

Reply via email to