MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ipsec_prepare_crypto_group

Function ipsec_prepare_crypto_group

dpdk/examples/ipsec-secgw/ipsec_process.c:162–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162static uint32_t
163ipsec_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

Callers 1

ipsec_processFunction · 0.85

Calls 3

get_privFunction · 0.85
enqueue_cop_bulkFunction · 0.85

Tested by

no test coverage detected