<div dir="ltr"><div style="font-family:monospace,monospace;font-size:small" class="gmail_default">Hi all,<br><br>                     _______________________              _______________________<br>                    |                       |            |                       |<br>                    |   Virtual Machine 1   |            |   Virtual Machine 2   |<br>                    |      ___________      |            |     ___________       |<br>                    |     |           |     |            |    |           |      |<br>                    |     | VM1 Memory|     |            |    |VM2 Memory |      |<br>                    |     |___________|     |            |    |___________|      |<br>                    |             ^         |            |         ^             |<br>                    |____________ | ________|            |________ | ____________|<br>                                  |                                |<br>                                  |                                |<br>                          ________V________________________________V___________ <br>                          |       |                                |           |  <br>                          |       |           IOMMU                |           |  <br>                          |_______|________________________________|___________|<br>                                  ^                                ^<br>                                  |                                |<br>                         [To/From VM1 Buffers]            [To/From VM2 Buffers]     HOST<br>                  ----------------|--------------------------------|------------------------<br>                        _________ | ______________________________ |_____________   PCI Device<br>                       |          |          PCI NIC CARD          |             |<br>                       |          |      (Single PCI Function)     |             |<br>                       |        __|________________________________|__           |<br>                       |       |  |                                |  |          |<br>                       |       |  |        PCIe DMA                |  |          |<br>                       |       |_ |_______________________________ |__|          |<br>                       |          |                                |             |<br>                       |          V                                V             |<br>                       |     Queue for VM1                   Queues for VM2      |<br>                       |       |RX|TX|                          |RX|TX|          |<br>                       |       |RX|TX|                          |RX|TX|          |<br>                       |       |RX|TX|                          |RX|TX|          |<br>                       |          ^                                ^             |<br>                       |          |       ___________________      |             |<br>                       |          |      |                   |     |             |<br>                       |          ------>|  Queue Classifier |<----              |<br>                       |                 |___________________|                   |<br>                       |                 |                   |                   |<br>                       |                 |        MAC        |                   |<br>                       |                 |___________________|    ------         |<br>                       |__________________________________________|Port|_________|<br>                                                                  ------<br>                                                                    ||<br>                                                                    ||<br>                                                                    ||___<br>                                                                    |___----> To Network Fabric<br><br><br><br><br>We are trying to share the PCIe NIC card with multiple VMs. PCI NIC card has one Physical function (NO SRIOV support).<br><br>The NIC has multiple queues (each with TX and RX descriptor ring). Packets are placed in queue based on packet classifier(Ex: MAC addresses). So each queue can be used for a network interface, therefore host can have multiple virtual network interfaces. We are planning to assign each queue to each VM (emulate like PCI Virual functions, but our HW doesnt support Virtual function). Packet buffer for corresponding queue will reside in VM's memory.<br><br>DMA in the PCI card need to push/pull packet data to/from directly to the VM's memory (for this we need IOMMU support).<br><br>How VFIO can be used to achieve this ?<br>A if VFIO is not possible, any other methods can be used here ?<br>are there any other methods without any intermediate CPU memory copy?<br><br><br clear="all"></div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div></div><div dir="ltr"><div><b style="font-size:11pt"><br><br><font face="monospace, monospace" color="#0b5394">Regards,</font></b><font face="monospace, monospace" color="#0b5394"><br></font></div><p style="font-size:11pt;margin:0in 0in 0pt">


<font face="monospace, monospace" color="#0b5394"><span><span>Sasikumar</span></span> Natarajan</font></p><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;display:inline"><font face="monospace, monospace" color="#0b5394">​.​</font></div><font face="monospace, monospace" color="#0b5394"><br></font><p></p></div></div></div></div></div></div></div></div></div></div>
</div>