MCPcopy Create free account
hub / github.com/F-Stack/f-stack / create_cipher_outbuf

Function create_cipher_outbuf

dpdk/drivers/crypto/nitrox/nitrox_sym_reqmgr.c:352–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352static int
353create_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
392static void
393create_cipher_gph(uint32_t cryptlen, uint16_t ivlen, struct gphdr *gph)

Callers 1

process_cipher_dataFunction · 0.85

Calls 3

fill_sglistFunction · 0.85
create_sglist_from_mbufFunction · 0.85
create_sgcompFunction · 0.85

Tested by

no test coverage detected