| 350 | } |
| 351 | |
| 352 | static int |
| 353 | create_cipher_outbuf(struct nitrox_softreq *sr) |
| 354 | { |
| 355 | struct rte_crypto_op *op = sr->op; |
| 356 | int err, cnt = 0; |
| 357 | struct rte_mbuf *m_dst = op->sym->m_dst ? op->sym->m_dst : |
| 358 | op->sym->m_src; |
| 359 | |
| 360 | sr->resp.orh = PENDING_SIG; |
| 361 | sr->out.sglist[cnt].len = sizeof(sr->resp.orh); |
| 362 | sr->out.sglist[cnt].iova = sr->iova + offsetof(struct nitrox_softreq, |
| 363 | resp.orh); |
| 364 | sr->out.sglist[cnt].virt = &sr->resp.orh; |
| 365 | cnt++; |
| 366 | |
| 367 | sr->out.map_bufs_cnt = cnt; |
| 368 | fill_sglist(&sr->out, sr->iv.len, sr->iv.iova, sr->iv.virt); |
| 369 | err = create_sglist_from_mbuf(&sr->out, m_dst, |
| 370 | op->sym->cipher.data.offset, |
| 371 | op->sym->cipher.data.length); |
| 372 | if (unlikely(err)) |
| 373 | return err; |
| 374 | |
| 375 | cnt = sr->out.map_bufs_cnt; |
| 376 | sr->resp.completion = PENDING_SIG; |
| 377 | sr->out.sglist[cnt].len = sizeof(sr->resp.completion); |
| 378 | sr->out.sglist[cnt].iova = sr->iova + offsetof(struct nitrox_softreq, |
| 379 | resp.completion); |
| 380 | sr->out.sglist[cnt].virt = &sr->resp.completion; |
| 381 | cnt++; |
| 382 | |
| 383 | RTE_ASSERT(cnt <= MAX_SGBUF_CNT); |
| 384 | sr->out.map_bufs_cnt = cnt; |
| 385 | |
| 386 | create_sgcomp(&sr->out); |
| 387 | sr->rptr = sr->iova + offsetof(struct nitrox_softreq, out.sgcomp); |
| 388 | |
| 389 | return 0; |
| 390 | } |
| 391 | |
| 392 | static void |
| 393 | create_cipher_gph(uint32_t cryptlen, uint16_t ivlen, struct gphdr *gph) |
no test coverage detected