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

Function copy_iv

dpdk/lib/ipsec/crypto.h:237–256  ·  view source on GitHub ↗

* Helper routine to copy IV * Right now we support only algorithms with IV length equals 0/8/16 bytes. */

Source from the content-addressed store, hash-verified

235 * Right now we support only algorithms with IV length equals 0/8/16 bytes.
236 */
237static inline void
238copy_iv(uint64_t dst[IPSEC_MAX_IV_QWORD],
239 const uint64_t src[IPSEC_MAX_IV_QWORD], uint32_t len)
240{
241 RTE_BUILD_BUG_ON(IPSEC_MAX_IV_SIZE != 2 * sizeof(uint64_t));
242
243 switch (len) {
244 case IPSEC_MAX_IV_SIZE:
245 dst[1] = src[1];
246 /* fallthrough */
247 case sizeof(uint64_t):
248 dst[0] = src[0];
249 /* fallthrough */
250 case 0:
251 break;
252 default:
253 /* should never happen */
254 RTE_ASSERT(NULL);
255 }
256}
257
258/*
259 * from RFC 4303 3.3.2.1.4:

Callers 4

inb_cop_prepareFunction · 0.85
inb_cpu_crypto_prepareFunction · 0.85
outb_tun_pkt_prepareFunction · 0.85
outb_trs_pkt_prepareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected