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

Function event_crypto_enqueue

dpdk/examples/ipsec-secgw/ipsec_worker.c:385–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385static inline int
386event_crypto_enqueue(struct rte_mbuf *pkt,
387 struct ipsec_sa *sa, const struct eh_event_link_info *ev_link)
388{
389 struct rte_ipsec_session *sess;
390 struct rte_event ev;
391 int ret;
392
393 /* Get IPsec session */
394 sess = ipsec_get_primary_session(sa);
395
396 crypto_prepare_event(pkt, sess, &ev);
397
398 /* Enqueue event to crypto adapter */
399 ret = rte_event_crypto_adapter_enqueue(ev_link->eventdev_id,
400 ev_link->event_port_id, &ev, 1);
401 if (unlikely(ret != 1)) {
402 /* pkt will be freed by the caller */
403 RTE_LOG_DP(DEBUG, IPSEC, "Cannot enqueue event: %i (errno: %i)\n", ret, rte_errno);
404 return rte_errno;
405 }
406
407 return 0;
408}
409
410static inline int
411process_ipsec_ev_inbound(struct ipsec_ctx *ctx, struct route_table *rt,

Callers 2

process_ipsec_ev_inboundFunction · 0.85

Calls 3

crypto_prepare_eventFunction · 0.85

Tested by

no test coverage detected