| 925 | } |
| 926 | |
| 927 | static inline int32_t |
| 928 | ipsec_inline_dequeue(ipsec_xform_fn xform_func, struct ipsec_ctx *ipsec_ctx, |
| 929 | struct rte_mbuf *pkts[], uint16_t max_pkts) |
| 930 | { |
| 931 | int32_t nb_pkts, ret; |
| 932 | struct ipsec_mbuf_metadata *priv; |
| 933 | struct ipsec_sa *sa; |
| 934 | struct rte_mbuf *pkt; |
| 935 | |
| 936 | nb_pkts = 0; |
| 937 | while (ipsec_ctx->ol_pkts_cnt > 0 && nb_pkts < max_pkts) { |
| 938 | pkt = ipsec_ctx->ol_pkts[--ipsec_ctx->ol_pkts_cnt]; |
| 939 | rte_prefetch0(pkt); |
| 940 | priv = get_priv(pkt); |
| 941 | sa = priv->sa; |
| 942 | ret = xform_func(pkt, sa, &priv->cop); |
| 943 | if (unlikely(ret)) { |
| 944 | free_pkts(&pkt, 1); |
| 945 | continue; |
| 946 | } |
| 947 | pkts[nb_pkts++] = pkt; |
| 948 | } |
| 949 | |
| 950 | return nb_pkts; |
| 951 | } |
| 952 | |
| 953 | static inline int |
| 954 | ipsec_dequeue(ipsec_xform_fn xform_func, struct ipsec_ctx *ipsec_ctx, |
no test coverage detected