[dpdk-dev] [PATCH v4 11/12] cryptodev: add reference count to session private data

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Thu Jan 10 13:35:58 CET 2019



> -----Original Message-----
> From: Zhang, Roy Fan
> Sent: Wednesday, January 9, 2019 10:56 PM
> To: dev at dpdk.org
> Cc: akhil.goyal at nxp.com; De Lara Guarch, Pablo
> <pablo.de.lara.guarch at intel.com>; Trahe, Fiona <fiona.trahe at intel.com>
> Subject: [PATCH v4 11/12] cryptodev: add reference count to session private
> data
> 
> This patch adds a refcnt field to every session private data in the cryptodev
> symmetric session. The counter is used to prevent freeing symmetric session
> blindly before it is not cleared by every type of crypto device in use.
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang at intel.com>
> Acked-by: Fiona Trahe <fiona.trahe at intel.com>
> ---
>  doc/guides/prog_guide/img/cryptodev_sym_sess.svg |  7 +++++++
>  doc/guides/rel_notes/release_19_02.rst           |  6 ++++++
>  lib/librte_cryptodev/rte_cryptodev.c             | 14 +++++++++-----
>  lib/librte_cryptodev/rte_cryptodev.h             |  1 +
>  4 files changed, 23 insertions(+), 5 deletions(-)
> 
> diff --git a/doc/guides/prog_guide/img/cryptodev_sym_sess.svg
> b/doc/guides/prog_guide/img/cryptodev_sym_sess.svg
> index 20059cc0f..7d7052c38 100644
> --- a/doc/guides/prog_guide/img/cryptodev_sym_sess.svg

I think it is worth mentioning in the programmer's guide that it is expected for all devices to call sym_session_init, even if they are the same device type (for safety reasons).


More information about the dev mailing list