tools: move to usertools
Rename tools/ into usertools/ to differentiate from buildtools/ and devtools/ while making clear these scripts are part of DPDK runtime. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
parent
9a98f50e89
commit
c6dab2a873
@ -74,7 +74,7 @@ F: scripts/validate-abi.sh
|
||||
|
||||
Driver information
|
||||
F: buildtools/pmdinfogen/
|
||||
F: tools/dpdk-pmdinfo.py
|
||||
F: usertools/dpdk-pmdinfo.py
|
||||
F: doc/guides/tools/pmdinfo.rst
|
||||
|
||||
|
||||
|
@ -413,4 +413,4 @@ The other way to bind the VFs to the DPDK UIO driver is by using the ``dpdk-devb
|
||||
.. code-block:: console
|
||||
|
||||
cd $RTE_SDK
|
||||
./tools/dpdk-devbind.py -b igb_uio 0000:03:01.1
|
||||
./usertools/dpdk-devbind.py -b igb_uio 0000:03:01.1
|
||||
|
@ -50,7 +50,7 @@ When you stop and restart the test application, it looks to see if the pages are
|
||||
If you look in the directory, you will see ``n`` number of 2M pages files. If you specified 1024, you will see 1024 page files.
|
||||
These are then placed in memory segments to get contiguous memory.
|
||||
|
||||
If you need to change the number of pages, it is easier to first remove the pages. The tools/dpdk-setup.sh script provides an option to do this.
|
||||
If you need to change the number of pages, it is easier to first remove the pages. The usertools/dpdk-setup.sh script provides an option to do this.
|
||||
See the "Quick Start Setup Script" section in the :ref:`DPDK Getting Started Guide <linux_gsg>` for more information.
|
||||
|
||||
|
||||
|
@ -613,17 +613,17 @@ Set up DPDK in the Virtual Machine
|
||||
cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
|
||||
|
||||
ifconfig -a
|
||||
/root/dpdk/tools/dpdk-devbind.py --status
|
||||
/root/dpdk/usertools/dpdk-devbind.py --status
|
||||
|
||||
rmmod virtio-pci ixgbevf
|
||||
|
||||
modprobe uio
|
||||
insmod /root/dpdk/x86_64-default-linuxapp-gcc/kmod/igb_uio.ko
|
||||
|
||||
/root/dpdk/tools/dpdk-devbind.py -b igb_uio 0000:00:03.0
|
||||
/root/dpdk/tools/dpdk-devbind.py -b igb_uio 0000:00:04.0
|
||||
/root/dpdk/usertools/dpdk-devbind.py -b igb_uio 0000:00:03.0
|
||||
/root/dpdk/usertools/dpdk-devbind.py -b igb_uio 0000:00:04.0
|
||||
|
||||
/root/dpdk/tools/dpdk-devbind.py --status
|
||||
/root/dpdk/usertools/dpdk-devbind.py --status
|
||||
|
||||
run_testpmd_bonding_in_vm.sh
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -90,14 +90,14 @@ For Fortville NIC.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
cd /root/dpdk/tools
|
||||
cd /root/dpdk/usertools
|
||||
./dpdk-devbind.py -b igb_uio 0000:02:00.0
|
||||
|
||||
For Niantic NIC.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
cd /root/dpdk/tools
|
||||
cd /root/dpdk/usertools
|
||||
./dpdk-devbind.py -b igb_uio 0000:09:00.0
|
||||
|
||||
On host_server_1: Terminal 3
|
||||
@ -171,14 +171,14 @@ For Fortville NIC.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
cd /root/dpdk/tools
|
||||
cd /root/dpdk/usertools
|
||||
./dpdk-devbind.py -b igb_uio 0000:03:00.0
|
||||
|
||||
For Niantic NIC.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
cd /root/dpdk/tools
|
||||
cd /root/dpdk/usertools
|
||||
./dpdk-devbind.py -b igb_uio 0000:06:00.0
|
||||
|
||||
On host_server_2: Terminal 3
|
||||
@ -444,17 +444,17 @@ setup_dpdk_virtio_in_vm.sh
|
||||
cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
|
||||
|
||||
ifconfig -a
|
||||
/root/dpdk/tools/dpdk-devbind.py --status
|
||||
/root/dpdk/usertools/dpdk-devbind.py --status
|
||||
|
||||
rmmod virtio-pci
|
||||
|
||||
modprobe uio
|
||||
insmod /root/dpdk/x86_64-default-linuxapp-gcc/kmod/igb_uio.ko
|
||||
|
||||
/root/dpdk/tools/dpdk-devbind.py -b igb_uio 0000:00:03.0
|
||||
/root/dpdk/tools/dpdk-devbind.py -b igb_uio 0000:00:04.0
|
||||
/root/dpdk/usertools/dpdk-devbind.py -b igb_uio 0000:00:03.0
|
||||
/root/dpdk/usertools/dpdk-devbind.py -b igb_uio 0000:00:04.0
|
||||
|
||||
/root/dpdk/tools/dpdk-devbind.py --status
|
||||
/root/dpdk/usertools/dpdk-devbind.py --status
|
||||
|
||||
run_testpmd_in_vm.sh
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -58,7 +58,7 @@ The DPDK is composed of several directories:
|
||||
|
||||
* examples: Source code of DPDK application examples
|
||||
|
||||
* config, tools, scripts, mk: Framework-related makefiles, scripts and configuration
|
||||
* config, buildtools, mk: Framework-related makefiles, scripts and configuration
|
||||
|
||||
Installation of DPDK Target Environments
|
||||
----------------------------------------
|
||||
@ -188,7 +188,7 @@ however please consult your distributions documentation to make sure that is the
|
||||
Also, to use VFIO, both kernel and BIOS must support and be configured to use IO virtualization (such as Intel® VT-d).
|
||||
|
||||
For proper operation of VFIO when running DPDK applications as a non-privileged user, correct permissions should also be set up.
|
||||
This can be done by using the DPDK setup script (called dpdk-setup.sh and located in the tools directory).
|
||||
This can be done by using the DPDK setup script (called dpdk-setup.sh and located in the usertools directory).
|
||||
|
||||
.. _linux_gsg_binding_kernel:
|
||||
|
||||
@ -208,7 +208,7 @@ Any network ports under Linux* control will be ignored by the DPDK poll-mode dri
|
||||
|
||||
To bind ports to the ``uio_pci_generic``, ``igb_uio`` or ``vfio-pci`` module for DPDK use,
|
||||
and then subsequently return ports to Linux* control,
|
||||
a utility script called dpdk_nic _bind.py is provided in the tools subdirectory.
|
||||
a utility script called dpdk_nic _bind.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,
|
||||
and to bind and unbind those ports from the different kernel modules, including the uio and vfio modules.
|
||||
The following are some examples of how the script can be used.
|
||||
@ -235,7 +235,7 @@ To see the status of all network ports on the system:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./tools/dpdk-devbind.py --status
|
||||
./usertools/dpdk-devbind.py --status
|
||||
|
||||
Network devices using DPDK-compatible driver
|
||||
============================================
|
||||
@ -257,16 +257,16 @@ To bind device ``eth1``,``04:00.1``, to the ``uio_pci_generic`` driver:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./tools/dpdk-devbind.py --bind=uio_pci_generic 04:00.1
|
||||
./usertools/dpdk-devbind.py --bind=uio_pci_generic 04:00.1
|
||||
|
||||
or, alternatively,
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./tools/dpdk-devbind.py --bind=uio_pci_generic eth1
|
||||
./usertools/dpdk-devbind.py --bind=uio_pci_generic eth1
|
||||
|
||||
To restore device ``82:00.0`` to its original kernel binding:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./tools/dpdk-devbind.py --bind=ixgbe 82:00.0
|
||||
./usertools/dpdk-devbind.py --bind=ixgbe 82:00.0
|
||||
|
@ -158,7 +158,7 @@ Configurations before running DPDK
|
||||
|
||||
cd dpdk_folder
|
||||
|
||||
tools/cpu_layout.py
|
||||
usertools/cpu_layout.py
|
||||
|
||||
Or run ``lscpu`` to check the the cores on each socket.
|
||||
|
||||
@ -192,10 +192,10 @@ Configurations before running DPDK
|
||||
|
||||
|
||||
# Bind ports 82:00.0 and 85:00.0 to dpdk driver
|
||||
./dpdk_folder/tools/dpdk-devbind.py -b igb_uio 82:00.0 85:00.0
|
||||
./dpdk_folder/usertools/dpdk-devbind.py -b igb_uio 82:00.0 85:00.0
|
||||
|
||||
# Check the port driver status
|
||||
./dpdk_folder/tools/dpdk-devbind.py --status
|
||||
./dpdk_folder/usertools/dpdk-devbind.py --status
|
||||
|
||||
See ``dpdk-devbind.py --help`` for more details.
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
Quick Start Setup Script
|
||||
========================
|
||||
|
||||
The dpdk-setup.sh script, found in the tools subdirectory, allows the user to perform the following tasks:
|
||||
The dpdk-setup.sh script, found in the usertools subdirectory, allows the user to perform the following tasks:
|
||||
|
||||
* Build the DPDK libraries
|
||||
|
||||
@ -108,7 +108,7 @@ Some options in the script prompt the user for further data before proceeding.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
source tools/dpdk-setup.sh
|
||||
source usertools/dpdk-setup.sh
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
@ -207,7 +207,7 @@ devices managed by ``librte_pmd_bnx2x`` in Linux operating system.
|
||||
#. Bind the QLogic adapters to ``igb_uio`` or ``vfio-pci`` loaded in the
|
||||
previous step::
|
||||
|
||||
./tools/dpdk-devbind.py --bind igb_uio 0000:84:00.0 0000:84:00.1
|
||||
./usertools/dpdk-devbind.py --bind igb_uio 0000:84:00.0 0000:84:00.1
|
||||
|
||||
or
|
||||
|
||||
@ -219,7 +219,7 @@ devices managed by ``librte_pmd_bnx2x`` in Linux operating system.
|
||||
|
||||
sudo chmod 0666 /dev/vfio/*
|
||||
|
||||
./tools/dpdk-devbind.py --bind vfio-pci 0000:84:00.0 0000:84:00.1
|
||||
./usertools/dpdk-devbind.py --bind vfio-pci 0000:84:00.0 0000:84:00.1
|
||||
|
||||
#. Start ``testpmd`` with basic parameters:
|
||||
|
||||
|
@ -285,7 +285,7 @@ devices managed by librte_pmd_cxgbe in Linux operating system.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./tools/dpdk-devbind.py --bind igb_uio 0000:02:00.4
|
||||
./usertools/dpdk-devbind.py --bind igb_uio 0000:02:00.4
|
||||
|
||||
or
|
||||
|
||||
@ -297,7 +297,7 @@ devices managed by librte_pmd_cxgbe in Linux operating system.
|
||||
|
||||
sudo chmod 0666 /dev/vfio/*
|
||||
|
||||
./tools/dpdk-devbind.py --bind vfio-pci 0000:02:00.4
|
||||
./usertools/dpdk-devbind.py --bind vfio-pci 0000:02:00.4
|
||||
|
||||
.. note::
|
||||
|
||||
|
@ -225,7 +225,7 @@ devices managed by librte_pmd_ena.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./tools/dpdk-devbind.py --bind=igb_uio 0000:02:00.1
|
||||
./usertools/dpdk-devbind.py --bind=igb_uio 0000:02:00.1
|
||||
|
||||
#. Start testpmd with basic parameters:
|
||||
|
||||
|
@ -164,13 +164,13 @@ devices managed by ``librte_pmd_i40e`` in the Linux operating system.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./tools/dpdk-devbind.py --bind igb_uio 0000:83:00.0
|
||||
./usertools/dpdk-devbind.py --bind igb_uio 0000:83:00.0
|
||||
|
||||
Or setup VFIO permissions for regular users and then bind to ``vfio-pci``:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./tools/dpdk-devbind.py --bind vfio-pci 0000:83:00.0
|
||||
./usertools/dpdk-devbind.py --bind vfio-pci 0000:83:00.0
|
||||
|
||||
#. Start ``testpmd`` with basic parameters:
|
||||
|
||||
|
@ -175,7 +175,7 @@ devices managed by ``librte_pmd_qede`` in Linux operating system.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./tools/dpdk-devbind.py --bind igb_uio 0000:84:00.0 0000:84:00.1 \
|
||||
./usertools/dpdk-devbind.py --bind igb_uio 0000:84:00.0 0000:84:00.1 \
|
||||
0000:84:00.2 0000:84:00.3
|
||||
|
||||
#. Start ``testpmd`` with basic parameters:
|
||||
|
@ -149,7 +149,7 @@ managed by ``librte_pmd_thunderx_nicvf`` in the Linux operating system.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./tools/dpdk-devbind.py --bind vfio-pci 0002:01:00.2
|
||||
./usertools/dpdk-devbind.py --bind vfio-pci 0002:01:00.2
|
||||
|
||||
#. Start ``testpmd`` with basic parameters:
|
||||
|
||||
@ -253,7 +253,7 @@ This section provides instructions to configure SR-IOV with Linux OS.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./tools/dpdk-devbind.py --status
|
||||
./usertools/dpdk-devbind.py --status
|
||||
|
||||
Example output:
|
||||
|
||||
@ -275,14 +275,14 @@ This section provides instructions to configure SR-IOV with Linux OS.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./tools/dpdk-devbind.py --bind vfio-pci 0002:01:00.1
|
||||
./tools/dpdk-devbind.py --bind vfio-pci 0002:01:00.2
|
||||
./usertools/dpdk-devbind.py --bind vfio-pci 0002:01:00.1
|
||||
./usertools/dpdk-devbind.py --bind vfio-pci 0002:01:00.2
|
||||
|
||||
#. Verify VF bind using ``dpdk-devbind.py``:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./tools/dpdk-devbind.py --status
|
||||
./usertools/dpdk-devbind.py --status
|
||||
|
||||
Example output:
|
||||
|
||||
@ -352,7 +352,7 @@ driver' list, secondary VFs are on the remaining on the remaining part of the li
|
||||
.. note::
|
||||
|
||||
The VNIC driver in the multiqueue setup works differently than other drivers like `ixgbe`.
|
||||
We need to bind separately each specific queue set device with the ``tools/dpdk-devbind.py`` utility.
|
||||
We need to bind separately each specific queue set device with the ``usertools/dpdk-devbind.py`` utility.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -372,7 +372,7 @@ on a non-NUMA machine.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# tools/dpdk-devbind.py --status
|
||||
# usertools/dpdk-devbind.py --status
|
||||
|
||||
Network devices using DPDK-compatible driver
|
||||
============================================
|
||||
@ -416,17 +416,17 @@ We will choose four secondary queue sets from the ending of the list (0002:01:01
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
tools/dpdk-devbind.py -b vfio-pci 0002:01:00.2
|
||||
tools/dpdk-devbind.py -b vfio-pci 0002:01:00.3
|
||||
usertools/dpdk-devbind.py -b vfio-pci 0002:01:00.2
|
||||
usertools/dpdk-devbind.py -b vfio-pci 0002:01:00.3
|
||||
|
||||
#. Bind four primary VFs to the ``vfio-pci`` driver:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
tools/dpdk-devbind.py -b vfio-pci 0002:01:01.7
|
||||
tools/dpdk-devbind.py -b vfio-pci 0002:01:02.0
|
||||
tools/dpdk-devbind.py -b vfio-pci 0002:01:02.1
|
||||
tools/dpdk-devbind.py -b vfio-pci 0002:01:02.2
|
||||
usertools/dpdk-devbind.py -b vfio-pci 0002:01:01.7
|
||||
usertools/dpdk-devbind.py -b vfio-pci 0002:01:02.0
|
||||
usertools/dpdk-devbind.py -b vfio-pci 0002:01:02.1
|
||||
usertools/dpdk-devbind.py -b vfio-pci 0002:01:02.2
|
||||
|
||||
The nicvf thunderx driver will make use of attached secondary VFs automatically during the interface configuration stage.
|
||||
|
||||
|
@ -172,7 +172,7 @@ Host2VM communication example
|
||||
modprobe uio
|
||||
echo 512 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
|
||||
modprobe uio_pci_generic
|
||||
python tools/dpdk-devbind.py -b uio_pci_generic 00:03.0
|
||||
python usertools/dpdk-devbind.py -b uio_pci_generic 00:03.0
|
||||
|
||||
We use testpmd as the forwarding application in this example.
|
||||
|
||||
|
@ -115,7 +115,7 @@ could be done by:
|
||||
.. code-block:: console
|
||||
|
||||
modprobe uio_pci_generic
|
||||
$RTE_SDK/tools/dpdk-devbind.py -b=uio_pci_generic 0000:00:04.0
|
||||
$RTE_SDK/usertools/dpdk-devbind.py -b=uio_pci_generic 0000:00:04.0
|
||||
|
||||
Then start testpmd for packet forwarding testing.
|
||||
|
||||
|
@ -1061,7 +1061,7 @@ For example, to move a pci device using ixgbe under DPDK management:
|
||||
.. code-block:: console
|
||||
|
||||
# Check the status of the available devices.
|
||||
./tools/dpdk-devbind.py --status
|
||||
./usertools/dpdk-devbind.py --status
|
||||
|
||||
Network devices using DPDK-compatible driver
|
||||
============================================
|
||||
@ -1073,11 +1073,11 @@ For example, to move a pci device using ixgbe under DPDK management:
|
||||
|
||||
|
||||
# Bind the device to igb_uio.
|
||||
sudo ./tools/dpdk-devbind.py -b igb_uio 0000:0a:00.0
|
||||
sudo ./usertools/dpdk-devbind.py -b igb_uio 0000:0a:00.0
|
||||
|
||||
|
||||
# Recheck the status of the devices.
|
||||
./tools/dpdk-devbind.py --status
|
||||
./usertools/dpdk-devbind.py --status
|
||||
Network devices using DPDK-compatible driver
|
||||
============================================
|
||||
0000:0a:00.0 '82599ES 10-Gigabit' drv=igb_uio unused=
|
||||
@ -1180,9 +1180,9 @@ For example, to move a pci device under kernel management:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
sudo ./tools/dpdk-devbind.py -b ixgbe 0000:0a:00.0
|
||||
sudo ./usertools/dpdk-devbind.py -b ixgbe 0000:0a:00.0
|
||||
|
||||
./tools/dpdk-devbind.py --status
|
||||
./usertools/dpdk-devbind.py --status
|
||||
|
||||
Network devices using DPDK-compatible driver
|
||||
============================================
|
||||
|
@ -323,7 +323,7 @@ Building and Running the Switching Backend
|
||||
.. code-block:: console
|
||||
|
||||
modprobe uio_pci_generic
|
||||
python tools/dpdk-devbind.py -b uio_pci_generic 0000:09:00:00.0
|
||||
python usertools/dpdk-devbind.py -b uio_pci_generic 0000:09:00:00.0
|
||||
|
||||
In this case, 0000:09:00.0 is the PCI address for the NIC controller.
|
||||
|
||||
|
@ -118,7 +118,7 @@ static const char *default_solib_dir = RTE_EAL_PMD_PATH;
|
||||
/*
|
||||
* Stringified version of solib path used by dpdk-pmdinfo.py
|
||||
* Note: PLEASE DO NOT ALTER THIS without making a corresponding
|
||||
* change to tools/dpdk-pmdinfo.py
|
||||
* change to usertools/dpdk-pmdinfo.py
|
||||
*/
|
||||
static const char dpdk_solib_path[] __attribute__((used)) =
|
||||
"DPDK_PLUGIN_PATH=" RTE_EAL_PMD_PATH;
|
||||
|
@ -124,15 +124,11 @@ install-runtime:
|
||||
tar -xf - -C $(DESTDIR)$(bindir) --strip-components=1 \
|
||||
--keep-newer-files
|
||||
$(Q)$(call rte_mkdir, $(DESTDIR)$(datadir))
|
||||
$(Q)cp -a $(RTE_SDK)/tools $(DESTDIR)$(datadir)
|
||||
$(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/tools/dpdk-setup.sh, \
|
||||
$(DESTDIR)$(datadir)/tools/setup.sh)
|
||||
$(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/tools/dpdk-devbind.py, \
|
||||
$(DESTDIR)$(datadir)/tools/dpdk_nic_bind.py)
|
||||
$(Q)cp -a $(RTE_SDK)/usertools $(DESTDIR)$(datadir)
|
||||
$(Q)$(call rte_mkdir, $(DESTDIR)$(sbindir))
|
||||
$(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/tools/dpdk-devbind.py, \
|
||||
$(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/usertools/dpdk-devbind.py, \
|
||||
$(DESTDIR)$(sbindir)/dpdk-devbind)
|
||||
$(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/tools/dpdk-pmdinfo.py, \
|
||||
$(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/usertools/dpdk-pmdinfo.py, \
|
||||
$(DESTDIR)$(bindir)/dpdk-pmdinfo)
|
||||
ifneq ($(wildcard $O/doc/man/*/*.1),)
|
||||
$(Q)$(call rte_mkdir, $(DESTDIR)$(mandir)/man1)
|
||||
|
@ -94,7 +94,7 @@ make install O=%{target} DESTDIR=%{buildroot} \
|
||||
|
||||
%files
|
||||
%dir %{_datadir}/dpdk
|
||||
%{_datadir}/dpdk/tools
|
||||
%{_datadir}/dpdk/usertools
|
||||
/lib/modules/%(uname -r)/extra/*
|
||||
%{_sbindir}/*
|
||||
%{_bindir}/*
|
||||
|
@ -428,7 +428,7 @@ grep_meminfo()
|
||||
show_devices()
|
||||
{
|
||||
if [ -d /sys/module/vfio_pci -o -d /sys/module/igb_uio ]; then
|
||||
${RTE_SDK}/tools/dpdk-devbind.py --status
|
||||
${RTE_SDK}/usertools/dpdk-devbind.py --status
|
||||
else
|
||||
echo "# Please load the 'igb_uio' or 'vfio-pci' kernel module before "
|
||||
echo "# querying or adjusting device bindings"
|
||||
@ -441,11 +441,11 @@ show_devices()
|
||||
bind_devices_to_vfio()
|
||||
{
|
||||
if [ -d /sys/module/vfio_pci ]; then
|
||||
${RTE_SDK}/tools/dpdk-devbind.py --status
|
||||
${RTE_SDK}/usertools/dpdk-devbind.py --status
|
||||
echo ""
|
||||
echo -n "Enter PCI address of device to bind to VFIO driver: "
|
||||
read PCI_PATH
|
||||
sudo ${RTE_SDK}/tools/dpdk-devbind.py -b vfio-pci $PCI_PATH &&
|
||||
sudo ${RTE_SDK}/usertools/dpdk-devbind.py -b vfio-pci $PCI_PATH &&
|
||||
echo "OK"
|
||||
else
|
||||
echo "# Please load the 'vfio-pci' kernel module before querying or "
|
||||
@ -459,11 +459,11 @@ bind_devices_to_vfio()
|
||||
bind_devices_to_igb_uio()
|
||||
{
|
||||
if [ -d /sys/module/igb_uio ]; then
|
||||
${RTE_SDK}/tools/dpdk-devbind.py --status
|
||||
${RTE_SDK}/usertools/dpdk-devbind.py --status
|
||||
echo ""
|
||||
echo -n "Enter PCI address of device to bind to IGB UIO driver: "
|
||||
read PCI_PATH
|
||||
sudo ${RTE_SDK}/tools/dpdk-devbind.py -b igb_uio $PCI_PATH && echo "OK"
|
||||
sudo ${RTE_SDK}/usertools/dpdk-devbind.py -b igb_uio $PCI_PATH && echo "OK"
|
||||
else
|
||||
echo "# Please load the 'igb_uio' kernel module before querying or "
|
||||
echo "# adjusting device bindings"
|
||||
@ -475,14 +475,14 @@ bind_devices_to_igb_uio()
|
||||
#
|
||||
unbind_devices()
|
||||
{
|
||||
${RTE_SDK}/tools/dpdk-devbind.py --status
|
||||
${RTE_SDK}/usertools/dpdk-devbind.py --status
|
||||
echo ""
|
||||
echo -n "Enter PCI address of device to unbind: "
|
||||
read PCI_PATH
|
||||
echo ""
|
||||
echo -n "Enter name of kernel driver to bind the device to: "
|
||||
read DRV
|
||||
sudo ${RTE_SDK}/tools/dpdk-devbind.py -b $DRV $PCI_PATH && echo "OK"
|
||||
sudo ${RTE_SDK}/usertools/dpdk-devbind.py -b $DRV $PCI_PATH && echo "OK"
|
||||
}
|
||||
|
||||
#
|
Loading…
Reference in New Issue
Block a user