<div dir="ltr">I am running a VM inside a VMWARE server (vSphere).<br>My goal it to set up DPDK with two HW ports, and set up a virtio_user to interact with the kernel stack.<br>In another app I have it working but instead of virtio_user I am running KNI, it works in IOVA-PA mode.<br>I am looking to replace the KNI.<br><br>When I try to set up virtio_user port as in the doc:<br><a href="https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path">https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path</a><br>I get a error it can't run in PA mode.<br><br><br>When I try to run as VA mode from a parameter, I get the following errors:<br>EAL: lib.eal log level changed from info to debug<br>EAL: Detected lcore 0 as core 0 on socket 0<br>EAL: Detected lcore 1 as core 0 on socket 0<br>EAL: Support maximum 128 logical core(s) by configuration.<br>EAL: Detected 2 lcore(s)<br>EAL: Detected 1 NUMA nodes<br>EAL: Checking presence of .so 'librte_eal.so.21.3'<br>EAL: Checking presence of .so 'librte_eal.so.21'<br>EAL: Checking presence of .so 'librte_eal.so'<br>EAL: Detected static linkage of DPDK<br>EAL: Ask a virtual area of 0x7000 bytes<br>EAL: Virtual area found at 0x100000000 (size = 0x7000)<br>EAL: Multi-process socket /var/run/dpdk/rte/mp_socket<br>EAL: DPAA Bus not present. Skipping.<br>EAL: VFIO PCI modules not loaded<br>EAL: Selected IOVA mode 'VA'<br>EAL: Probing VFIO support...<br>EAL: IOMMU type 1 (Type 1) is supported<br>EAL: IOMMU type 7 (sPAPR) is not supported<br>EAL: IOMMU type 8 (No-IOMMU) is supported<br>EAL: VFIO support initialized<br>EAL: Ask a virtual area of 0x5b000 bytes<br>EAL: Virtual area found at 0x100007000 (size = 0x5b000)<br>EAL: Setting up physically contiguous memory...<br>EAL: Setting maximum number of open files to 1048576<br>EAL: Detected memory type: socket_id:0 hugepage_sz:1073741824<br>EAL: Creating 2 segment lists: n_segs:128 socket_id:0 hugepage_sz:1073741824<br>EAL: Ask a virtual area of 0x2000 bytes<br>EAL: Virtual area found at 0x100062000 (size = 0x2000)<br>EAL: Memseg list allocated at socket 0, page size 0x100000kB<br>EAL: Ask a virtual area of 0x2000000000 bytes<br>EAL: Virtual area found at 0x140000000 (size = 0x2000000000)<br>EAL: VA reserved for memseg list at 0x140000000, size 2000000000<br>EAL: Ask a virtual area of 0x2000 bytes<br>EAL: Virtual area found at 0x2140000000 (size = 0x2000)<br>EAL: Memseg list allocated at socket 0, page size 0x100000kB<br>EAL: Ask a virtual area of 0x2000000000 bytes<br>EAL: Virtual area found at 0x2180000000 (size = 0x2000000000)<br>EAL: VA reserved for memseg list at 0x2180000000, size 2000000000<br>EAL: TSC frequency is ~2350000 KHz<br>EAL: Main lcore 0 is ready (tid=7f8ad790ec00;cpuset=[0])<br>EAL: lcore 1 is ready (tid=7f8ad6907400;cpuset=[1])<br>EAL: Trying to obtain current memory policy.<br>EAL: Setting policy MPOL_PREFERRED for socket 0<br>EAL: Restoring previous memory policy: 0<br>EAL: request: mp_malloc_sync<br>EAL: Heap on socket 0 was expanded by 1024MB<br>EAL: PCI device 0000:0b:00.0 on NUMA socket -1<br>EAL:   probe driver: 15ad:7b0 net_vmxnet3<br>EAL:   Expecting 'PA' IOVA mode but current mode is 'VA', not initializing<br>EAL: Requested device 0000:0b:00.0 cannot be used<br>EAL: PCI device 0000:13:00.0 on NUMA socket -1<br>EAL:   probe driver: 15ad:7b0 net_vmxnet3<br>EAL:   Expecting 'PA' IOVA mode but current mode is 'VA', not initializing<br>EAL: Requested device 0000:13:00.0 cannot be used<br>EAL: Bus (pci) probe failed.<br>EAL: lib.telemetry log level changed from disabled to warning<br>EAL: Error - exiting with code: 1<br>  Cause: Error: number of ports must be even<br>EAL: request: mp_malloc_sync<br>EAL: Heap on socket 0 was shrunk by 1024MB<br><br><br><br>For some reason the HW ports won't setup. From what I understand net_vmxnet3 should work with VA mode.<br>I enabled I/OMUU for the VM.<br>The weird thing even when enabled, I still have the enable_unsafe_noiommu_mode flag on.<br>And because it's on the this:<br><br>dev_iova_mode = pci_device_iova_mode(dr, dev);<br><br>return PA mode, and it fails.<br><br>When I disable it by modifying /sys/module/vfio/parameters/enable_unsafe_noiommu_mode, I get another error.<br>The error is that it doesn't find a suitable IOMMU type:<br>Just putting the relevant message:<br><br><br>EAL: Heap on socket 0 was expanded by 1024MB<br>EAL: PCI device 0000:0b:00.0 on NUMA socket -1<br>EAL:   probe driver: 15ad:7b0 net_vmxnet3<br>EAL: Set IOMMU type 1 (Type 1) failed, error 19 (No such device)<br>EAL: Set IOMMU type 7 (sPAPR) failed, error 19 (No such device)<br>EAL: Set IOMMU type 8 (No-IOMMU) failed, error 19 (No such device)<br>EAL: 0000:0b:00.0 failed to select IOMMU type<br>EAL: Requested device 0000:0b:00.0 cannot be used<br>EAL: PCI device 0000:13:00.0 on NUMA socket -1<br>EAL:   probe driver: 15ad:7b0 net_vmxnet3<br>EAL: Set IOMMU type 1 (Type 1) failed, error 19 (No such device)<br>EAL: Set IOMMU type 7 (sPAPR) failed, error 19 (No such device)<br>EAL: Set IOMMU type 8 (No-IOMMU) failed, error 19 (No such device)<br>EAL: 0000:13:00.0 failed to select IOMMU type<br>EAL: Requested device 0000:13:00.0 cannot be used<br><br><br>I can see where it fails:<br><br><br>const struct vfio_iommu_type *<br>vfio_set_iommu_type(int vfio_container_fd)<br>{<br>      unsigned idx;<br> for (idx = 0; idx < RTE_DIM(iommu_types); idx++) {<br>         const struct vfio_iommu_type *t = &iommu_types[idx];<br><br>            int ret = ioctl(vfio_container_fd, VFIO_SET_IOMMU,<br>                            t->type_id);<br>               if (!ret) {<br>                   RTE_LOG(INFO, EAL, "Using IOMMU type %d (%s)\n",<br>                                    t->type_id, t->name);<br>                   return t;<br>             }<br>             /* not an error, there may be more supported IOMMU types */<br>           RTE_LOG(DEBUG, EAL, "Set IOMMU type %d (%s) failed, error "<br>                         "%i (%s)\n", t->type_id, t->name, errno,<br>                              strerror(errno));<br>     }<br>     /* if we didn't find a suitable IOMMU type, fail */<br>       return NULL;<br>}<br><br><br>The ioctl returns -1.<br><br><br><br>I tried many things.<br>Enabling/disabling IOMMU.<br>Modifying the enable_unsafe_noiommu_mode flag.<br>Running in PA mode.<br>Any help will be much appreciated. <br></div>