* [dpdk-users] Correct way to free the received packets after ip-assembly
@ 2018-11-07 3:45 Sungho Hong
2018-11-07 5:55 ` Muhammad Zain-ul-Abideen
0 siblings, 1 reply; 2+ messages in thread
From: Sungho Hong @ 2018-11-07 3:45 UTC (permalink / raw)
To: users
Hello DPDK experts,
I was wondering, when to free the received packets after we have assembled
the packets.
For example, I just want to receive the assembled packets and not forward
to any other ports. just want to free it right away.
However when we try to free the packets after assemble, I face segmentation
error.
here is the basic example of *examples/ip_reassembly/main.c*
Assuming that we do not forward the packets and just free the packets
ourselves, would it be possible to know the correct location to free the
packets?
Because I think the packets that I have freed are referenced some where
else, and causing the segmentation fault.
Locations that I have tried to free the assembled packets
-----------
for (i = 0; i < qconf->n_rx_queue; ++i) {
portid = qconf->rx_queue_list[i].portid;
nb_rx = rte_eth_rx_burst(portid, 0, pkts_burst,
MAX_PKT_BURST);
/* Prefetch first packets */
for (j = 0; j < PREFETCH_OFFSET && j < nb_rx; j++) {
rte_prefetch0(rte_pktmbuf_mtod(
pkts_burst[j], void *));
}
/* Prefetch and forward already prefetched packets */
for (j = 0; j < (nb_rx - PREFETCH_OFFSET); j++) {
rte_prefetch0(rte_pktmbuf_mtod(pkts_burst[
j + PREFETCH_OFFSET], void *));
reassemble(pkts_burst[j], portid,
i, qconf, cur_tsc);
* // attempted to free from here but failed *
}
/* Forward remaining prefetched packets */
for (; j < nb_rx; j++) {
reassemble(pkts_burst[j], portid,
i, qconf, cur_tsc);
* // attempted to free from here ** but failed *
}
*// attempted to free from here ** but failed *
rte_ip_frag_free_death_row(&qconf->death_row,
PREFETCH_OFFSET);
}
*// attempted to free from here ** but failed *
-----
Any insight on this issue would be greatly appreciated.
Best
Sungho Hong
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-users] Correct way to free the received packets after ip-assembly
2018-11-07 3:45 [dpdk-users] Correct way to free the received packets after ip-assembly Sungho Hong
@ 2018-11-07 5:55 ` Muhammad Zain-ul-Abideen
0 siblings, 0 replies; 2+ messages in thread
From: Muhammad Zain-ul-Abideen @ 2018-11-07 5:55 UTC (permalink / raw)
To: Sungho Hong; +Cc: users
I think you are freeing recieved msgs which are no assembled. Remove
assembled msgs instead
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-07 5:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-07 3:45 [dpdk-users] Correct way to free the received packets after ip-assembly Sungho Hong
2018-11-07 5:55 ` Muhammad Zain-ul-Abideen
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).