top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Is it necessary to have physical interfaces as many as virtual machines spawned in a server if each VM uses dpdk ?

+2 votes
648 views

As per my understanding, if a process within a virtual machine is going to use dpdk for the fast path, it takes the control of physical interface.There is a use case for which i have to spin up multiple virtual machines on the same server to implement a service chaining functionality. Each service needs dpdk based interface. Now question is "Can I provide the same physical interface for the dpdk running in each VM somehow ?" Or it is not possible, sharing of same physical interface with the multiple virtual machines ?

posted Jan 23, 2018 by Harshita

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

3 Answers

0 votes

Same physical interface can be shared with multiple VM.

answer Feb 1, 2018 by Veer Pal Singh Yadav
0 votes

The Physical Function (PF) is a PCI Express (PCIe) function of a network adapter that supports the single root I/O virtualization (SR-IOV) interface. The PF includes the SR-IOV Extended Capability in the PCIe Configuration space.
The capability is used to configure and manage the SR-IOV functionality of the network adapter, such as enabling virtualization and exposing PCIe Virtual Functions (VFs).
After enabling the virtual functions, Virtual machines can access interfaces such as each VM owning the interfaces and using it.
In essence, it is possible to share physical interfaces among virtual machines if interface card supports SR-IOV.

answer Apr 12, 2018 by Ganesh
0 votes

There are multiple factors involved in your question. let me try to answer one at a time

is it necessary to have physical interfaces as many as virtual machines spawned in a server if each VM uses dpdk
[Answer] No

if a process within a virtual machine is going to use dpdk for the fast path, it takes the control of physical interface
[answer] this is true for Physical NIC with Driver set to use DPDK PMD. For AF_PACKET or XDP or PCAP this is not true.

use case for which i have to spin up multiple virtual machines on the same server to implement a service chaining functionality
[Answer] this makes the question really interesting. Let me explain

a. Let say you have 10 VM and you are using 10 Physcial ports. Then you will need a switch to enable siwthcing based on MAC or VLAN.
b. Let say the NIC you are using has embedded switch, which allows Hairpin/switching model. In this case either using PF or Flow director you have setup Virtual Ethernet Bridge to achieve the same.
c. Let say on host you run simple basicfwd (example application) in chained mode. you can achieve RX (port1) --> TX (vhost1) --> RX (vhost2) --> (TX) port2 by carefully editing the TX ports.
- List item

answer Nov 19, 2020 by anonymous
Similar Questions
0 votes

How a particular installation type affects DPDK uses within a host ?

0 votes

I am looking for internals how a host windows machine provides communication to virtual machines created through Oracle VM box ?

+1 vote

I download a DPDK based application and found the size of TX ring is 4 times more than size of RX ring. I could not get satisfactory answer or in other words, I couldn't understand.

...