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

Function sop_aead_prepare

dpdk/lib/ipsec/esp_inb.c:42–53  ·  view source on GitHub ↗

* helper function to fill crypto_sym op for aead algorithms * used by inb_cop_prepare(), see below. */

Source from the content-addressed store, hash-verified

40 * used by inb_cop_prepare(), see below.
41 */
42static inline void
43sop_aead_prepare(struct rte_crypto_sym_op *sop,
44 const struct rte_ipsec_sa *sa, const union sym_op_data *icv,
45 uint32_t pofs, uint32_t plen)
46{
47 sop->aead.data.offset = pofs + sa->ctp.cipher.offset;
48 sop->aead.data.length = plen - sa->ctp.cipher.length;
49 sop->aead.digest.data = icv->va;
50 sop->aead.digest.phys_addr = icv->pa;
51 sop->aead.aad.data = icv->va + sa->icv_len;
52 sop->aead.aad.phys_addr = icv->pa + sa->icv_len;
53}
54
55/*
56 * setup crypto op and crypto sym op for ESP inbound packet.

Callers 1

inb_cop_prepareFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected