<div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 30 Apr 2025 at 22:21, Stephen Hemminger <<a href="mailto:stephen@networkplumber.org" target="_blank">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 Wed, 30 Apr 2025 22:00:29 +0530<br>
Prashant Upadhyaya <<a href="mailto:praupadhyaya@gmail.com" target="_blank">praupadhyaya@gmail.com</a>> wrote:<br>
<br>
> On Wed, 30 Apr 2025 at 19:58, Stephen Hemminger <<a href="mailto:stephen@networkplumber.org" target="_blank">stephen@networkplumber.org</a>><br>
> wrote:<br>
> <br>
> > On Wed, 30 Apr 2025 13:00:53 +0530<br>
> > Prashant Upadhyaya <<a href="mailto:praupadhyaya@gmail.com" target="_blank">praupadhyaya@gmail.com</a>> wrote:<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 <br>
> > path) <br>
> > > > and VF (fast path) combined. Or use the older vdev_netvsc/failsafe/tap<br>
> > > > 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 <br>
> > 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 <br>
> > failsafe <br>
> > > > PMD<br>
> > > > (not netvsc PMD) and the limitations are that the emulation of <br>
> > rte_flow <br>
> > > > in the TAP device only supports a few things.<br>
> > > > <br>
> > ><br>
> > > Thanks Stephen, the above information was very instructive.<br>
> > > If I do use the Netvsc PMD with the latest DPDK, will my DPDK app get the<br>
> > > non IP packets like ARP, please confirm.<br>
> > > I quickly tried the Netvsc PMD but don't seem to be getting the ARP <br>
> > packets <br>
> > > in still.<br>
> > > When you mention "The failsafe PMD is what is exposed for application<br>
> > > usage", what is the meaning of this, are the apps expected to use <br>
> > failsafe <br>
> > > PMD, please suggest.<br>
> > ><br>
> > > Regards<br>
> > > -Prashant <br>
> ><br>
> > ARP handled differently in virtual network environments. The ARP packets<br>
> > sent<br>
> > get consumed and replied to by the network infrastructure (in all virtual<br>
> > networks<br>
> > not just Azure). Non-IP packets always show up on the synthetic VMBus<br>
> > device.<br>
> ><br>
> > Current docs are here:<br>
> ><br>
> > <a href="https://learn.microsoft.com/en-us/azure/virtual-network/setup-dpdk?tabs=redhat" rel="noreferrer" target="_blank">https://learn.microsoft.com/en-us/azure/virtual-network/setup-dpdk?tabs=redhat</a><br>
> ><br>
> > See vdev_netvsc for picture.<br>
> > <a href="https://doc.dpdk.org/guides/nics/vdev_netvsc.html" rel="noreferrer" target="_blank">https://doc.dpdk.org/guides/nics/vdev_netvsc.html</a><br>
> ><br>
> ><br>
> > Thanks again Stephen. I finally was able to run the netvsc pmd and it is <br>
> detecting the ports.<br>
> However, for every accelerated networking interface of Azure, it detects<br>
> 'two' ports. This is presumably for controlling both the slow and fast path<br>
> ?<br>
> This poses an issue for my app as it wanted to see only 'one' interface in<br>
> its control as a lot of business logic is kind of tied to it.<br>
> So a question -- am I observing correctly that DPDK, in case of netvsc,<br>
> will enumerate two ports for each accelerated networking interface ?<br>
> <br>
> Regards<br>
> -Prashant<br>
<br>
The hidden VF interfaces are "owned" in DPDK.<br>
If you use the standard API's in ethdev it will skip the owned interfaces.<br>
<br>
/**<br>
* Macro to iterate over all enabled and ownerless ethdev ports.<br>
*/<br>
#define RTE_ETH_FOREACH_DEV(p) \<br>
RTE_ETH_FOREACH_DEV_OWNED_BY(p, RTE_ETH_DEV_NO_OWNER)<br>
<br></blockquote><div><br></div><div>It seems that the owner is updated at the port only after the port is 'started' -- wanted to confirm if I should go through the normal motions of rte_eth_dev_configure, rte_eth_rx_queue_setup, rte_eth_tx_queue_setup, rte_eth_dev_start for 'both' the ports and after the link is detected (and the owner is set by DPDK), do I iterate like you have suggested, and call the tx/rx burst api's only on the non-owned port numbers for I/O.</div><div><br></div></div></div>
</div>