]> git.droids-corp.org - dpdk.git/blobdiff - drivers/common/cnxk/roc_se.c
common/cnxk: support setting BPHY CGX/RPM FEC
[dpdk.git] / drivers / common / cnxk / roc_se.c
index 3f741758e2a3a057e2a1be96b1ed1da50f8f82f2..b04de7998adcf9ab8d7100ba67c27e49a6f6ba68 100644 (file)
@@ -206,7 +206,11 @@ roc_se_auth_key_set(struct roc_se_ctx *se_ctx, roc_se_auth_type type,
 
        if (key_len) {
                se_ctx->hmac = 1;
-               memset(se_ctx->auth_key, 0, sizeof(se_ctx->auth_key));
+
+               se_ctx->auth_key = plt_zmalloc(key_len, 8);
+               if (se_ctx->auth_key == NULL)
+                       return -1;
+
                memcpy(se_ctx->auth_key, key, key_len);
                se_ctx->auth_key_len = key_len;
                memset(fctx->hmac.ipad, 0, sizeof(fctx->hmac.ipad));