| 723 | } |
| 724 | |
| 725 | int |
| 726 | ixgbe_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 | } |
no test coverage detected