1
votes

Hello Stackoverflow experts,

I am trying to send 4096 byte of message by splitting the message into 4 packets.

However, Simply sending the messages in bursts does not guarantee that the messages will be received in order. So I am having trouble to find out which library (Reorder library or IP fragmentation) will help me to guarantee that the messages will be received in order.

https://doc.dpdk.org/guides/prog_guide/reorder_lib.html https://doc.dpdk.org/guides/sample_app_ug/ip_frag.html

For example if I send 3 messages in 3 bursts I receive messages like this below

ex) send (3 burst) [1111111] [22222] [33333]

ex) recv [33333] [22222] [1111111]

So In order to solve this issue, I was struggling with reorder library and ip fragmentation in l3fwd example. Which library do I have to use in order to achieve the result like this below? (IP fragmentation or Reorder Library)

ex) send (3 burst) [1111111] [22222] [33333]

ex) recv [1111111] [22222] [33333]

1

1 Answers

1
votes

You are right, to fragment packet we use rte_ipv4_fragment_packet().

To reassemble fragmented packet we should create a table of fragments with rte_ip_frag_table_create() and then use rte_ipv4_frag_reassemble_packet() function.

Please have a look at Programmer's Guide and here is a reassembly sample application.

The reorder library you have mentioned is designed to reorder based on sequence numbers, not fragment offsets. In other words, the workflow is as follow:

  1. We assign sequence numbers to the mbufs.
  2. We process those mbufs on different threads, i.e. the order is mixed now.
  3. We reorder those mbufs back using reorder library.

So it is similar, but it is not the same as ip packet reassembly.