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

Function trs_process_step2

dpdk/lib/ipsec/esp_inb.c:520–535  ·  view source on GitHub ↗

* step two for transport mode: * - read SQN value (for future use) * - cut of ICV, ESP tail and padding bytes * - cut of ESP header and IV * - move L2/L3 header to fill the gap after ESP header removal */

Source from the content-addressed store, hash-verified

518 * - move L2/L3 header to fill the gap after ESP header removal
519 */
520static inline void *
521trs_process_step2(struct rte_mbuf *mb, struct rte_mbuf *ml, uint32_t hlen,
522 uint32_t adj, uint32_t tofs, uint32_t tlen, uint32_t *sqn)
523{
524 char *np, *op;
525
526 /* get start of the packet before modifications */
527 op = rte_pktmbuf_mtod(mb, char *);
528
529 /* cut off ESP header and IV */
530 np = tun_process_step2(mb, ml, hlen, adj, tofs, tlen, sqn);
531
532 /* move header bytes to fill the gap after ESP header removal */
533 remove_esph(np, op, hlen);
534 return np;
535}
536
537/*
538 * step three for transport mode:

Callers 1

trs_processFunction · 0.85

Calls 2

tun_process_step2Function · 0.85
remove_esphFunction · 0.85

Tested by

no test coverage detected