* [PATCH v1] examples/ipsec-secgw: free the actual mbuf pointer
@ 2024-08-16 7:22 Vidya Sagar Velumuri
2024-08-22 4:03 ` Anoob Joseph
2024-10-09 14:53 ` Akhil Goyal
0 siblings, 2 replies; 3+ messages in thread
From: Vidya Sagar Velumuri @ 2024-08-16 7:22 UTC (permalink / raw)
To: Radu Nicolau, Akhil Goyal
Cc: jerinj, anoobj, vvelumuri, asasidharan, ktejasree, gmuthukrishn, dev
In case of crypto event vector, the vector points to crypto op structure
in priv area and not actual mbuf.
Extract the mbuf pointer and pass these to rte_mbuf_free to free the
mbufs.
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
diff --git a/examples/ipsec-secgw/ipsec_worker.c b/examples/ipsec-secgw/ipsec_worker.c
index c9c43ebd2b..dd14226e81 100644
--- a/examples/ipsec-secgw/ipsec_worker.c
+++ b/examples/ipsec-secgw/ipsec_worker.c
@@ -960,7 +960,18 @@ static void
ipsec_event_vector_free(struct rte_event *ev)
{
struct rte_event_vector *vec = ev->vec;
- rte_pktmbuf_free_bulk(vec->mbufs + vec->elem_offset, vec->nb_elem);
+
+ if (ev->event_type == RTE_EVENT_TYPE_CRYPTODEV_VECTOR) {
+ struct rte_crypto_op *cop;
+ int i;
+
+ for (i = 0; i < vec->nb_elem; i++) {
+ cop = vec->ptrs[i];
+ rte_pktmbuf_free(cop->sym->m_src);
+ }
+ } else {
+ rte_pktmbuf_free_bulk(vec->mbufs + vec->elem_offset, vec->nb_elem);
+ }
rte_mempool_put(rte_mempool_from_obj(vec), vec);
}
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH v1] examples/ipsec-secgw: free the actual mbuf pointer
2024-08-16 7:22 [PATCH v1] examples/ipsec-secgw: free the actual mbuf pointer Vidya Sagar Velumuri
@ 2024-08-22 4:03 ` Anoob Joseph
2024-10-09 14:53 ` Akhil Goyal
1 sibling, 0 replies; 3+ messages in thread
From: Anoob Joseph @ 2024-08-22 4:03 UTC (permalink / raw)
To: Vidya Sagar Velumuri, Radu Nicolau, Akhil Goyal
Cc: Jerin Jacob, Vidya Sagar Velumuri, Aakash Sasidharan,
Tejasree Kondoj, Gowrishankar Muthukrishnan, dev
> Subject: [PATCH v1] examples/ipsec-secgw: free the actual mbuf pointer
>
> In case of crypto event vector, the vector points to crypto op structure in priv area
> and not actual mbuf.
> Extract the mbuf pointer and pass these to rte_mbuf_free to free the mbufs.
>
> Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH v1] examples/ipsec-secgw: free the actual mbuf pointer
2024-08-16 7:22 [PATCH v1] examples/ipsec-secgw: free the actual mbuf pointer Vidya Sagar Velumuri
2024-08-22 4:03 ` Anoob Joseph
@ 2024-10-09 14:53 ` Akhil Goyal
1 sibling, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2024-10-09 14:53 UTC (permalink / raw)
To: Vidya Sagar Velumuri, Radu Nicolau
Cc: Jerin Jacob, Anoob Joseph, Vidya Sagar Velumuri,
Aakash Sasidharan, Tejasree Kondoj, Gowrishankar Muthukrishnan,
dev
> Subject: [PATCH v1] examples/ipsec-secgw: free the actual mbuf pointer
>
> In case of crypto event vector, the vector points to crypto op structure
> in priv area and not actual mbuf.
> Extract the mbuf pointer and pass these to rte_mbuf_free to free the
> mbufs.
>
> Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-09 14:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-16 7:22 [PATCH v1] examples/ipsec-secgw: free the actual mbuf pointer Vidya Sagar Velumuri
2024-08-22 4:03 ` Anoob Joseph
2024-10-09 14:53 ` Akhil Goyal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).