summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2016-07-22unify tools namingThomas Monjalon
The following tools may be installed system-wide. It may be cleaner and more convenient to find them with the same dpdk- prefix (especially for autocompletion). Moreover, the script dpdk_nic_bind.py deserves a new name because it is not restricted to NICs and can be used for e.g. crypto. These files are renamed: pmdinfogen -> dpdk-pmdinfogen pmdinfo.py -> dpdk-pmdinfo.py dpdk_pdump -> dpdk-pdump dpdk_proc_info -> dpdk-procinfo dpdk_nic_bind.py -> dpdk-devbind.py setup.sh -> dpdk-setup.sh The tools pmdinfogen, pmdinfo.py and dpdk_pdump are new in 16.07. The scripts dpdk_nic_bind.py and setup.sh may have been used with previous releases by end users. That's why a symbolic link still provide the old name in the installed tools directory. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-07-10tools: fix pmdinfo for FreeBSDBruce Richardson
There were a couple of issues which prevented pmdinfo.py from running on FreeBSD, both of which are fixed by this patch. * The path to python is not /usr/bin/python as on Linux, so use /usr/bin/env to find it on both OS's. * The path to the pci ids DB is in a different location on FreeBSD, so use the platform python library to look in different default locations depending on the underlying OS. [There are two possible locations to look on FreeBSD, as defined by pciconf manpage, so check in both in order of better to worse] Fixes: c67c9a5c646a ("tools: query binaries for HW and other support information") Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2016-07-06tools: query binaries for HW and other support informationNeil Horman
This tool searches for the primer sting PMD_DRIVER_INFO= in any ELF binary, and, if found parses the remainder of the string as a json encoded string, outputting the results in either a human readable or raw, script parseable format Note that, in the case of dynamically linked applications, pmdinfo.py will scan for implicitly linked PMDs by searching the specified binaries .dynamic section for DT_NEEDED entries that contain the substring librte_pmd. The DT_RUNPATH, LD_LIBRARY_PATH, /usr/lib and /lib are searched for these libraries, in that order If a file is specified with no path, it is assumed to be a PMD DSO, and the LD_LIBRARY_PATH, /usr/lib[64]/ and /lib[64] is searched for it Currently the tool can output data in 3 formats: a) raw, suitable for scripting, where the raw JSON strings are dumped out b) table format (default) where hex pci ids are dumped in a table format c) pretty, where a user supplied pci.ids file is used to print out vendor and device strings Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Panu Matilainen <pmatilai@redhat.com> Acked-by: Remy Horton <remy.horton@intel.com>
2016-05-19tools: allow binding to other network class devicesThadeu Lima de Souza Cascardo
dpdk_nic_bind will only handle Ethernet devices, but Mellanox ConnectX-3 Pro, for example, is a Network class device, but not an Ethernet one. Even though this allows other devices in the list, like Wireless devices, this should not be a problem. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
2016-03-24tools: fix setup with built-in kernel modulesJerin Jacob
probe the kernel module existence through /sys/module/ to make it work with both module and inbuilt kernel module Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2016-03-24tools: fix setup with huge page size other than 2MBJerin Jacob
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2016-03-24tools: fix flake8 warnings in bind scriptMauricio Vasquez B
flake8 checks were run for both python 2.7 and 3.4 There were some style issues as: - Line width > 79 - No double blank line before function definition - No double blank space before inline comment - Some other minor issues Signed-off-by: Mauricio Vasquez B <mauricio.vasquezbernal@studenti.polito.it> Acked-by: John McNamara <john.mcnamara@intel.com>
2016-03-24tools: remove extra blank lines in CPU layoutKeith Wiles
The output for the core list included an extra linefeed making the number of lines displayed much larger then required. Signed-off-by: Keith Wiles <keith.wiles@intel.com>
2016-02-09tools: support binding to built-in kernel modulesKamil Rytarowski
Currently dpdk_nic_bind.py detects Linux kernel modules via reading /proc/modules. Built-in ones aren't listed there and therefore they are not being found by the script. Add support for checking built-in modules with parsing the sysfs files. This commit obsoletes the /proc/modules parsing approach. Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-02-09tools: support Python 3 in bind scriptDawid Jurczak
This patch fixes syntax errors during binding ethernet device on systems where Python 3 is default. Backward compatibility with Python 2 is preserved. Signed-off-by: Dawid Jurczak <dawid_jurek@vp.pl>
2016-02-09tools: fix unbinding failure handlingJeff Shaw
We should call sys.exit(), not divide sys by exit(). Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-12-06mk: remove multi-target installThomas Monjalon
The multi-target install create some subdirectories with the target name which is not standard for a "make install" procedure. The uninstall procedure cannot be applied properly (without removing all files in a directory). It would need to pre-compute paths. As it is a packaging issue, it is removed from the build system capabilities. The variable BUILD_DIR is also renamed to RTE_OUTPUT used in other files. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Panu Matilainen <pmatilai@redhat.com>
2015-12-06tools: add short alias -s to NIC binding statusHarry van Haaren
This patch adds -s as an alias to --status in dpdk_nic_bind.py, providing a convenient shorthand. Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2015-12-04tools: exit setup script without promptJohn McNamara
Exit tools/setup.sh script without prompting "Press enter to continue". The script can now be exited by typing the option number, "quit" or "q". Signed-off-by: John McNamara <john.mcnamara@intel.com>
2015-08-03tools: fix comment in bind scriptStephen Hemminger
The function documentation was obviously copied and not updated. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-03-23tools: fix vfio supportAndre Richter
This patch fixes several minor issues in setup.sh: - show_nics() would not display the current Ethernet settings if the user only loads the vfio-pci module, b/c it only checks for presence of igb_uio. Fix this by adding a check for vfio-pci. - unbind_nics(): Fix option naming and string inside function. - Exchange a forgotten "igb_uio" with "vfio-pci" in a comment. Signed-off-by: Andre Richter <andre.o.richter@gmail.com>
2015-03-17tools: remove absolute path of chmod for vfio setupAndre Richter
setup.sh uses /usr/bin/chmod, but depending on distribution, it is not always there. For example, Ubuntu has /bin/chmod. Fix this by removing the absolute path, like it is done e.g. with grep. Signed-off-by: Andre Richter <andre.o.richter@gmail.com>
2015-03-05tools: fix binding to unsupported driverOuyang Changchun
The dpdk_nic_bind script will not allow ports to be bound or unbound if none of the kernel modules supported by DPDK is loaded. This patch relaxes this restriction by checking if a DPDK module is actually requested. The example below illustrates this problem: In virtio test, on the guest 1. Bind virtio port to igb_uio driver; 2. Remove igb_uio module; 3. Bind virtio port to virtio-pci driver, it fails and reports: "Error - no supported modules are loaded" The script should check the to-be-bound driver flag, if it is dpdk driver(igb_uio, vfio etc), and the corresponding module is not loaded, then exit, otherwise, just report a warning, and continue to bind the non-dpdk driver(like virtio-pci) to dev. Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com> Tested-by: Qian Xu <qian.q.xu@intel.com> Acked-by: Michael Qiu <michael.qiu@intel.com>
2015-02-20tools: enable binding device to uio_pci_genericDanny Zhou
Add uio_pci_generic to the list of supported kernel drivers. Signed-off-by: Danny Zhou <danny.zhou@intel.com> Tested-by: Qun Wan <qun.wan@intel.com> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
2014-10-10tools: fix setup script for Fedora 21Daniel Mrzyglod
script was expecting /lib/modules/$(uname -r)/kernel/drivers/uio/uio.ko but in fedora 21 there are Compressed kernel modules - xz (LZMA) Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-06-27tools: allow nic status query without igb_uioBruce richardson
Allow the nic bind/unbind script to print out its status messages even if the igb_uio driver is not loaded. For binding and unbinding NICs, the behaviour is the same, and the igb_uio driver still needs to be loaded. Signed-off-by: Bruce richardson <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-27tools: unbind ports that were erroneously boundAnatoly Burakov
When binding devices to a generic driver (i.e. one that doesn't have a PCI ID table, some devices that are not bound to any other driver could be bound even if no one has asked them to. hence, we check the list of drivers again, and see if some of the previously-unbound devices were erroneously bound. if such devices are found, they are unbound back. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-19tools: fix alignment of cpu layout outputShannon Zhao
Bug: when "core id" is greater than 9, the cpu_layout.py output doesn't align. Socket 0 Socket 1 --------- --------- Core 9 [4, 16] [10, 22] Core 10 [5, 17] [11, 23] Solution: adjust output format to align based on the maximum length of the "core id" and "processor" Socket 0 Socket 1 -------- -------- Core 9 [4, 16] [10, 22] Core 10 [5, 17] [11, 23] Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2014-06-16tools: add vfio support to setup scriptAnatoly Burakov
Support for loading/unloading VFIO drivers, binding/unbinding devices to/from VFIO, also setting up correct userspace permissions. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Tested-by: HuilongX Xu <huilongx.xu@intel.com> Tested-by: Waterman Cao <waterman.cao@intel.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-16tools: support vfio in dpdk_nic_bindAnatoly Burakov
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Tested-by: HuilongX Xu <huilongx.xu@intel.com> Tested-by: Waterman Cao <waterman.cao@intel.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-16tools: rename igb_uio_bind to dpdk_nic_bindAnatoly Burakov
Renaming the igb_uio_bind script to dpdk_nic_bind to have a generic name before supporting two drivers. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-16igb_uio: remove PCI id tableAnatoly Burakov
Removing PCI ID list to make igb_uio more similar to a generic driver like vfio-pci or pci_uio_generic. This is done to make it easier for the binding script to support multiple drivers. Note that since igb_uio no longer has a PCI ID list, it can now be bound to any device, not just those explicitly supported by DPDK. In other words, it now behaves similar to PCI stub, VFIO and other generic PCI drivers. Therefore to bind a new device to igb_uio, the user will now have to first write its PCI ID to "new_id" file inside the igb_uio driver directory, and only then write the PCI ID to "bind". This is reflected in changes to PCI binding script as well. There's a weird behaviour of sysfs when a new device ID is added to new_id. Subsequent writing to "bind" will result in IOError on closing the file. This error is harmless but it triggers the exception anyway, so in order to work around that, we check if the device was actually bound to the driver before raising an error. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Tested-by: HuilongX Xu <huilongx.xu@intel.com> Tested-by: Waterman Cao <waterman.cao@intel.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-11remove trailing whitespacesBruce Richardson
This commit removes trailing whitespace from lines in files. Almost all files are affected, as the BSD license copyright header had trailing whitespace on 4 lines in it [hence the number of files reporting 8 lines changed in the diffstat]. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> [Thomas: remove spaces before tabs in libs] [Thomas: remove more trailing spaces in non-C files] Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-03-20tools: rename pci_unbind scriptThomas Monjalon
In order to make this tool available among other system commands, the name must be more specific. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Chris Wright <chrisw@redhat.com>
2014-02-25update Intel copyright years to 2014Bruce Richardson
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2013-10-09doc: whitespace changes in licensesIntel
Signed-off-by: Intel
2013-09-17pci: don't unbind resources on exitIntel
unbind operations must be done before starting eal application Signed-off-by: Intel
2013-07-25update copyright date to 2013Intel
Signed-off-by: Intel
2013-07-25pci: make it possible to keep devices bound to uioIntel
Binding code has been refactored as well. Signed-off-by: Intel
2013-07-25eal: rework cpu information discoveryIntel
Signed-off-by: Intel
2013-07-25kni: initial importIntel
Signed-off-by: Intel
2013-07-05remove version in all filesIntel
Signed-off-by: Intel
2013-03-11first public releasev1.2.3r0Intel
version 1.2.3 Signed-off-by: Intel