From f8d61d39bbad0410e6615928b5243341f07d8374 Mon Sep 17 00:00:00 2001 From: Shijith Thotton Date: Wed, 12 Apr 2017 00:26:49 +0530 Subject: [PATCH] doc: refer PMD compile/test section from qede guide Refer the section which explains driver compilation and running of testpmd in Linux, instead of describing it in driver documentation. Signed-off-by: Shijith Thotton Acked-by: John McNamara --- doc/guides/nics/qede.rst | 176 +++++++++++++++------------------------ 1 file changed, 66 insertions(+), 110 deletions(-) diff --git a/doc/guides/nics/qede.rst b/doc/guides/nics/qede.rst index eacb3daf8a..afe2df89e2 100644 --- a/doc/guides/nics/qede.rst +++ b/doc/guides/nics/qede.rst @@ -124,64 +124,96 @@ enabling debugging options may affect system performance. Empty string indicates driver will pick up the firmware file from the default location. -Driver Compilation -~~~~~~~~~~~~~~~~~~ +Driver compilation and testing +------------------------------ -To compile QEDE PMD for Linux x86_64 gcc target, run the following ``make`` -command:: +Refer to the document :ref:`compiling and testing a PMD for a NIC ` +for details. - cd - make config T=x86_64-native-linuxapp-gcc install +SR-IOV: Prerequisites and Sample Application Notes +-------------------------------------------------- -To compile QEDE PMD for Linux x86_64 clang target, run the following ``make`` -command:: +This section provides instructions to configure SR-IOV with Linux OS. - cd - make config T=x86_64-native-linuxapp-clang install +**Note**: librte_pmd_qede will be used to bind to SR-IOV VF device and Linux native kernel driver (QEDE) will function as SR-IOV PF driver. Requires PF driver to be 8.10.x.x or higher. -To compile QEDE PMD for FreeBSD x86_64 clang target, run the following ``gmake`` -command:: +#. Verify SR-IOV and ARI capability is enabled on the adapter using ``lspci``: - cd - gmake config T=x86_64-native-bsdapp-clang install + .. code-block:: console -To compile QEDE PMD for FreeBSD x86_64 gcc target, run the following ``gmake`` -command:: + lspci -s -vvv - cd - gmake config T=x86_64-native-bsdapp-gcc install -Wl,-rpath=\ - /usr/local/lib/gcc49 CC=gcc49 + Example output: + .. code-block:: console -Sample Application Notes -~~~~~~~~~~~~~~~~~~~~~~~~ + [...] + Capabilities: [1b8 v1] Alternative Routing-ID Interpretation (ARI) + [...] + Capabilities: [1c0 v1] Single Root I/O Virtualization (SR-IOV) + [...] + Kernel driver in use: igb_uio -This section demonstrates how to launch ``testpmd`` with QLogic 4xxxx -devices managed by ``librte_pmd_qede`` in Linux operating system. +#. Load the kernel module: -#. Request huge pages: + .. code-block:: console + + modprobe qede + + Example output: .. code-block:: console - echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/ \ - nr_hugepages + systemd-udevd[4848]: renamed network interface eth0 to ens5f0 + systemd-udevd[4848]: renamed network interface eth1 to ens5f1 -#. Load ``igb_uio`` driver: +#. Bring up the PF ports: .. code-block:: console - insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko + ifconfig ens5f0 up + ifconfig ens5f1 up + +#. Create VF device(s): + + Echo the number of VFs to be created into ``"sriov_numvfs"`` sysfs entry + of the parent PF. -#. Bind the QLogic 4xxxx adapters to ``igb_uio`` loaded in the - previous step: + Example output: .. code-block:: console - ./usertools/dpdk-devbind.py --bind igb_uio 0000:84:00.0 0000:84:00.1 \ - 0000:84:00.2 0000:84:00.3 + echo 2 > /sys/devices/pci0000:00/0000:00:03.0/0000:81:00.0/sriov_numvfs -#. Start ``testpmd`` with basic parameters: - (Enable QEDE_DEBUG_INFO=y to view informational messages) + +#. Assign VF MAC address: + + Assign MAC address to the VF using iproute2 utility. The syntax is:: + + ip link set vf mac + + Example output: + + .. code-block:: console + + ip link set ens5f0 vf 0 mac 52:54:00:2f:9d:e8 + + +#. PCI Passthrough: + + The VF devices may be passed through to the guest VM using ``virt-manager`` or + ``virsh``. QEDE PMD should be used to bind the VF devices in the guest VM + using the instructions from Driver compilation and testing section above. + + +#. Running testpmd + (Enable QEDE_DEBUG_INFO=y to view informational messages): + + Refer to the document + :ref:`compiling and testing a PMD for a NIC ` to run + ``testpmd`` application. + + Example output: .. code-block:: console @@ -236,79 +268,3 @@ devices managed by ``librte_pmd_qede`` in Linux operating system. Port 3 Link Up - speed 25000 Mbps - full-duplex Done testpmd> - - -SR-IOV: Prerequisites and Sample Application Notes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -This section provides instructions to configure SR-IOV with Linux OS. - -**Note**: librte_pmd_qede will be used to bind to SR-IOV VF device and Linux native kernel driver (QEDE) will function as SR-IOV PF driver. Requires PF driver to be 8.10.x.x or higher. - -#. Verify SR-IOV and ARI capability is enabled on the adapter using ``lspci``: - - .. code-block:: console - - lspci -s -vvv - - Example output: - - .. code-block:: console - - [...] - Capabilities: [1b8 v1] Alternative Routing-ID Interpretation (ARI) - [...] - Capabilities: [1c0 v1] Single Root I/O Virtualization (SR-IOV) - [...] - Kernel driver in use: igb_uio - -#. Load the kernel module: - - .. code-block:: console - - modprobe qede - - Example output: - - .. code-block:: console - - systemd-udevd[4848]: renamed network interface eth0 to ens5f0 - systemd-udevd[4848]: renamed network interface eth1 to ens5f1 - -#. Bring up the PF ports: - - .. code-block:: console - - ifconfig ens5f0 up - ifconfig ens5f1 up - -#. Create VF device(s): - - Echo the number of VFs to be created into ``"sriov_numvfs"`` sysfs entry - of the parent PF. - - Example output: - - .. code-block:: console - - echo 2 > /sys/devices/pci0000:00/0000:00:03.0/0000:81:00.0/sriov_numvfs - - -#. Assign VF MAC address: - - Assign MAC address to the VF using iproute2 utility. The syntax is:: - - ip link set vf mac - - Example output: - - .. code-block:: console - - ip link set ens5f0 vf 0 mac 52:54:00:2f:9d:e8 - - -#. PCI Passthrough: - - The VF devices may be passed through to the guest VM using ``virt-manager`` or - ``virsh``. QEDE PMD should be used to bind the VF devices in the guest VM - using the instructions outlined in the Application notes above. -- 2.20.1