#include "roc_cpt.h"
#define CNXK_CPT_MAX_CAPS 34
-#define CNXK_SEC_CRYPTO_MAX_CAPS 4
+#define CNXK_SEC_CRYPTO_MAX_CAPS 6
#define CNXK_SEC_MAX_CAPS 5
#define CNXK_AE_EC_ID_MAX 8
/**
sec_caps_add(struct rte_cryptodev_capabilities cnxk_caps[], int *cur_pos,
const struct rte_cryptodev_capabilities *caps, int nb_caps)
{
- if (*cur_pos + nb_caps > CNXK_SEC_CRYPTO_MAX_CAPS)
+ if (*cur_pos + nb_caps > CNXK_SEC_CRYPTO_MAX_CAPS) {
+ rte_panic("Could not add sec crypto caps");
return;
+ }
memcpy(&cnxk_caps[*cur_pos], caps, nb_caps * sizeof(caps[0]));
*cur_pos += nb_caps;
const struct rte_cryptodev_capabilities *cap;
unsigned int i;
- if ((CNXK_CPT_MAX_CAPS - *cur_pos) < 1)
+ if ((CNXK_SEC_CRYPTO_MAX_CAPS - *cur_pos) < 1) {
+ rte_panic("Could not add sec crypto caps");
return;
+ }
/* NULL auth */
for (i = 0; i < RTE_DIM(caps_null); i++) {