Hi all,

 I am trying to bring virtual network interface for intercell communication, 
normally in other hypervisor I observed one physical NIC used for host-machine 
and for guest machine we used virtual NIC by Bridged networking or NAT 
service.The jailhouse also used the similar mechanism to communicate between 
cells. Can someone provide pointer how virtual ethernet actually works on 
jailhouse.

I referred the .inter-cell-communication.txt' to bringup the virtual network 
interface. 

The following option has experimented to communicate between cells.

Option : PCI NIC config added both root and non-root cell

                /* PCI-NIC interface*/  
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
                        .iommu = 1,
                        .domain = 0x0,
                        .bdf = 0x100,
                        .bar_mask = {
                                0xfffe0000, 0xfffe0000, 0xffffffe0,
                                0x00000000, 0x00000000, 0x00000000,
                        },
                        .caps_start = 0,
                        .num_caps = 5,
                        .num_msi_vectors = 1,
                        .msi_64bits = 1,
                        .num_msix_vectors = 0,
                        .msix_region_size = 0x0,
                        .msix_address = 0x0,
                },

        
        also adding below configuration in both root and non-root cell.

                // PCI device
                {
                        .type = JAILHOUSE_PCI_TYPE_IVSHMEM,
                        .domain = 0x0,
                        .bdf = 0x0e << 3,
                        .bar_mask = {
                                0xffffff00, 0xffffffff, 0x00000000,
                                0x00000000, 0xffffffe0, 0xffffffff,
                        },
                        .num_msix_vectors = 1,
                        .shmem_region = 3,
                        .shmem_protocol = JAILHOUSE_SHMEM_PROTO_VETH,
                },

                        /* MemRegion: 404100000 : IVSHMEM :JH-added */
                {
                        .phys_start = 0x404100000,
                        .virt_start = 0x404100000,
                        .size = 0x100000,
                        .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
                                 JAILHOUSE_MEM_ROOTSHARED,
                },

After adding above all configuration we were able to see IVSHMEM-VETH interface 
on non-root cell.
        
[root@localhost ~]# cat /proc/iomem
.....
0000000100000000-00000001000000ff : ivshmem-net
0000000100000100-000000010000011f : 0000:00:0e.0
0000000404100000-00000004041fffff : ivshmem-net
.....

[root@localhost ~]# cat /proc/interrupts
           CPU0       CPU1
  4:       1271          0   IO-APIC-4-fasteoi        serial
 24:        404          0   PCI-MSI-524288-edge      enp1s0f0
 25:          0          0   PCI-MSI-229376-edge      ivshmem-net[0000:00:0e.0]
.......

[root@localhost ~]# lspci
00:00.0 Host bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D 
DMI2 (rev 01)
00:0e.0 Unassigned class [ff01]: Red Hat, Inc Inter-VM shared memory
01:00.0 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet 
Controller (rev 06)

Observation :
 * able to assign ip address to both PCI-NIC and virtual network interface.with 
this configuaration able to ping between cell and outside world, but Rx/Tx 
packets count not increased in the virtual network interface.

 * if we remove the PCI-NIC in the non root cell we able to create virtual 
network interface and assiging the IP address but not able to ping between 
cells.

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to