* queue crypto-ops into PMD queue. */
| 779 | * queue crypto-ops into PMD queue. |
| 780 | */ |
| 781 | void |
| 782 | enqueue_cop_burst(struct cdev_qp *cqp) |
| 783 | { |
| 784 | uint32_t i, len, ret; |
| 785 | |
| 786 | len = cqp->len; |
| 787 | ret = rte_cryptodev_enqueue_burst(cqp->id, cqp->qp, cqp->buf, len); |
| 788 | if (ret < len) { |
| 789 | RTE_LOG_DP(DEBUG, IPSEC, "Cryptodev %u queue %u:" |
| 790 | " enqueued %u crypto ops out of %u\n", |
| 791 | cqp->id, cqp->qp, ret, len); |
| 792 | /* drop packets that we fail to enqueue */ |
| 793 | for (i = ret; i < len; i++) |
| 794 | free_pkts(&cqp->buf[i]->sym->m_src, 1); |
| 795 | } |
| 796 | cqp->in_flight += ret; |
| 797 | cqp->len = 0; |
| 798 | } |
| 799 | |
| 800 | static inline void |
| 801 | enqueue_cop(struct cdev_qp *cqp, struct rte_crypto_op *cop) |
no test coverage detected