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

Function process_step1

dpdk/lib/ipsec/esp_inb.c:412–425  ·  view source on GitHub ↗

* Start with processing inbound packet. * This is common part for both tunnel and transport mode. * Extract information that will be needed later from mbuf metadata and * actual packet data: * - mbuf for packet's last segment * - length of the L2/L3 headers * - esp tail structure */

Source from the content-addressed store, hash-verified

410 * - esp tail structure
411 */
412static inline void
413process_step1(struct rte_mbuf *mb, uint32_t tlen, struct rte_mbuf **ml,
414 struct rte_esp_tail *espt, uint32_t *hlen, uint32_t *tofs)
415{
416 const struct rte_esp_tail *pt;
417 uint32_t ofs;
418
419 ofs = mb->pkt_len - tlen;
420 hlen[0] = mb->l2_len + mb->l3_len;
421 ml[0] = mbuf_get_seg_ofs(mb, &ofs);
422 pt = rte_pktmbuf_mtod_offset(ml[0], const struct rte_esp_tail *, ofs);
423 tofs[0] = ofs;
424 espt[0] = pt[0];
425}
426
427/*
428 * Helper function to check pad bytes values.

Callers 2

tun_processFunction · 0.85
trs_processFunction · 0.85

Calls 1

mbuf_get_seg_ofsFunction · 0.85

Tested by

no test coverage detected