Reputation: 58
I am new to DPDK and network application development. I have setup my linux machine and bound 1 NIC to DPDK using dpdk-devbind usertool. Details are: DPDK version: 22.11 OS : Ubuntu 22.04 NIC driver : i40e Using vfio-pci.
I am able to receive the default traffic which is mostly seems to be for discovery of the device. This server / NIC is connected to a network switch and after that to the other servers. My other application (which is a full fledged L7 , HTTP application without using DPDK) is running on a different server which is connected to the same network switch.
How can I route the traffic from my HTTP application (via switch) to this DPDK based application (NIC), considering the DPDK bound NIC has no IP assigned.
I have run dpdk-testpmd application and tested couple of in-built commands. Those are running fine and stats are printed for Rx and Tx. Even I ran the dpdk-pdump application and able to capture packets as pcap file. But How can I capture / receive packets of my real application (which is running on a different server).
Upvotes: 1
Views: 579
Reputation: 434
I was in same problem. Dont worry, its easy. unlike other application, in dpdk you will have to do the work of ip exposure by yourself. the port you bound to dpdk is now down, right? did that port have any assigned ip or do you have any spare ip for that server ? if so you can simnply intercept arp requests and reply for the ip you want to expose to public. you can look into "bond" project inside "examples" in dpdk git, and observe how they exposed the desired ip. once you expose your IP through arp responding you are good to go and you will get any packets desired for that IP.
little background on ARP in simple language (operates in layer 2 of OSI networking model, Address Resolution Protocol): Router sends ip resolve requests (which active ip is bound to which mac) for all the valid IP's it is configured with and switch forward these requests to all the servers connected to it which are called "arp requests". Normally kernel replies to these arp requests once you configure your ip to a interface(mac), but here you have to do it on your own. Once you start replying for valid IP (configured for that server), you are good to go
Upvotes: 0