| 160 | } |
| 161 | |
| 162 | static uint32_t |
| 163 | ipsec_prepare_crypto_group(struct ipsec_ctx *ctx, struct ipsec_sa *sa, |
| 164 | struct rte_ipsec_session *ips, struct rte_mbuf **m, |
| 165 | unsigned int cnt) |
| 166 | { |
| 167 | struct cdev_qp *cqp; |
| 168 | struct rte_crypto_op *cop[cnt]; |
| 169 | uint32_t j, k; |
| 170 | struct ipsec_mbuf_metadata *priv; |
| 171 | |
| 172 | cqp = sa->cqp[ctx->lcore_id]; |
| 173 | |
| 174 | /* for that app each mbuf has it's own crypto op */ |
| 175 | for (j = 0; j != cnt; j++) { |
| 176 | priv = get_priv(m[j]); |
| 177 | cop[j] = &priv->cop; |
| 178 | /* |
| 179 | * this is just to satisfy inbound_sa_check() |
| 180 | * should be removed in future. |
| 181 | */ |
| 182 | priv->sa = sa; |
| 183 | } |
| 184 | |
| 185 | /* prepare and enqueue crypto ops */ |
| 186 | k = rte_ipsec_pkt_crypto_prepare(ips, m, cop, cnt); |
| 187 | if (k != 0) |
| 188 | enqueue_cop_bulk(cqp, cop, k); |
| 189 | |
| 190 | return k; |
| 191 | } |
| 192 | |
| 193 | /* |
| 194 | * finish processing of packets successfully decrypted by an inline processor |
no test coverage detected