* step two for tunnel mode: * - read SQN value (for future use) * - cut of ICV, ESP tail and padding bytes * - cut of ESP header and IV, also if needed - L2/L3 headers * (controlled by *adj* value) */
| 494 | * (controlled by *adj* value) |
| 495 | */ |
| 496 | static inline void * |
| 497 | tun_process_step2(struct rte_mbuf *mb, struct rte_mbuf *ml, uint32_t hlen, |
| 498 | uint32_t adj, uint32_t tofs, uint32_t tlen, uint32_t *sqn) |
| 499 | { |
| 500 | const struct rte_esp_hdr *ph; |
| 501 | |
| 502 | /* read SQN value */ |
| 503 | ph = rte_pktmbuf_mtod_offset(mb, const struct rte_esp_hdr *, hlen); |
| 504 | sqn[0] = ph->seq; |
| 505 | |
| 506 | /* cut of ICV, ESP tail and padding bytes */ |
| 507 | mbuf_cut_seg_ofs(mb, ml, tofs, tlen); |
| 508 | |
| 509 | /* cut of L2/L3 headers, ESP header and IV */ |
| 510 | return rte_pktmbuf_adj(mb, adj); |
| 511 | } |
| 512 | |
| 513 | /* |
| 514 | * step two for transport mode: |
no test coverage detected