MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ixgbe_ipsec_ctx_create

Function ixgbe_ipsec_ctx_create

dpdk/drivers/net/ixgbe/ixgbe_ipsec.c:725–745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

723}
724
725int
726ixgbe_ipsec_ctx_create(struct rte_eth_dev *dev)
727{
728 struct rte_security_ctx *ctx = NULL;
729
730 if (ixgbe_crypto_capable(dev)) {
731 ctx = rte_malloc("rte_security_instances_ops",
732 sizeof(struct rte_security_ctx), 0);
733 if (ctx) {
734 ctx->device = (void *)dev;
735 ctx->ops = &ixgbe_security_ops;
736 ctx->sess_cnt = 0;
737 dev->security_ctx = ctx;
738 } else {
739 return -ENOMEM;
740 }
741 }
742 if (rte_security_dynfield_register() < 0)
743 return -rte_errno;
744 return 0;
745}

Callers 1

eth_ixgbe_dev_initFunction · 0.85

Calls 3

ixgbe_crypto_capableFunction · 0.85
rte_mallocFunction · 0.85

Tested by

no test coverage detected