1
votes

Hello Stackoverflow experts,

I have been struggling with how to use the ip fragmentation provided by DPDK. and was wondering I have the correct concept of IP address and the MAC address used in rte-mbuf ethernet header.

Is Ip address alone in the header of rte-mbuf can be used to transfer from local to remote? I see in the DPDK sample applications that the ip address is used in the hashed tables such as IP fragment table after the packets are received, but the fact that data is actually received just by using ethernet mac address, gives me the impression that IP address is only defined by the DPDK user (developers using DPDK API) and not used in actual data transfer.

Is there something missing to what I understand?

1

1 Answers

1
votes

You are right. Most DPDK examples work on the second level of the OSI model, i.e. they only care about MAC addresses, not IP.

The IP reassembly example is based on L2 forwarding example, i.e. it acts as an Ethernet bridge. Though, it requires IP addresses to be analyzed, i.e. source and destination IPs must match for all the fragments of the same flow.

Now answering your questions:

Is Ip address alone in the header of rte-mbuf can be used to transfer from local to remote?

If you mean transfer using rte_eth_tx_burst() then no, IP header is not enough. The ethernet header must be filled properly as well.

IP address is only defined by the DPDK user (developers using DPDK API) and not used in actual data transfer.

Since the reassembly example is based on L2 forwarding example, it acts as reassembling Ethernet bridge. So you have a right impression, this example does not route packets based on IP addresses. It just uses IP addresses to reassemble IP fragments.