On Wed, Nov 15, 2023 at 08:28:55PM -0500, Dave Young wrote: > Bruce, > Is the following Linux update correct per your feedback? > Linux > ----- > To run DPDK applications without root privileges on Linux, perform the > following steps: > 1. **Create a DPDK User Group**: Create a new user group for DPDK and > add the desired user to this group. > 2. **Set Up Hugepages**: Configure hugepages for the user. > 3. **Bind the NIC to a User-Space Driver**: Use the DPDK tool > ``dpdk-devbind.py`` to bind the NIC to a user-space driver like > ``vfio-pci`` or ``igb_uio``
These three steps don't need to be covered in the docs. We already described elsewhere about configuring hugepages and binding the device. Also, to run as non-root, I would expect there to be a user a/c already available on the system that the deployer of the app wants to use. > 4. **Adjust Permissions for Specific Files and Directories**: > > - VFIO entries in ``/dev``, such as ``/dev/vfio/<id>``, where <id> > is the VFIO group to which a device used by DPDK belongs. > - The hugepage mount directory, typically ``/dev/hugepages`` on many > distributions, or any alternative mount point configured by the user, > e.g., ``/mnt/huge``, ``/mnt/huge_1G``. > Note: Running DPDK as non-root on Linux requires IOMMU support > through vfio. This note needs to be explicitly called out to the top of the instructions. The list of files to change the permissions on is key. The action - changing permissions - is common between Linux and BSD, but the specific files to adjust will be different. > 5. **Run the DPDK Application**: Run the desired DPDK application as > the user who has been added to the DPDK group. > FreeBSD > ------- > - The userspace-io device files in ``/dev``, for example, > ``/dev/uio0``, ``/dev/uio1``, and so on > - The userspace contiguous memory device: ``/dev/contigmem`` Regards, /Bruce