DPDK usage discussions
 help / color / mirror / Atom feed
From: Long Li <longli@microsoft.com>
To: Nandini Rangaswamy <nandini.rangaswamy@broadcom.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: RE: Query regarding netvsc PMD : VF removal
Date: Sat, 27 Jul 2024 01:14:20 +0000	[thread overview]
Message-ID: <SJ1PR21MB36501B2A5096094106F29411CEB52@SJ1PR21MB3650.namprd21.prod.outlook.com> (raw)
In-Reply-To: <CAAkQrK8Rsg2y+JWmKxUrVR6is5osrx-8BtRWezG-gKD7s0mseA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3566 bytes --]

The VF data path is separate from the synthetic data path. The chart doesn’t show clearly that all the VF packets go directly to DPDK.

From the physical NIC, the packet data can either go through VF, or through netvsc, but not at the same time.

In practice, the synthetic path carries small number of packets (<1%). The majority of packets go through the VF path.

From: Nandini Rangaswamy <nandini.rangaswamy@broadcom.com>
Sent: Friday, July 26, 2024 3:46 PM
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: users@dpdk.org; Long Li <longli@microsoft.com>
Subject: Re: Query regarding netvsc PMD : VF removal

Hi Stephen and Long,
I am trying to understand the complete packet path and I am confused here.  The synthetic device is being created and managed by a driver in guest kernel space.
Shouldn't the packets be directly DMAed from NIC to VFs in guest. If all packets go through synthetic interface to the VF, then wouldn't kernel get involved here and defeat the purpose of DPDK ?
Please find attached a block diagram that i came up with highlights the devices and drivers and my understanding of their interactions.
I have shown in the diagram that for every VNIC , a synthetic and VF is present . Synthetic interfaces are managed by uio_hv_generic and VFs that appear as PCI devices in the guest kernel are managed by MLNX.
I have also shown that netvsc pmd depends on uio_hv_generic module. The red arrow represents synthetic data path and green arrows represent the accelerated data path.
I am still unclear about pkt flow from NIC to VF through synthetic interface and vice-versa involving netvsc pmd, mlnx driver/PMD.
Can you please clarify this?
Regards,
Nandini


On Thu, Jul 25, 2024 at 2:52 PM Stephen Hemminger <stephen@networkplumber.org<mailto:stephen@networkplumber.org>> wrote:
On Thu, 25 Jul 2024 11:41:59 -0700
Nandini Rangaswamy <nandini.rangaswamy@broadcom.com<mailto:nandini.rangaswamy@broadcom.com>> wrote:

> Hi Stephen,
> I am using the DPDK 22.11.5 LTS. Should the DPDK code take care of
> unbinding synthetic interface from uio_hv_generic or should it be done by
> the app when it gets hotplug notification?
> Regards,
> Nandini

The synthetic device (netvsc) controlled by uio_hv_generic is never hot plugged.
Only the VF which is mlx device can be removed and added.
The management of the VF for traffic is handled completely internally to
the netvsc device (same as the Linux netdevice). What happens is the
host notifys the guest over vmbus when VF changes. For devices handled
by the DPDK (netvsc PMD), this notification causes it to add/remove use
of the VF.

The VF should not be used directly. The synthetic device (netvsc) routes
traffic over the VF and reads from it when it is present and up.

This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.

[-- Attachment #2: Type: text/html, Size: 7287 bytes --]

  reply	other threads:[~2024-07-27  1:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-25 17:52 Nandini Rangaswamy
2024-07-25 18:11 ` Stephen Hemminger
2024-07-25 18:41   ` Nandini Rangaswamy
2024-07-25 21:52     ` Stephen Hemminger
2024-07-26 22:45       ` Nandini Rangaswamy
2024-07-27  1:14         ` Long Li [this message]
2024-08-05 21:52           ` Nandini Rangaswamy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ1PR21MB36501B2A5096094106F29411CEB52@SJ1PR21MB3650.namprd21.prod.outlook.com \
    --to=longli@microsoft.com \
    --cc=nandini.rangaswamy@broadcom.com \
    --cc=stephen@networkplumber.org \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).