| 581 | } |
| 582 | |
| 583 | static int |
| 584 | create_aead_outbuf(struct nitrox_softreq *sr, struct nitrox_sglist *digest) |
| 585 | { |
| 586 | struct rte_crypto_op *op = sr->op; |
| 587 | int cnt = 0; |
| 588 | |
| 589 | sr->resp.orh = PENDING_SIG; |
| 590 | sr->out.sglist[cnt].len = sizeof(sr->resp.orh); |
| 591 | sr->out.sglist[cnt].iova = sr->iova + offsetof(struct nitrox_softreq, |
| 592 | resp.orh); |
| 593 | sr->out.sglist[cnt].virt = &sr->resp.orh; |
| 594 | cnt++; |
| 595 | sr->out.map_bufs_cnt = cnt; |
| 596 | if (op->sym->m_dst) { |
| 597 | int err; |
| 598 | |
| 599 | err = create_aead_oop_outbuf(sr, digest); |
| 600 | if (unlikely(err)) |
| 601 | return err; |
| 602 | } else { |
| 603 | create_aead_inplace_outbuf(sr, digest); |
| 604 | } |
| 605 | |
| 606 | cnt = sr->out.map_bufs_cnt; |
| 607 | sr->resp.completion = PENDING_SIG; |
| 608 | sr->out.sglist[cnt].len = sizeof(sr->resp.completion); |
| 609 | sr->out.sglist[cnt].iova = sr->iova + offsetof(struct nitrox_softreq, |
| 610 | resp.completion); |
| 611 | sr->out.sglist[cnt].virt = &sr->resp.completion; |
| 612 | cnt++; |
| 613 | RTE_ASSERT(cnt <= MAX_SGBUF_CNT); |
| 614 | sr->out.map_bufs_cnt = cnt; |
| 615 | |
| 616 | create_sgcomp(&sr->out); |
| 617 | sr->rptr = sr->iova + offsetof(struct nitrox_softreq, out.sgcomp); |
| 618 | return 0; |
| 619 | } |
| 620 | |
| 621 | static void |
| 622 | create_aead_gph(uint32_t cryptlen, uint16_t ivlen, uint32_t authlen, |
no test coverage detected