* Attach a session to a crypto operation. * This API is needed only in case of RTE_SECURITY_SESS_CRYPTO_PROTO_OFFLOAD * For other rte_security_session_action_type, ol_flags in rte_mbuf may be * defined to perform security operations. * * @param op crypto operation * @param sess security session */
| 1091 | * @param sess security session |
| 1092 | */ |
| 1093 | static inline int |
| 1094 | rte_security_attach_session(struct rte_crypto_op *op, |
| 1095 | void *sess) |
| 1096 | { |
| 1097 | if (unlikely(op->type != RTE_CRYPTO_OP_TYPE_SYMMETRIC)) |
| 1098 | return -EINVAL; |
| 1099 | |
| 1100 | op->sess_type = RTE_CRYPTO_OP_SECURITY_SESSION; |
| 1101 | |
| 1102 | return __rte_security_attach_session(op->sym, sess); |
| 1103 | } |
| 1104 | |
| 1105 | struct rte_security_macsec_secy_stats { |
| 1106 | uint64_t ctl_pkt_bcast_cnt; |