Lines Matching defs:op
192 * @param op The crypto operation to be reset.
196 __rte_crypto_op_reset(struct rte_crypto_op *op, enum rte_crypto_op_type type)
198 op->type = type;
199 op->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
200 op->sess_type = RTE_CRYPTO_OP_SESSIONLESS;
204 __rte_crypto_sym_op_reset(op->sym);
207 memset(op->asym, 0, sizeof(struct rte_crypto_asym_op));
220 /**< Crypto op pool type operation. */
310 struct rte_crypto_op *op = NULL;
313 retval = __rte_crypto_op_raw_bulk_alloc(mempool, type, &op, 1);
317 __rte_crypto_op_reset(op, type);
319 return op;
360 * @param op crypto operation.
368 __rte_crypto_op_get_priv_data(struct rte_crypto_op *op, uint32_t size)
372 if (likely(op->mempool != NULL)) {
373 priv_size = __rte_crypto_op_get_priv_data_size(op->mempool);
376 if (op->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
377 return (void *)((uint8_t *)(op + 1) +
379 if (op->type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC)
380 return (void *)((uint8_t *)(op + 1) +
393 * @param op
395 * If op is NULL, no operation is performed.
398 rte_crypto_op_free(struct rte_crypto_op *op)
400 if (op != NULL && op->mempool != NULL)
401 rte_mempool_put(op->mempool, op);
430 struct rte_crypto_op *op = (struct rte_crypto_op *)(m + 1);
432 __rte_crypto_op_reset(op, RTE_CRYPTO_OP_TYPE_SYMMETRIC);
434 op->mempool = NULL;
435 op->sym->m_src = m;
437 return op;
450 rte_crypto_op_sym_xforms_alloc(struct rte_crypto_op *op, uint8_t nb_xforms)
455 if (unlikely(op->type != RTE_CRYPTO_OP_TYPE_SYMMETRIC))
460 priv_data = __rte_crypto_op_get_priv_data(op, size);
464 return __rte_crypto_sym_op_sym_xforms_alloc(op->sym, priv_data,
472 * @param op crypto operation, must be of type symmetric
476 rte_crypto_op_attach_sym_session(struct rte_crypto_op *op, void *sess)
478 if (unlikely(op->type != RTE_CRYPTO_OP_TYPE_SYMMETRIC))
481 op->sess_type = RTE_CRYPTO_OP_WITH_SESSION;
483 return __rte_crypto_sym_op_attach_sym_session(op->sym, sess);
489 * @param op crypto operation, must be of type asymmetric
493 rte_crypto_op_attach_asym_session(struct rte_crypto_op *op,
496 if (unlikely(op->type != RTE_CRYPTO_OP_TYPE_ASYMMETRIC))
499 op->sess_type = RTE_CRYPTO_OP_WITH_SESSION;
500 op->asym->session = sess;