doc: simplify bbdev PMD steps
v4 cover doc: simplify bbdev PMD steps
Hi Thomas,
v4: Typo in previous version email.
v3: Further split recommended by Thomas.
v2: Split the doc update into 2 as suggested by Thomas.
Documentation update suggested by Thomas to point towards the common kernel modules steps.
Nicolas Chautru (3):
doc: make the Linux drivers doc more generic
doc: simplify the binding steps
doc: simplify and clarify the configuration steps
doc/guides/bbdevs/acc100.rst | 91 +++----------- doc/guides/bbdevs/acc200.rst | 93 +++------------ doc/guides/bbdevs/fpga_5gnr_fec.rst | 158 +++---------------------- doc/guides/bbdevs/fpga_lte_fec.rst | 158 +++---------------------- doc/guides/linux_gsg/linux_drivers.rst | 14 +-- 5 files changed, 73 insertions(+), 441 deletions(-)
Signature · 1 line
2.37.1
PATCH v4 1/3 doc: make the Linux drivers doc more generic
Minor change so that for the documentation to be less NIC centric, as these steps can apply more generally to PCIe devices.
--- doc/guides/linux_gsg/linux_drivers.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
doc/guides/linux_gsg/linux_drivers.rst +7 -7
@@ -12,12 +12,12 @@ Linux Drivers Different PMDs may require different kernel drivers in order to work properly. Depending on the PMD being used, a corresponding kernel driver should be loaded, -and network ports should be bound to that driver. +and network ports or other hardware devices should be bound to that driver. .. _linux_gsg_binding_kernel: -Binding and Unbinding Network Ports to/from the Kernel Modules --------------------------------------------------------------- +Binding and Unbinding to/from the Kernel Modules +------------------------------------------------ .. note::
@@ -39,7 +39,7 @@ For such PMDs, any network ports or other hardware under Linux* control will be To bind ports to the ``vfio-pci`` module for DPDK use, or to return ports to Linux control, a utility script called ``dpdk-devbind.py`` is provided in the ``usertools`` subdirectory. -This utility can be used to provide a view of the current state of the network ports on the system, +This utility can be used to provide a view of the current state of the devices on the system, and to bind and unbind those ports from the different kernel modules, including the VFIO and UIO modules. The following are some examples of how the script can be used.
@@ -65,10 +65,10 @@ should be loaded into the kernel before running the ``dpdk-devbind.py`` script. .. note:: While any user can run the ``dpdk-devbind.py`` script - to view the status of the network ports, - binding or unbinding network ports requires root privileges. + to view the status of the devices, + binding or unbinding devices requires root privileges. -To see the status of all network ports on the system: +To see the status of all devices on the system: .. code-block:: console
Signature · 1 line
2.37.1
Re: [PATCH v4 1/3] doc: make the Linux drivers doc more generic
Quoted 4 lines · On Mon, 28 Nov 2022 15:19:38 -0800 Nicolas Chautru <[email protected]>…
Minor change so that for the documentation to be less NIC centric, as these steps can apply more generally to PCIe devices.
Signed-off-by Nicolas Chautru <[email protected]>
PATCH v4 2/3 doc: simplify the binding steps
In reply to Nicolas ChautruThe steps for binding to kernel modules which are generic are now only implicit and pointing towards common documentation.
--- doc/guides/bbdevs/acc100.rst | 78 ++++------------------------- doc/guides/bbdevs/acc200.rst | 74 ++++----------------------- doc/guides/bbdevs/fpga_5gnr_fec.rst | 77 ++++------------------------ doc/guides/bbdevs/fpga_lte_fec.rst | 77 ++++------------------------ 4 files changed, 36 insertions(+), 270 deletions(-)
doc/guides/bbdevs/acc100.rst +9 -69
@@ -101,77 +101,15 @@ commands for ACC100 and ACC101 respectively: sudo lspci -vd8086:0d5c sudo lspci -vd8086:57c4 -The physical and virtual functions are compatible with Linux UIO drivers: -``vfio`` and ``igb_uio``. However, in order to work the 5G/4G -FEC device first needs to be bound to one of these linux drivers through DPDK. +Binding and Virtual Functions enablement +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Bind PF UIO driver(s) -~~~~~~~~~~~~~~~~~~~~~ - -Install the DPDK igb_uio driver, bind it with the PF PCI device ID and use -``lspci`` to confirm the PF device is under use by ``igb_uio`` DPDK UIO driver. - -The igb_uio driver may be bound to the PF PCI device using one of two methods for ACC100 -(for ACC101 the device id ``57c4`` should be used in lieu of ``0d5c``): - - -1. PCI functions (physical or virtual, depending on the use case) can be bound to -the UIO driver by repeating this command for every function. - -.. code-block:: console - - cd <dpdk-top-level-directory> - insmod ./build/kmod/igb_uio.ko - echo "8086 0d5c" > /sys/bus/pci/drivers/igb_uio/new_id - lspci -vd8086:0d5c - - -2. Another way to bind PF with DPDK UIO driver is by using the ``dpdk-devbind.py`` tool - -.. code-block:: console - - cd <dpdk-top-level-directory> - ./usertools/dpdk-devbind.py -b igb_uio 0000:06:00.0 - -where the PCI device ID (example: 0000:06:00.0) is obtained using lspci -vd8086:0d5c - - -In a similar way the 5G/4G FEC PF may be bound with vfio-pci as any PCIe device. - - -Enable Virtual Functions -~~~~~~~~~~~~~~~~~~~~~~~~ - -Now, it should be visible in the printouts that PCI PF is under igb_uio control -"``Kernel driver in use: igb_uio``" - -To show the number of available VFs on the device, read ``sriov_totalvfs`` file.. - -.. code-block:: console - - cat /sys/bus/pci/devices/0000\:<b>\:<d>.<f>/sriov_totalvfs - - where 0000\:<b>\:<d>.<f> is the PCI device ID - - -To enable VFs via igb_uio, echo the number of virtual functions intended to -enable to ``max_vfs`` file.. - -.. code-block:: console - - echo <num-of-vfs> > /sys/bus/pci/devices/0000\:<b>\:<d>.<f>/max_vfs - - -Afterwards, all VFs must be bound to appropriate UIO drivers as required, same -way it was done with the physical function previously. - -Enabling SR-IOV via vfio driver is pretty much the same, except that the file -name is different: - -.. code-block:: console - - echo <num-of-vfs> > /sys/bus/pci/devices/0000\:<b>\:<d>.<f>/sriov_numvfs +The PMD relies on kernel modules to interface with the device: both UIO and VFIO kernel modules +are supported. +See :ref:`linux_gsg_binding_kernel` section for more details, notably with regards to +generic kernel modules binding and VF enablement. +More details on usage model is captured in the :ref:`pf_bb_config_acc100` section. Configure the VFs through PF
@@ -232,6 +170,8 @@ of these tests will depend on the device 5G/4G FEC capabilities which may cause testcases to be skipped, but no failure should be reported. +.. _pf_bb_config_acc100: + Alternate Baseband Device configuration tool ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
doc/guides/bbdevs/acc200.rst +9 -65
88 lines not on this page · raw message
doc/guides/bbdevs/fpga_5gnr_fec.rst +9 -68
91 lines not on this page · raw message
doc/guides/bbdevs/fpga_lte_fec.rst +9 -68
91 lines not on this page · raw message
Signature · 1 line
2.37.1
PATCH v4 3/3 doc: simplify and clarify the configuration steps
In reply to Nicolas ChautruSimplification of the device configuration steps which had become a bit stale over time.
Next level of details captured in pf_bb_config
if required for maintanability.
--- doc/guides/bbdevs/acc100.rst | 13 ++--- doc/guides/bbdevs/acc200.rst | 19 ++++--- doc/guides/bbdevs/fpga_5gnr_fec.rst | 81 +++-------------------------- doc/guides/bbdevs/fpga_lte_fec.rst | 81 +++-------------------------- 4 files changed, 30 insertions(+), 164 deletions(-)
doc/guides/bbdevs/acc100.rst +7 -6
@@ -111,18 +111,19 @@ See :ref:`linux_gsg_binding_kernel` section for more details, notably with regar generic kernel modules binding and VF enablement. More details on usage model is captured in the :ref:`pf_bb_config_acc100` section. +Device configuration +~~~~~~~~~~~~~~~~~~~~ -Configure the VFs through PF -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The PCI virtual functions must be configured before working or getting assigned -to VMs/Containers. The configuration involves allocating the number of hardware +The device must be configured to work properly. +The configuration involves allocating the number of hardware queues, priorities, load balance, bandwidth and other settings necessary for the device to perform FEC functions. This configuration needs to be executed at least once after reboot or PCI FLR and can -be achieved by using the functions ``rte_acc10x_configure()``, +be achieved by either using ``pf_bb_config`` or the function ``rte_acc10x_configure()``, which sets up the parameters defined in the compatible ``acc100_conf`` structure. +This is the method used in the bbdev-test test application. + Test Application ----------------
doc/guides/bbdevs/acc200.rst +9 -10
@@ -120,19 +120,18 @@ See :ref:`linux_gsg_binding_kernel` section for more details, notably with regar generic kernel modules binding and VF enablement. More details on usage model is captured in the :ref:`pf_bb_config_acc200` section. +Device configuration +~~~~~~~~~~~~~~~~~~~~ -Configure the VFs through PF -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The device must be configured to work properly. +The configuration involves allocating the number of hardware +queues, priorities, load balance, bandwidth and other settings necessary for the +device to perform FEC functions. -The PCI virtual functions must be configured before working or getting assigned -to VMs/Containers. -The configuration involves allocating the number of hardware queues, priorities, -load balance, bandwidth and other settings necessary for the device -to perform FEC functions. - -This configuration needs to be executed at least once after reboot or PCI FLR -and can be achieved by using the functions ``rte_acc200_configure()``, +This configuration needs to be executed at least once after reboot or PCI FLR and can +be achieved by either using ``pf_bb_config ``or the function ``rte_acc200_configure()``, which sets up the parameters defined in the compatible ``acc200_conf`` structure. +This is the method used in the bbdev-test test application. Test Application
doc/guides/bbdevs/fpga_5gnr_fec.rst +7 -74
92 lines not on this page · raw message
doc/guides/bbdevs/fpga_lte_fec.rst +7 -74
92 lines not on this page · raw message
Signature · 1 line
2.37.1