* 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 */
| 410 | * - esp tail structure |
| 411 | */ |
| 412 | static inline void |
| 413 | process_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. |
no test coverage detected