Only enable/disable queue pairs that are allocated during cryptodev
start/stop.
Fixes: 52008104e9a6 ("crypto/cnxk: update instruction queue in start/stop")
Cc: stable@dpdk.org
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
uint16_t nb_lf = roc_cpt->nb_lf;
uint16_t qp_id;
- for (qp_id = 0; qp_id < nb_lf; qp_id++)
+ for (qp_id = 0; qp_id < nb_lf; qp_id++) {
+ /* Application may not setup all queue pair */
+ if (roc_cpt->lf[qp_id] == NULL)
+ continue;
+
roc_cpt_iq_enable(roc_cpt->lf[qp_id]);
+ }
return 0;
}
uint16_t nb_lf = roc_cpt->nb_lf;
uint16_t qp_id;
- for (qp_id = 0; qp_id < nb_lf; qp_id++)
+ for (qp_id = 0; qp_id < nb_lf; qp_id++) {
+ if (roc_cpt->lf[qp_id] == NULL)
+ continue;
+
roc_cpt_iq_disable(roc_cpt->lf[qp_id]);
+ }
}
int