1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (C) 2020 Marvell International Ltd.
5 #include <rte_ethdev.h>
6 #include <rte_malloc.h>
7 #include <rte_security.h>
9 #include "otx2_ethdev_sec.h"
12 otx2_eth_sec_ctx_create(struct rte_eth_dev *eth_dev)
14 struct rte_security_ctx *ctx;
16 ctx = rte_malloc("otx2_eth_sec_ctx",
17 sizeof(struct rte_security_ctx), 0);
23 ctx->device = eth_dev;
26 eth_dev->security_ctx = ctx;
32 otx2_eth_sec_ctx_destroy(struct rte_eth_dev *eth_dev)
34 rte_free(eth_dev->security_ctx);