* helper routine for inline and cpu(synchronous) processing * this is just to satisfy inbound_sa_check() and get_hop_for_offload_pkt(). * Should be removed in future. */
| 55 | * Should be removed in future. |
| 56 | */ |
| 57 | static inline void |
| 58 | prep_process_group(void *sa, struct rte_mbuf *mb[], uint32_t cnt) |
| 59 | { |
| 60 | uint32_t j; |
| 61 | struct ipsec_mbuf_metadata *priv; |
| 62 | |
| 63 | for (j = 0; j != cnt; j++) { |
| 64 | priv = get_priv(mb[j]); |
| 65 | priv->sa = sa; |
| 66 | /* setup TSO related fields if TSO enabled*/ |
| 67 | if (priv->sa->mss) { |
| 68 | uint32_t ptype = mb[j]->packet_type; |
| 69 | /* only TCP is supported */ |
| 70 | if ((ptype & RTE_PTYPE_L4_MASK) == RTE_PTYPE_L4_TCP) { |
| 71 | mb[j]->tso_segsz = priv->sa->mss; |
| 72 | if ((IS_TUNNEL(priv->sa->flags))) { |
| 73 | mb[j]->outer_l3_len = mb[j]->l3_len; |
| 74 | mb[j]->outer_l2_len = mb[j]->l2_len; |
| 75 | mb[j]->ol_flags |= |
| 76 | RTE_MBUF_F_TX_TUNNEL_ESP; |
| 77 | if (RTE_ETH_IS_IPV4_HDR(ptype)) |
| 78 | mb[j]->ol_flags |= |
| 79 | RTE_MBUF_F_TX_OUTER_IP_CKSUM; |
| 80 | } |
| 81 | mb[j]->l4_len = sizeof(struct rte_tcp_hdr); |
| 82 | mb[j]->ol_flags |= (RTE_MBUF_F_TX_TCP_SEG | |
| 83 | RTE_MBUF_F_TX_TCP_CKSUM); |
| 84 | if (RTE_ETH_IS_IPV4_HDR(ptype)) |
| 85 | mb[j]->ol_flags |= |
| 86 | RTE_MBUF_F_TX_OUTER_IPV4; |
| 87 | else |
| 88 | mb[j]->ol_flags |= |
| 89 | RTE_MBUF_F_TX_OUTER_IPV6; |
| 90 | } |
| 91 | } |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | static __rte_always_inline void |
| 96 | adjust_ipv4_pktlen(struct rte_mbuf *m, const struct rte_ipv4_hdr *iph, |
no test coverage detected