<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, 29 Apr 2025 at 21:54, Stephen Hemminger <<a href="mailto:stephen@networkplumber.org">stephen@networkplumber.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, 29 Apr 2025 21:45:36 +0530<br>
Prashant Upadhyaya <<a href="mailto:praupadhyaya@gmail.com" target="_blank">praupadhyaya@gmail.com</a>> wrote:<br>
<br>
> On Mon, 28 Apr 2025 at 21:07, Stephen Hemminger <<a href="mailto:stephen@networkplumber.org" target="_blank">stephen@networkplumber.org</a>><br>
> wrote:<br>
> <br>
> > On Mon, 28 Apr 2025 11:31:10 +0530<br>
> > Prashant Upadhyaya <<a href="mailto:praupadhyaya@gmail.com" target="_blank">praupadhyaya@gmail.com</a>> wrote:<br>
> > <br>
> > > On Sat, 26 Apr 2025 at 20:58, Stephen Hemminger <<br>
> > <a href="mailto:stephen@networkplumber.org" target="_blank">stephen@networkplumber.org</a>><br>
> > > wrote:<br>
> > > <br>
> > > > On Fri, 25 Apr 2025 23:17:30 +0530<br>
> > > > Prashant Upadhyaya <<a href="mailto:praupadhyaya@gmail.com" target="_blank">praupadhyaya@gmail.com</a>> wrote:<br>
> > > > <br>
> > > > > Hi,<br>
> > > > ><br>
> > > > > I am having a VM on Azure where I have got two 'accelerated <br>
> > networking' <br>
> > > > > interfaces of Mellanox<br>
> > > > > # lspci -nn|grep -i ether<br>
> > > > > 6561:00:02.0 Ethernet controller [0200]: Mellanox Technologies <br>
> > MT27710 <br>
> > > > > Family [ConnectX-4 Lx Virtual Function] [15b3:1016] (rev 80)<br>
> > > > > f08c:00:02.0 Ethernet controller [0200]: Mellanox Technologies <br>
> > MT27710 <br>
> > > > > Family [ConnectX-4 Lx Virtual Function] [15b3:1016] (rev 80)<br>
> > > > ><br>
> > > > > I have a DPDK application which needs to obtain 'all' packets from <br>
> > the <br>
> > > > NIC. <br>
> > > > > I installed the drivers, compiled DPDK24.11 (Ubuntu20.04), my app <br>
> > starts <br>
> > > > > and is able to detect the NIC's.<br>
> > > > > Everything looks good<br>
> > > > > myapp.out -c 0x07 -a f08c:00:02.0 -a 6561:00:02.0<br>
> > > > > EAL: Detected CPU lcores: 8<br>
> > > > > EAL: Detected NUMA nodes: 1<br>
> > > > > EAL: Detected shared linkage of DPDK<br>
> > > > > EAL: Multi-process socket /var/run/dpdk/rte/mp_socket<br>
> > > > > EAL: Selected IOVA mode 'PA'<br>
> > > > > EAL: VFIO support initialized<br>
> > > > > mlx5_net: Default miss action is not supported.<br>
> > > > > mlx5_net: Default miss action is not supported.<br>
> > > > > All Ports initialized<br>
> > > > > Port 0 is UP (50000 Mbps)<br>
> > > > > Port 1 is UP (50000 Mbps)<br>
> > > > ><br>
> > > > > The trouble is that the ARP packets are not being picked up by my <br>
> > DPDK <br>
> > > > > application, I see them being delivered to the kernel via the eth <br>
> > > > interface <br>
> > > > > corresponding to the port (MLX is a bifurcated driver, you don't <br>
> > really <br>
> > > > > bind to the NIC, so you still see the eth interfaces at linux level <br>
> > and <br>
> > > > can <br>
> > > > > run tcpdump on those, I see ARP packets in the tcpdump there on the<br>
> > > > > interface)<br>
> > > > > I can receive UDP packets in my DPDK app though.<br>
> > > > ><br>
> > > > > My application is not setting any rte_flow rules etc. so I was <br>
> > expecting <br>
> > > > > that by default my dpdk app would get all the packets as is normally <br>
> > the <br>
> > > > > case with other NIC's<br>
> > > > > Is there something I need to configure for Mellanox NIC somewhere <br>
> > such <br>
> > > > that <br>
> > > > > I get 'all' the packets including ARP packets in my DPDK app ?<br>
> > > > ><br>
> > > > > Regards<br>
> > > > > -Prashant <br>
> > > ><br>
> > > > The Mellanox device in Azure networking cards is only used as a VF <br>
> > switch. <br>
> > > > You can go back to earlier DPDK presentations for more detail.<br>
> > > ><br>
> > > > Three reason bifurcation won't work.<br>
> > > > 1. Only some of the packets arrive on the VF. All non-IP show up on<br>
> > > > the synthetic device. The VF is only used after the TCP three way<br>
> > > > handshake.<br>
> > > > 2. The Netvsc PMD doesn't handle flow rules.<br>
> > > > 3. The VF can be removed and restored any time (by hypervisor)<br>
> > > > it is not a stable entity.<br>
> > > ><br>
> > > > <br>
> > > Thanks Stephen, so are we concluding that DPDK apps are unusable in <br>
> > Azure <br>
> > > as per my requirements, is there no work around or any other possibility <br>
> > to <br>
> > > use DPDK in Azure VM ? Please do send me a link to the correct <br>
> > presentation <br>
> > > I should refer to.<br>
> > ><br>
> > > Regards<br>
> > > -Prashant <br>
> ><br>
> > Remember in the cloud network interfaces are free, there really is no need<br>
> > for bifurication just create two interfaces to VM, one for DPDK, and one<br>
> > for<br>
> > non DPDK.<br>
> > <br>
> <br>
> I am afraid Stephen, I am not entirely clear about your suggestion.<br>
> When I create an Accelerated Networking interface on Azure (with the<br>
> intention of my DPDK app fully controlling it), it is automatically giving<br>
> one eth interface (representing slowpath) and one enp interface (presumably<br>
> the fast path and which my dpdk app detects and operates upon). It is this<br>
> pair that is created automatically for a single packet interface by Azure.<br>
> The trouble is the above bifurcation because I don't get to see all the<br>
> packets from the NIC on DPDK controlled interface -- my DPDK app wants to<br>
> see all the packets.<br>
> <br>
> Regards<br>
> -Prashant<br>
<br>
With DPDK on Azure, an application should never use the VF directly.<br>
It needs to use either netvsc PMD which handles both the vmbus (slow path)<br>
and VF (fast path) combined. Or use the older vdev_netvsc/failsafe/tap combination.<br>
The latter uses a virtual device to make a failsafe PMD which then does<br>
a combination of TAP (via kernel slow path) and MLX5 VF. The failsafe PMD<br>
is what is exposed for application usage.<br>
<br>
The limitations are not explicitly mentioned in the documentation but:<br>
- don't use VF directly in application<br>
- there is no support for bifurcation where some packets go to kernel<br>
and some to DPDK<br>
- there is only very limited support for rte_flow; that is with failsafe PMD<br>
(not netvsc PMD) and the limitations are that the emulation of rte_flow<br>
in the TAP device only supports a few things.<br></blockquote><div><br></div><div>Thanks Stephen, the above information was very instructive.</div><div>If I do use the Netvsc PMD with the latest DPDK, will my DPDK app get the non IP packets like ARP, please confirm.</div><div>I quickly tried the Netvsc PMD but don't seem to be getting the ARP packets in still.</div><div>When you mention "The failsafe PMD is what is exposed for application usage", what is the meaning of this, are the apps expected to use failsafe PMD, please suggest.</div><div><br></div><div>Regards</div><div>-Prashant</div><div><br></div></div></div>