crypto/qat: fix secure session check
authorRebecca Troy <rebecca.troy@intel.com>
Tue, 5 Jul 2022 13:28:18 +0000 (21:28 +0800)
committerAkhil Goyal <gakhil@marvell.com>
Tue, 5 Jul 2022 15:44:10 +0000 (17:44 +0200)
commitc6de7bb69b0053f9ad088fb3c75c4c36239eaad4
treeedfa76edcf7b7634bbbe0aa158162163fbfdf079
parent95ff46500990226f5ec5edfff3ae61999bbc382a
crypto/qat: fix secure session check

Currently when running the dpdk-perf-test with DOCSIS
security sessions, a segmentation fault occurs. This
is due to the check being made that the session is not
equal to op->sym->sec_session. This check passes the
first time but on the second iteration fails and doesn't
create the build_request.

This commit fixes that error by getting the ctx first
from the private session data and then comparing ctx,
rather than op->sym->sec_session, with the sess.

Fixes: fb3b9f492205 ("crypto/qat: rework burst data path")
Cc: stable@dpdk.org
Signed-off-by: Rebecca Troy <rebecca.troy@intel.com>
Signed-off-by: Kai Ji <kai.ji@intel.com>
drivers/crypto/qat/qat_sym.c