erpc-io / eRPC

Efficient RPCs for datacenter networks
https://erpc.io/
Other
835 stars 137 forks source link

Question/Request-for-Information on configuring DPDK NICs for use with eRPC #71

Closed gshanemiller closed 2 years ago

gshanemiller commented 2 years ago

I'm trying to use eRPC on AWS .metal instances. I have the code built with AWS vfio-patches. In order to be logged into the machine while having a free ENA NIC for eRPC, I attach a second NIC. ./dpdk-devbind.py is able to see the second NIC, bind to it. All that's working fine.

Here's my question: the second ENA NIC which is bound to vfio-pci doesn't have an IP address e.g. running ip a does not list the second NIC as it's bound to vfio-pci for direct access. On the other hand the hello world needs a server name / IP-address for the client and sever. What should I provide there? My choices seem to be two. Which one is correct?

anujkaliaiitd commented 2 years ago

Hello. As of now, I've not tested eRPC on AWS though it might "just work". eRPC is supported on Azure (see https://github.com/erpc-io/eRPC#running-erpc-over-dpdk-on-microsoft-azure-vms).

The IP addresses provided to hello_world should be the "control network" IPs, or the IP addresses of the first NIC in your case. eRPC picks an available DPDK-capable port with a different DPDK-specific mechanism.

Getting an IP for the second NIC is tricky. On Azure, I'm assuming that the second NIC is called "eth1" as a temporary hack, and it has an assigned IP address.. Then eRPC gets the IP address of this NIC like so: https://github.com/erpc-io/eRPC/blob/master/src/transport_impl/dpdk/dpdk_transport.cc#L277. You'll probably need to modify this if your interface is named different than "eth1".

gshanemiller commented 2 years ago

Thank you for your time here. In return I will provide a detailed eRPC+AWS setup guide and benchmark results.

My understanding re: this issue then is,

I'd appreciate one additional bit of information if possible. Once the DPDK NIC is bound to vfio-pci the DPDK Linux manual at https://doc.dpdk.org/guides/linux_gsg/linux_drivers.html#vfio mentions other setup steps including:

Create the desired number of VF devices echo 2 > /sys/bus/pci/devices/0000:86:00.0/sriov_numvfs

Do you also need to do this before running eRPC code? Or does the eRPC code create VF devices programmatically as needed? What is the upper bound on the number of VF devices? For example, maybe one of these approaches makes sense?

Finally: is a VF device duplex (sends and receives)? Or just RX or just TX only?

Thank you.

anujkaliaiitd commented 2 years ago

Thanks!

Similar to the instructions for running eRPC on Azure, I think there's no need to create VFs on the second NIC. eRPC "takes over" the second NIC from the OS kernel via DPDK. I'm not sure if it's even possible to create a VF, since the NIC exposed to the VM is already a VF, from the perspective of the physical host.

DPDK has some instructions specifically for ENA: https://doc.dpdk.org/guides/nics/ena.html. These don't seem to mention creating a VF. You might even try binding to igb_uio instead of vfio-pci.

Please LMK if I should clarify anything.

gshanemiller commented 2 years ago

Resolved - I will cycle back with AWS perf data & setup instructions ASAP.

shenweihai1 commented 1 year ago

@gshanemiller do you mind posting the steps about how to run the eRPC experiment on the aws? I can't get it to work on aws, the eRPC complains Device RX ring too small which seems it can't find a second DPDK network interface (I also modified hardcoded eth1 to the correct one).