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

Function txgbe_ipsec_ctx_create

dpdk/drivers/net/txgbe/txgbe_ipsec.c:701–721  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

699}
700
701int
702txgbe_ipsec_ctx_create(struct rte_eth_dev *dev)
703{
704 struct rte_security_ctx *ctx = NULL;
705
706 if (txgbe_crypto_capable(dev)) {
707 ctx = rte_malloc("rte_security_instances_ops",
708 sizeof(struct rte_security_ctx), 0);
709 if (ctx) {
710 ctx->device = (void *)dev;
711 ctx->ops = &txgbe_security_ops;
712 ctx->sess_cnt = 0;
713 dev->security_ctx = ctx;
714 } else {
715 return -ENOMEM;
716 }
717 }
718 if (rte_security_dynfield_register() < 0)
719 return -rte_errno;
720 return 0;
721}

Callers 1

eth_txgbe_dev_initFunction · 0.85

Calls 3

txgbe_crypto_capableFunction · 0.85
rte_mallocFunction · 0.85

Tested by

no test coverage detected