crypto/mvsam: fix session data reset
authorDana Vardi <danat@marvell.com>
Thu, 1 Jul 2021 06:59:20 +0000 (09:59 +0300)
committerAkhil Goyal <gakhil@marvell.com>
Wed, 7 Jul 2021 19:28:39 +0000 (21:28 +0200)
commit03e73e8572f112bd3714cd90c491a6570330189c
tree666d850b321c2f38329904e222b1b78dfa1aa453
parent62f7513e2a2a7677b1f335e53c44316f171511e0
crypto/mvsam: fix session data reset

This patch fix wrong clear memory session pointer.

When call mrvl_crypto_pmd_sym_session_clear function,
it might cause the following error:
CRYPTODEV: set_sym_session_private_data() line 497:
Set private data for driver 1 not allowed

This fix set zeroes to mrvl_crypto_session pointer instead to
rte_cryptodev_sym_session pointer, and will verify that
rte_cryptodev_sym_session pointer will not lose data such as
nb_drivers.

Bugzilla ID: 646
Fixes: 8a61c83af2fa ("crypto/mrvl: add mrvl crypto driver")
Cc: stable@dpdk.org
Signed-off-by: Dana Vardi <danat@marvell.com>
Reviewed-by: Michael Shamis <michaelsh@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
drivers/crypto/mvsam/rte_mrvl_pmd_ops.c