BlueField-3 DPU using Sriov Function

I have BlueField-3 DPU on my bare metal machine. The OS version is Centos 8.5 with kernel 4.18.0-348.7.1.el8_5.x86_64. The ofed I installed is MLNX_OFED_LINUX-5.8-4.1.5.0.
The BlueField-3 DPU type is as follows:


As you can see, I use the sriov function and generate two vfs (5e:00.3 and 5e:00.4) using echo ‘2’ > /sys/bus/pci/devices/0000:5e:00.0/sriov_numvfs. Then I put the two vfs into two network namespaces using the following commands:
ip netns add ns1
ip link set ens2f0v0 netns ns1
ip netns exec ns1 ip addr add 194.179.1.1/24 dev ens2f0v0
ip netns exec ns1 ip link set ens2f0v0 up
ip netns add ns2
ip link set ens2f0v1 netns ns2
ip netns exec ns2 ip addr add 194.179.1.2/24 dev ens2f0v1
ip netns exec ns2 ip link set ens2f0v1 up

However, when I enter ns1 and try to ping 194.179.1.2, it fails. Can anyone give me some advice about how to make it? Thanks a lot

Hi @starfly3119,

  • What is the mode of operation your BlueField-3 DPU is configured to work in? You can check this using the mlxconfig tool, as described in here: NVIDIA BlueField Modes of Operation - NVIDIA Docs
  • When you attempt to ping between the namespaces, are there any error messages appearing in dmesg?

Thanks,
Chen

Hi @chenh1:
I am using the DPU mode.


And there are no error messages in the dmesg.
Would it be ok for me to turn the Mode to Nic mode and simply treat the DPU as a ConnectX-7 NIC.

Hi @starfly3119,

Sure, it depends on your specific requirements.
Does ping work when the DPU is in NIC mode?

Thanks,
Chen

Hi @chenh1
I finally make it by following the doc BlueField SR-IOV - NVIDIA Docs. This time I generate two vfs in the BlueField OS and link the vf representors to the bridge ovsbr1.


Then I put the two vfs(enp3s0f0v0, ens3s0f0v1) into two network namespaces and it works. Thanks a lot.
Moreover, is it possible to generate vfs in the host, and should I install ovs in the host and link the vf representors?