DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Sending packets without memory freeing
@ 2015-10-28 14:52 Александр Самойлов
  2015-10-28 15:00 ` Wiles, Keith
  0 siblings, 1 reply; 2+ messages in thread
From: Александр Самойлов @ 2015-10-28 14:52 UTC (permalink / raw)
  To: users

 Hello, I'm developing a TCP reassembler of some sorts based on DPDK. Currently I'm working on TCP segments retransmission (because of time out).

To do so, I've developed the next idea: how about to keep every outgoing packet in a queue and remove them from there when the corresponding ACK has arrived. So the plan is simple: build a packet, push it into the queue, send it, wait for the ACK, remove the packet from the queue. If the retransmission time is out, retransmit the packet.

But this simple plan seems to be impractible, for DPDK frees mbufs when sending packets. So I really have to just copy all the packets before sending them, which is not a good idea, of course.

So I've thought that it could be nice to have an opportunity sometimes to send packets without actually freeing mbufs so that we could retransmit them if we have such a need.

P.S. Right now my actual plan is to go to the depths of DPDK, find the sending packets function and modify it a bit so it doesn't free the memory. But I have a suspision that it won't end well :)

P.S.S. Or maybe I'm missing something and there's an opportunity to send packets without freeing the memory after all?



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-users] Sending packets without memory freeing
  2015-10-28 14:52 [dpdk-users] Sending packets without memory freeing Александр Самойлов
@ 2015-10-28 15:00 ` Wiles, Keith
  0 siblings, 0 replies; 2+ messages in thread
From: Wiles, Keith @ 2015-10-28 15:00 UTC (permalink / raw)
  To: Александр
	Самойлов,
	users

On 10/28/15, 9:52 AM, "users on behalf of Александр Самойлов" <users-bounces@dpdk.org on behalf of cidjey1991@mail.ru> wrote:

> Hello, I'm developing a TCP reassembler of some sorts based on DPDK. Currently I'm working on TCP segments retransmission (because of time out).
>
>To do so, I've developed the next idea: how about to keep every outgoing packet in a queue and remove them from there when the corresponding ACK has arrived. So the plan is simple: build a packet, push it into the queue, send it, wait for the ACK, remove the packet from the queue. If the retransmission time is out, retransmit the packet.
>
>But this simple plan seems to be impractible, for DPDK frees mbufs when sending packets. So I really have to just copy all the packets before sending them, which is not a good idea, of course.

If you increment the refcnt then you can hold on to the mbuf after the driver frees the packet.
>
>So I've thought that it could be nice to have an opportunity sometimes to send packets without actually freeing mbufs so that we could retransmit them if we have such a need.
>
>P.S. Right now my actual plan is to go to the depths of DPDK, find the sending packets function and modify it a bit so it doesn't free the memory. But I have a suspision that it won't end well :)
>
>P.S.S. Or maybe I'm missing something and there's an opportunity to send packets without freeing the memory after all?
>
>
>


— 
Regards,
++Keith Wiles

Intel Corporation



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-28 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-28 14:52 [dpdk-users] Sending packets without memory freeing Александр Самойлов
2015-10-28 15:00 ` Wiles, Keith

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).