Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-1787

Running VPP as unprivileged process

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Medium Medium
    • 24.02
    • None
    • Devices, VPPInfra
    • None

      Starting VPP as unprivileged process throws errors.

       

      When running VPP as unprivileged:

      • with hugepages mounted as user (uid/gid=1000) and
      • with modified permissions of /dev/vfio-pci

      Following errors are seen:

      vpp:

      mincore(0x1000000000, 1, [0])           = 0
      close(5)                                = 0
      getpid()                                = 6320
      writev(2, [{iov_base="/usr/bin/vpp[6320]: buffer: vlib"..., iov_len=154}], 1/usr/bin/vpp[6320]: buffer: vlib_physmem_shared_map_create: pmalloc_map_pages: Unable to fulfill huge page allocation request: No such file or directory) = 154

      /dev/vfio-pci

      $ ls -al /dev/vfio/
      total 0
      drwxr-xr-x 2 root root 100 Oct 7 23:56 .
      drwxr-xr-x 19 root root 4440 Oct 7 23:56 ..
      crw------- 1 testuser testuser 241, 0 Oct 7 23:56 59

      ..
      2019/10/08 00:17:19:483 debug pci 0000:07:02.0: open vid:0x8086 did:0x154c driver:vfio-pci iommu_group:59
      2019/10/08 00:17:19:588 debug pci 0000:07:02.0: add_device_vfio region_info index:7 size:0x1000 offset:0x70000000000 flags: rd wr (0x3)
      2019/10/08 00:17:19:701 debug pci 0000:07:02.0: map region 0 to va 0x0
      2019/10/08 00:17:19:701 debug pci 0000:07:02.0: vlib_pci_region region_info index:0 size:0x10000 offset:0x0 flags: rd wr mmap (0x7)
      2019/10/08 00:17:19:701 debug pci 0000:07:02.0: vfio_set_irqs index:2 count:5 flags: eventfd noresize (0x9)
      2019/10/08 00:17:19:701 debug pci 0000:07:02.0: vfio_set_irqs index:2 count:5 flags: eventfd noresize (0x9)
      2019/10/08 00:17:19:808 err avf 0000:00:00.0: error: vlib_physmem_last_error: unknown error
      from avf_create_if: pci-addr 0000:07:02.0

      While DPDK testpmd has no issue to use /dev/hugepages/rte_*.

      $ build/app/testpmd --no-pci -c 0x7 – --nb-cores=2
      EAL: Detected 32 lcore(s)
      EAL: Detected 2 NUMA nodes
      EAL: Multi-process socket /tmp/dpdk/rte/mp_socket
      EAL: Selected IOVA mode 'VA'
      EAL: No available hugepages reported in hugepages-1048576kB
      EAL: Probing VFIO support...
      EAL: VFIO support initialized
      testpmd: No probed ethernet devices
      testpmd: create a new mbuf pool <mbuf_pool_socket_0>: n=163456, size=2176, socket=0
      testpmd: preferred mempool ops selected: ring_mp_mc
      Done
      No commandline core given, start packet forwarding
      io packet forwarding - ports=0 - cores=0 - streams=0 - NUMA support enabled, MP allocation mode: native

       io packet forwarding packets/burst=32
       nb forwarding cores=2 - nb forwarding ports=0
      Press enter to exit

            ayourtch Andrew Yourtchenko
            mackonstan Maciek Konstantynowicz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: