doc: simplify PMD steps
v2 cover doc: simplify PMD steps
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 (2):
doc: make the Linux drivers doc more generic
doc: simplify the binding steps
doc/guides/bbdevs/acc100.rst | 90 +++----------- doc/guides/bbdevs/acc200.rst | 92 +++------------ doc/guides/bbdevs/fpga_5gnr_fec.rst | 157 +++---------------------- doc/guides/bbdevs/fpga_lte_fec.rst | 157 +++---------------------- doc/guides/linux_gsg/linux_drivers.rst | 6 +- 5 files changed, 65 insertions(+), 437 deletions(-)
Signature · 1 line
2.37.1
PATCH v2 1/2 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
doc/guides/linux_gsg/linux_drivers.rst +3 -3
@@ -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::
Signature · 1 line
2.37.1
Re: [PATCH v2 1/2] doc: make the Linux drivers doc more generic
15/11/2022 20:59, Nicolas Chautru:
Quoted 4 lines
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]>
[...]
doc/guides/linux_gsg/linux_drivers.rst Linux Drivers · line 15
Quoted 4 lines
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,
doc/guides/linux_gsg/linux_drivers.rst +1
-1-and network ports should be bound to that driver. +and network ports or other hardware devices should be bound to that driver.
We could completely remove "network ports".
There are more places in this doc which should be made more generic.
I keep this patch open to remind to work on it.
Anybody is welcome to improve this patch.
RE: [PATCH v2 1/2] doc: make the Linux drivers doc more generic
Hi Thomas,
Any update with regards to that series? Unsure how much more you want it to become generic. Ie. replacing most of "network port" by "PCIe device"
Thanks
Nic
Quoted 27 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, November 22, 2022 6:59 AM
To: Chautru, Nicolas <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v2 1/2] doc: make the Linux drivers doc more generic15/11/2022 20:59, Nicolas Chautru:
Quoted 4 lines
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]>[...]
Quoted 1 line
Different PMDs may require different kernel drivers in order to work
properly.
Quoted 3 lines
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.We could completely remove "network ports".
There are more places in this doc which should be made more generic.I keep this patch open to remind to work on it. Anybody is welcome to improve this patch.
Re: [PATCH v2 1/2] doc: make the Linux drivers doc more generic
06/03/2023 18:41, Chautru, Nicolas:
Quoted 3 lines
Hi Thomas,
Any update with regards to that series? Unsure how much more you want it to become generic. Ie. replacing most of "network port" by "PCIe device"
Devices are not always PCI based.
The doc should reviewed entirely to make sure it is not restricted to network ports or PCI devices.
Quoted 18 lines
From: Thomas Monjalon <[email protected]>
Quoted 17 lines
15/11/2022 20:59, Nicolas Chautru:
Quoted 4 lines
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]>[...]
Quoted 1 line
Different PMDs may require different kernel drivers in order to work
properly.
Quoted 3 lines
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.We could completely remove "network ports".
There are more places in this doc which should be made more generic.I keep this patch open to remind to work on it.
Anybody is welcome to improve this patch.
RE: [PATCH v2 1/2] doc: make the Linux drivers doc more generic
Quoted 11 lines
From: Thomas Monjalon <[email protected]>
06/03/2023 18:41, Chautru, Nicolas:Quoted 3 lines
Hi Thomas,
Any update with regards to that series? Unsure how much more you want it
to become generic. Ie. replacing most of "network port" by "PCIe device"
Devices are not always PCI based.
The doc should reviewed entirely to make sure it is not restricted to network ports or PCI devices.
OK not familiar myself with all these other variants, I did not realize you wanted to extend the scope that much. Have you got an ETA for such a doc update?
Quoted 22 lines
Quoted 13 lines
From: Thomas Monjalon <[email protected]>
Quoted 12 lines
15/11/2022 20:59, Nicolas Chautru:
Quoted 4 lines
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]>[...]
Quoted 2 lines
Different PMDs may require different kernel drivers in order to
workproperly.
Quoted 3 lines
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 thatdriver.
Quoted 6 lines
Quoted 6 lines
We could completely remove "network ports".
There are more places in this doc which should be made more generic.I keep this patch open to remind to work on it.
Anybody is welcome to improve this patch.
Re: [PATCH v2 1/2] doc: make the Linux drivers doc more generic
09/03/2023 18:35, Chautru, Nicolas:
Quoted 6 lines
Quoted 6 lines
From: Thomas Monjalon <[email protected]>
06/03/2023 18:41, Chautru, Nicolas:Quoted 3 lines
Hi Thomas,
Any update with regards to that series? Unsure how much more you want it
Quoted 8 lines
Quoted 5 lines
to become generic. Ie. replacing most of "network port" by "PCIe device"
Devices are not always PCI based.
The doc should reviewed entirely to make sure it is not restricted to network ports or PCI devices.OK not familiar myself with all these other variants, I did not realize you wanted to extend the scope that much. Have you got an ETA for such a doc update?
No ETA, that's why I asked who could help here.
Quoted 20 lines
Quoted 20 lines
Quoted 13 lines
From: Thomas Monjalon <[email protected]>
Quoted 12 lines
15/11/2022 20:59, Nicolas Chautru:
Quoted 4 lines
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]>[...]
Quoted 2 lines
Different PMDs may require different kernel drivers in order to
workproperly.
Quoted 3 lines
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 thatdriver.
Quoted 6 lines
Quoted 6 lines
We could completely remove "network ports".
There are more places in this doc which should be made more generic.I keep this patch open to remind to work on it.
Anybody is welcome to improve this patch.
PATCH v2 2/2 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 | 90 +++------------- doc/guides/bbdevs/acc200.rst | 92 +++------------- doc/guides/bbdevs/fpga_5gnr_fec.rst | 157 +++------------------------- doc/guides/bbdevs/fpga_lte_fec.rst | 157 +++------------------------- 4 files changed, 62 insertions(+), 434 deletions(-)
doc/guides/bbdevs/acc100.rst +15 -75
@@ -101,90 +101,29 @@ 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) -~~~~~~~~~~~~~~~~~~~~~ +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. -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. +Device configuration +~~~~~~~~~~~~~~~~~~~~ -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 - - -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 ----------------
@@ -231,6 +170,7 @@ a range of additional tests under the test_vectors folder, which may be useful. of these tests will depend on the device 5G/4G FEC capabilities which may cause some testcases to be skipped, but no failure should be reported. +.. _pf_bb_config_acc100: Alternate Baseband Device configuration tool ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
doc/guides/bbdevs/acc200.rst +17 -75
110 lines not on this page · raw message
doc/guides/bbdevs/fpga_5gnr_fec.rst +15 -142
177 lines not on this page · raw message
doc/guides/bbdevs/fpga_lte_fec.rst +15 -142
177 lines not on this page · raw message
Signature · 1 line
2.37.1
Re: [PATCH v2 2/2] doc: simplify the binding steps
15/11/2022 20:59, Nicolas Chautru:
doc/guides/bbdevs/acc100.rst commands for ACC100 and ACC101 respectively: · line 125
Quoted 12 lines
doc/guides/bbdevs/acc100.rst +4
-3-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.
Clearly this patch is more than "simplifying binding steps".
RE: [PATCH v2 2/2] doc: simplify the binding steps
Hi Thomas,
Quoted 24 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, November 22, 2022 7:01 AM
To: Chautru, Nicolas <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v2 2/2] doc: simplify the binding steps15/11/2022 20:59, Nicolas Chautru:
Quoted 8 lines
-The PCI virtual functions must be configured before working or getting assigned -to VMs/Containers. The configuration involves allocating the number of hardware
doc/guides/bbdevs/acc100.rst +2
-0+The device must be configured to work properly. +The configuration involves allocating the number of hardware queues, priorities, load balance, bandwidth and other settingsnecessary for the device to perform FEC functions.
Quoted 6 lines
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.
Quoted 4 lines
Quoted 1 line
+This is the method used in the bbdev-test test application.
Clearly this patch is more than "simplifying binding steps".
The intent has indeed to remove much of the binding steps to point to generic document, then minor updates to keep the flow readable and informative. Let me know what you are referring to specifically which caught your eyes.
Some of the FPGA configuration steps were also simplifies to align with the other PMDs.
We can rename if you prefer as doc: simplify the binding and configuration steps. Or split but unsure of the value. Up to you. Thanks
Nic
Re: [PATCH v2 2/2] doc: simplify the binding steps
22/11/2022 22:21, Chautru, Nicolas:
Quoted 19 lines
From: Thomas Monjalon <[email protected]>
Quoted 18 lines
15/11/2022 20:59, Nicolas Chautru:
Quoted 8 lines
-The PCI virtual functions must be configured before working or getting assigned -to VMs/Containers. The configuration involves allocating the number of hardware
doc/guides/bbdevs/acc100.rst +2
-0+The device must be configured to work properly. +The configuration involves allocating the number of hardware queues, priorities, load balance, bandwidth and other settingsnecessary for the device to perform FEC functions.
Quoted 6 lines
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.
Quoted 1 line
+This is the method used in the bbdev-test test application.
Quoted 7 lines
Quoted 2 lines
Clearly this patch is more than "simplifying binding steps".
The intent has indeed to remove much of the binding steps to point to generic document, then minor updates to keep the flow readable and informative. Let me know what you are referring to specifically which caught your eyes.
Some of the FPGA configuration steps were also simplifies to align with the other PMDs.
We can rename if you prefer as doc: simplify the binding and configuration steps. Or split but unsure of the value. Up to you.
You are adding more information.
One example is above.
I think it deserves a separate commit to understand which info you add and why.
RE: [PATCH v2 2/2] doc: simplify the binding steps
Hi Thomas,
Quoted 37 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, November 23, 2022 12:35 AM
To: Chautru, Nicolas <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v2 2/2] doc: simplify the binding steps22/11/2022 22:21, Chautru, Nicolas:
Quoted 18 lines
From: Thomas Monjalon <[email protected]>
Quoted 17 lines
15/11/2022 20:59, Nicolas Chautru:
Quoted 8 lines
-The PCI virtual functions must be configured before working or getting assigned -to VMs/Containers. The configuration involves allocating the number of hardware
doc/guides/bbdevs/acc100.rst +2
-0+The device must be configured to work properly. +The configuration involves allocating the number of hardware queues, priorities, load balance, bandwidth and other settingsnecessary for the device to perform FEC functions.
Quoted 7 lines
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.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
+This is the method used in the bbdev-test test application.
Clearly this patch is more than "simplifying binding steps".
The intent has indeed to remove much of the binding steps to point to
generic document, then minor updates to keep the flow readable and informative.
Quoted 2 lines
Let me know what you are referring to specifically which caught your eyes. Some of the FPGA configuration steps were also simplifies to align with the
Quoted 9 lines
other PMDs.
Quoted 1 line
We can rename if you prefer as doc: simplify the binding and configuration
steps. Or split but unsure of the value. Up to you.
You are adding more information.
One example is above.
I think it deserves a separate commit to understand which info you add and why.
To avoid iterations, you just want to split this commit again into two:
- doc: simplify the binding steps
- doc: simplify and clarify the configuration steps
Thanks for confirming.
Nic
Re: [PATCH v2 2/2] doc: simplify the binding steps
24/11/2022 02:09, Chautru, Nicolas:
Quoted 49 lines
Hi Thomas,
Quoted 37 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, November 23, 2022 12:35 AM
To: Chautru, Nicolas <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v2 2/2] doc: simplify the binding steps22/11/2022 22:21, Chautru, Nicolas:
Quoted 18 lines
From: Thomas Monjalon <[email protected]>
Quoted 17 lines
15/11/2022 20:59, Nicolas Chautru:
Quoted 8 lines
-The PCI virtual functions must be configured before working or getting assigned -to VMs/Containers. The configuration involves allocating the number of hardware
doc/guides/bbdevs/acc100.rst +2
-0+The device must be configured to work properly. +The configuration involves allocating the number of hardware queues, priorities, load balance, bandwidth and other settingsnecessary for the device to perform FEC functions.
Quoted 7 lines
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.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
+This is the method used in the bbdev-test test application.
Clearly this patch is more than "simplifying binding steps".
The intent has indeed to remove much of the binding steps to point to
generic document, then minor updates to keep the flow readable and informative.
Quoted 2 lines
Let me know what you are referring to specifically which caught your eyes. Some of the FPGA configuration steps were also simplifies to align with the
Quoted 9 lines
other PMDs.
Quoted 1 line
We can rename if you prefer as doc: simplify the binding and configuration
steps. Or split but unsure of the value. Up to you.
You are adding more information.
One example is above.
I think it deserves a separate commit to understand which info you add and why.
Quoted 6 lines
To avoid iterations, you just want to split this commit again into two:
- doc: simplify the binding steps
- doc: simplify and clarify the configuration stepsThanks for confirming.
Nic
Yes