DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] A simpler question - does DPDK run over virtual interfaces?
@ 2021-04-13 11:39 Templin (US), Fred L
  2021-04-13 16:32 ` Stephen Hemminger
  2021-05-05 16:19 ` Ferruh Yigit
  0 siblings, 2 replies; 4+ messages in thread
From: Templin (US), Fred L @ 2021-04-13 11:39 UTC (permalink / raw)
  To: users

Let me backtrack and start by asking a simpler question - can DPDK run over
virtual interfaces such as a loopback?

Thanks - Fred

> -----Original Message-----
> From: Templin (US), Fred L
> Sent: Monday, April 12, 2021 10:42 AM
> To: 'users@dpdk.org' <users@dpdk.org>
> Subject: Problems using DPDK within CORE emulations running on Ubuntu 18.04 VMs
> 
> Hi, I am running Ubuntu 18.04 in a VM running on VirtualBox. I have built and
> installed DPDK-20.11 from sources and had no troubles building by following
> the Getting Started Guide for Linux instructions:
> 
> http://doc.dpdk.org/guides/linux_gsg/intro.html
> 
> Next, within the Ubuntu VM I run the CORE network emulator:
> 
> https://www.nrl.navy.mil/Our-Work/Areas-of-Research/Information-Technology/NCS/CORE/
> 
> I have a simple two-node network setup with two CORE vnodes connected
> via a network switch, and verified that I can ping between the two nodes.
> Now, I want to experiment with the DPDK-20.11 "ip_fragmentation" and
> "ip_reassembly" example programs (which I was able to build successfully)
> but it appears that these example programs require ports to be mapped.
> 
> So, I skipped ahead to Section 5 of the Getting Started Guide for Linux
> ("Linux Drivers") and tried to follow the instructions in Section 5.5. on
> "Binding and Unbinding Network Ports to/from the Kernel Modules" by
> typing commands into one of the CORE vnode shell windows. The text
> at the end of this message shows the commands I typed and the output
> I was shown in response. In particular, the "dpdk-devbind.py --status"
> script does not appear to show a usable map of my CORE vnode
> network interfaces, and attempts to bind were unsuccessful.
> 
> Has anyone ever run DPDK out of a CORE vnode before and/or can
> you tell me what steps are needed to be able to bind CORE vnode
> interfaces so that they can be used by DPDK? Or, is DPDK simply
> incompatible with virtualization environments.
> 
> Another question - can DPDK be run over loopback interfaces?
> 
> Thanks - Fred
> 
> ---
> 
> Script started on 2021-04-12 09:54:19-0700
> root@n1: pwd
> /home/fltemplin/src/DPDK/dpdk-20.11/usertools
> root@n1: ip link sho
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> 5: eth0@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
>     link/ether 00:00:00:aa:00:00 brd ff:ff:ff:ff:ff:ff link-netnsid 0
> root@n1: sudo modprobe vfio-pci
> root@n1: ip link sho
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> 5: eth0@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
>     link/ether 00:00:00:aa:00:00 brd ff:ff:ff:ff:ff:ff link-netnsid 0
> root@n1: ./dpdk-devbind.py --status
> 
> Network devices using kernel driver
> ===================================
> 0000:00:03.0 '82540EM Gigabit Ethernet Controller 100e' if= drv=e1000 unused=vfio-pci
> 0000:00:08.0 '82540EM Gigabit Ethernet Controller 100e' if= drv=e1000 unused=vfio-pci
> 
> No 'Baseband' devices detected
> ==============================
> 
> No 'Crypto' devices detected
> ============================
> 
> No 'Eventdev' devices detected
> ==============================
> 
> No 'Mempool' devices detected
> =============================
> 
> No 'Compress' devices detected
> ==============================
> 
> No 'Misc (rawdev)' devices detected
> ===================================
> 
> No 'Regex' devices detected
> ===========================
> root@n1: exit
> 
> Script done on 2021-04-12 09:55:41-0700
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-users] A simpler question - does DPDK run over virtual interfaces?
  2021-04-13 11:39 [dpdk-users] A simpler question - does DPDK run over virtual interfaces? Templin (US), Fred L
@ 2021-04-13 16:32 ` Stephen Hemminger
  2021-05-05 16:19 ` Ferruh Yigit
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2021-04-13 16:32 UTC (permalink / raw)
  To: Templin (US), Fred L; +Cc: users

On Tue, 13 Apr 2021 11:39:07 +0000
"Templin (US), Fred L" <Fred.L.Templin@boeing.com> wrote:

> Let me backtrack and start by asking a simpler question - can DPDK run over
> virtual interfaces such as a loopback?
> 
> Thanks - Fred

DPDK runs over devices that can be made to appear in userspace.
This include hardware (PCI), and virtualization (virtio, hyperv) where memory
normally used by kernel can be mmapd for userspace driver.

It is also possible to use DPDK virtual devices (tap, packet, xdp) which
use existing kernel API's to access packets. These are slower but more general.

Not sure what you expect here. Loopback device in kernel is special, and
trying to make that go to DPDK would be hard.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-users] A simpler question - does DPDK run over virtual interfaces?
  2021-04-13 11:39 [dpdk-users] A simpler question - does DPDK run over virtual interfaces? Templin (US), Fred L
  2021-04-13 16:32 ` Stephen Hemminger
@ 2021-05-05 16:19 ` Ferruh Yigit
  1 sibling, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2021-05-05 16:19 UTC (permalink / raw)
  To: Templin (US), Fred L, users

On 4/13/2021 12:39 PM, Templin (US), Fred L wrote:
> Let me backtrack and start by asking a simpler question - can DPDK run over
> virtual interfaces such as a loopback?
> 

It can, using DPDK virtual interfaces, like using 'af_packet' or 'pcap'. Like:
"./build/app/dpdk-testpmd --vdev net_af_packet0,iface=lo --no-pci -- -i"

I don't know about CORE vnode, but if it is seen as another Linux virtual
interface, above should work same.

This may work to test/check some functionality, but for performance you will
need the physical interfaces.

Btw, binding a physical interface to vfio driver is to enable driving it by
DPDK, you don't need this step for Linux virtual interfaces.

> Thanks - Fred
> 
>> -----Original Message-----
>> From: Templin (US), Fred L
>> Sent: Monday, April 12, 2021 10:42 AM
>> To: 'users@dpdk.org' <users@dpdk.org>
>> Subject: Problems using DPDK within CORE emulations running on Ubuntu 18.04 VMs
>>
>> Hi, I am running Ubuntu 18.04 in a VM running on VirtualBox. I have built and
>> installed DPDK-20.11 from sources and had no troubles building by following
>> the Getting Started Guide for Linux instructions:
>>
>> http://doc.dpdk.org/guides/linux_gsg/intro.html
>>
>> Next, within the Ubuntu VM I run the CORE network emulator:
>>
>> https://www.nrl.navy.mil/Our-Work/Areas-of-Research/Information-Technology/NCS/CORE/
>>
>> I have a simple two-node network setup with two CORE vnodes connected
>> via a network switch, and verified that I can ping between the two nodes.
>> Now, I want to experiment with the DPDK-20.11 "ip_fragmentation" and
>> "ip_reassembly" example programs (which I was able to build successfully)
>> but it appears that these example programs require ports to be mapped.
>>
>> So, I skipped ahead to Section 5 of the Getting Started Guide for Linux
>> ("Linux Drivers") and tried to follow the instructions in Section 5.5. on
>> "Binding and Unbinding Network Ports to/from the Kernel Modules" by
>> typing commands into one of the CORE vnode shell windows. The text
>> at the end of this message shows the commands I typed and the output
>> I was shown in response. In particular, the "dpdk-devbind.py --status"
>> script does not appear to show a usable map of my CORE vnode
>> network interfaces, and attempts to bind were unsuccessful.
>>
>> Has anyone ever run DPDK out of a CORE vnode before and/or can
>> you tell me what steps are needed to be able to bind CORE vnode
>> interfaces so that they can be used by DPDK? Or, is DPDK simply
>> incompatible with virtualization environments.
>>
>> Another question - can DPDK be run over loopback interfaces?
>>
>> Thanks - Fred
>>
>> ---
>>
>> Script started on 2021-04-12 09:54:19-0700
>> root@n1: pwd
>> /home/fltemplin/src/DPDK/dpdk-20.11/usertools
>> root@n1: ip link sho
>> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
>>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>> 5: eth0@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
>>     link/ether 00:00:00:aa:00:00 brd ff:ff:ff:ff:ff:ff link-netnsid 0
>> root@n1: sudo modprobe vfio-pci
>> root@n1: ip link sho
>> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
>>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>> 5: eth0@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
>>     link/ether 00:00:00:aa:00:00 brd ff:ff:ff:ff:ff:ff link-netnsid 0
>> root@n1: ./dpdk-devbind.py --status
>>
>> Network devices using kernel driver
>> ===================================
>> 0000:00:03.0 '82540EM Gigabit Ethernet Controller 100e' if= drv=e1000 unused=vfio-pci
>> 0000:00:08.0 '82540EM Gigabit Ethernet Controller 100e' if= drv=e1000 unused=vfio-pci
>>
>> No 'Baseband' devices detected
>> ==============================
>>
>> No 'Crypto' devices detected
>> ============================
>>
>> No 'Eventdev' devices detected
>> ==============================
>>
>> No 'Mempool' devices detected
>> =============================
>>
>> No 'Compress' devices detected
>> ==============================
>>
>> No 'Misc (rawdev)' devices detected
>> ===================================
>>
>> No 'Regex' devices detected
>> ===========================
>> root@n1: exit
>>
>> Script done on 2021-04-12 09:55:41-0700
>>
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-users] A simpler question - does DPDK run over virtual interfaces?
@ 2021-05-05 16:27 Templin (US), Fred L
  0 siblings, 0 replies; 4+ messages in thread
From: Templin (US), Fred L @ 2021-05-05 16:27 UTC (permalink / raw)
  To: Ferruh Yigit, users

Thank you for this insight. I have made good progress since I originally posted
this message, and I now seem to be getting what I need out of DPDK using
virtual interfaces for the time being. As you note, we will hopefully circle
back to using physical interfaces for improved performance purposes as
we gain more experience.

Fred

> -----Original Message-----
> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
> Sent: Wednesday, May 05, 2021 9:19 AM
> To: Templin (US), Fred L <Fred.L.Templin@boeing.com>; users@dpdk.org
> Subject: Re: [dpdk-users] A simpler question - does DPDK run over virtual interfaces?
> 
> On 4/13/2021 12:39 PM, Templin (US), Fred L wrote:
> > Let me backtrack and start by asking a simpler question - can DPDK run over
> > virtual interfaces such as a loopback?
> >
> 
> It can, using DPDK virtual interfaces, like using 'af_packet' or 'pcap'. Like:
> "./build/app/dpdk-testpmd --vdev net_af_packet0,iface=lo --no-pci -- -i"
> 
> I don't know about CORE vnode, but if it is seen as another Linux virtual
> interface, above should work same.
> 
> This may work to test/check some functionality, but for performance you will
> need the physical interfaces.
> 
> Btw, binding a physical interface to vfio driver is to enable driving it by
> DPDK, you don't need this step for Linux virtual interfaces.
> 
> > Thanks - Fred
> >
> >> -----Original Message-----
> >> From: Templin (US), Fred L
> >> Sent: Monday, April 12, 2021 10:42 AM
> >> To: 'users@dpdk.org' <users@dpdk.org>
> >> Subject: Problems using DPDK within CORE emulations running on Ubuntu 18.04 VMs
> >>
> >> Hi, I am running Ubuntu 18.04 in a VM running on VirtualBox. I have built and
> >> installed DPDK-20.11 from sources and had no troubles building by following
> >> the Getting Started Guide for Linux instructions:
> >>
> >> http://doc.dpdk.org/guides/linux_gsg/intro.html
> >>
> >> Next, within the Ubuntu VM I run the CORE network emulator:
> >>
> >> https://www.nrl.navy.mil/Our-Work/Areas-of-Research/Information-Technology/NCS/CORE/
> >>
> >> I have a simple two-node network setup with two CORE vnodes connected
> >> via a network switch, and verified that I can ping between the two nodes.
> >> Now, I want to experiment with the DPDK-20.11 "ip_fragmentation" and
> >> "ip_reassembly" example programs (which I was able to build successfully)
> >> but it appears that these example programs require ports to be mapped.
> >>
> >> So, I skipped ahead to Section 5 of the Getting Started Guide for Linux
> >> ("Linux Drivers") and tried to follow the instructions in Section 5.5. on
> >> "Binding and Unbinding Network Ports to/from the Kernel Modules" by
> >> typing commands into one of the CORE vnode shell windows. The text
> >> at the end of this message shows the commands I typed and the output
> >> I was shown in response. In particular, the "dpdk-devbind.py --status"
> >> script does not appear to show a usable map of my CORE vnode
> >> network interfaces, and attempts to bind were unsuccessful.
> >>
> >> Has anyone ever run DPDK out of a CORE vnode before and/or can
> >> you tell me what steps are needed to be able to bind CORE vnode
> >> interfaces so that they can be used by DPDK? Or, is DPDK simply
> >> incompatible with virtualization environments.
> >>
> >> Another question - can DPDK be run over loopback interfaces?
> >>
> >> Thanks - Fred
> >>
> >> ---
> >>
> >> Script started on 2021-04-12 09:54:19-0700
> >> root@n1: pwd
> >> /home/fltemplin/src/DPDK/dpdk-20.11/usertools
> >> root@n1: ip link sho
> >> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
> >>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> >> 5: eth0@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
> >>     link/ether 00:00:00:aa:00:00 brd ff:ff:ff:ff:ff:ff link-netnsid 0
> >> root@n1: sudo modprobe vfio-pci
> >> root@n1: ip link sho
> >> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
> >>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> >> 5: eth0@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
> >>     link/ether 00:00:00:aa:00:00 brd ff:ff:ff:ff:ff:ff link-netnsid 0
> >> root@n1: ./dpdk-devbind.py --status
> >>
> >> Network devices using kernel driver
> >> ===================================
> >> 0000:00:03.0 '82540EM Gigabit Ethernet Controller 100e' if= drv=e1000 unused=vfio-pci
> >> 0000:00:08.0 '82540EM Gigabit Ethernet Controller 100e' if= drv=e1000 unused=vfio-pci
> >>
> >> No 'Baseband' devices detected
> >> ==============================
> >>
> >> No 'Crypto' devices detected
> >> ============================
> >>
> >> No 'Eventdev' devices detected
> >> ==============================
> >>
> >> No 'Mempool' devices detected
> >> =============================
> >>
> >> No 'Compress' devices detected
> >> ==============================
> >>
> >> No 'Misc (rawdev)' devices detected
> >> ===================================
> >>
> >> No 'Regex' devices detected
> >> ===========================
> >> root@n1: exit
> >>
> >> Script done on 2021-04-12 09:55:41-0700
> >>
> >


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-05 16:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 11:39 [dpdk-users] A simpler question - does DPDK run over virtual interfaces? Templin (US), Fred L
2021-04-13 16:32 ` Stephen Hemminger
2021-05-05 16:19 ` Ferruh Yigit
2021-05-05 16:27 Templin (US), Fred L

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).