| 699 | } |
| 700 | |
| 701 | int |
| 702 | txgbe_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 | } |
no test coverage detected