From: Akhil Goyal Date: Thu, 30 Aug 2018 05:50:59 +0000 (+0530) Subject: crypto/dpaa_sec: do not attach session for non-matching qp X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9198b2c227c11faaaccfd38bc28b6656705e1401;p=dpdk.git crypto/dpaa_sec: do not attach session for non-matching qp if session->qp != qp to be enqueued, it should show an error and not try to re-attach another qp. Signed-off-by: Akhil Goyal --- diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 095e218161..f6b2e3657b 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -1448,14 +1448,18 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, nb_ops = loop; goto send_pkts; } - if (unlikely(!ses->qp || ses->qp != qp)) { - DPAA_SEC_DP_ERR("sess->qp - %p qp %p", - ses->qp, qp); + if (unlikely(!ses->qp)) { if (dpaa_sec_attach_sess_q(qp, ses)) { frames_to_send = loop; nb_ops = loop; goto send_pkts; } + } else if (unlikely(ses->qp != qp)) { + DPAA_SEC_DP_ERR("Old:sess->qp = %p" + " New qp = %p\n", ses->qp, qp); + frames_to_send = loop; + nb_ops = loop; + goto send_pkts; } auth_only_len = op->sym->auth.data.length -