| 331 | } |
| 332 | |
| 333 | static inline void |
| 334 | crypto_op_reset(const struct rte_ipsec_session *ss, struct rte_mbuf *mb[], |
| 335 | struct rte_crypto_op *cop[], uint16_t num) |
| 336 | { |
| 337 | struct rte_crypto_sym_op *sop; |
| 338 | uint32_t i; |
| 339 | |
| 340 | const struct rte_crypto_op unproc_cop = { |
| 341 | .type = RTE_CRYPTO_OP_TYPE_SYMMETRIC, |
| 342 | .status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED, |
| 343 | .sess_type = RTE_CRYPTO_OP_SECURITY_SESSION, |
| 344 | }; |
| 345 | |
| 346 | for (i = 0; i != num; i++) { |
| 347 | cop[i]->raw = unproc_cop.raw; |
| 348 | sop = cop[i]->sym; |
| 349 | sop->m_src = mb[i]; |
| 350 | sop->m_dst = NULL; |
| 351 | __rte_security_attach_session(sop, ss->security.ses); |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | static inline void |
| 356 | crypto_prepare_event(struct rte_mbuf *pkt, struct rte_ipsec_session *sess, struct rte_event *ev) |
no test coverage detected