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

Function ipsec_session_free

dpdk/lib/pipeline/rte_swx_ipsec.c:1744–1762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1742}
1743
1744static void
1745ipsec_session_free(struct rte_swx_ipsec *ipsec,
1746 struct rte_ipsec_session *s)
1747{
1748 if (!s)
1749 return;
1750
1751 /* IPsec library SA. */
1752 if (s->sa)
1753 rte_ipsec_sa_fini(s->sa);
1754 free(s->sa);
1755
1756 /* Cryptodev library session. */
1757 if (s->crypto.ses)
1758 rte_cryptodev_sym_session_free(ipsec->dev_id, s->crypto.ses);
1759
1760 /* IPsec library session. */
1761 memset(s, 0, sizeof(*s));
1762}
1763
1764int
1765rte_swx_ipsec_sa_add(struct rte_swx_ipsec *ipsec,

Callers 2

rte_swx_ipsec_freeFunction · 0.85
rte_swx_ipsec_sa_deleteFunction · 0.85

Calls 4

rte_ipsec_sa_finiFunction · 0.85
memsetFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected