xref: /dpdk/doc/guides/tools/pmdinfo.rst (revision e0a87c5f9d9b4b98ed016722954b8870ce93f985)
1..  SPDX-License-Identifier: BSD-3-Clause
2    Copyright(c) 2016 Canonical Limited. All rights reserved.
3
4
5dpdk-pmdinfo Application
6========================
7
8The ``dpdk-pmdinfo.py`` tool is a Data Plane Development Kit (DPDK) utility that
9can dump a PMDs hardware support info in the JSON format.
10
11Synopsis
12--------
13
14::
15
16   dpdk-pmdinfo.py [-h] [-p] [-v] ELF_FILE [ELF_FILE ...]
17
18Arguments
19---------
20
21.. program:: dpdk-pmdinfo.py
22
23.. option:: -h, --help
24
25   Show the inline help.
26
27.. option:: -p, --search-plugins
28
29   In addition of ``ELF_FILE``\s and their linked dynamic libraries,
30   also scan the DPDK plugins path.
31
32.. option:: -v, --verbose
33
34   Display warnings due to linked libraries not found
35   or ELF/JSON parsing errors in these libraries.
36   Use twice to show debug messages.
37
38.. option:: ELF_FILE
39
40   DPDK application binary or dynamic library.
41   Any linked ``librte_*.so`` library (as reported by ``ldd``) will also be analyzed.
42   Can be specified multiple times.
43
44Environment Variables
45---------------------
46
47.. envvar:: LD_LIBRARY_PATH
48
49   If specified, the linked ``librte_*.so`` libraries will be looked up here first.
50
51Examples
52--------
53
54Get the complete info for a given driver:
55
56.. code-block:: console
57
58   $ dpdk-pmdinfo.py /usr/bin/dpdk-testpmd | \
59       jq '.[] | select(.name == "net_ice_dcf")'
60   {
61     "name": "net_ice_dcf",
62     "params": "cap=dcf",
63     "kmod": "* igb_uio | vfio-pci",
64     "pci_ids": [
65       {
66         "vendor": "8086",
67         "device": "1889"
68       }
69     ]
70   }
71
72Get only the required kernel modules for a given driver:
73
74.. code-block:: console
75
76   $ dpdk-pmdinfo.py /usr/bin/dpdk-testpmd | \
77       jq '.[] | select(.name == "net_cn10k").kmod'
78   "vfio-pci"
79
80Get only the required kernel modules for a given device:
81
82.. code-block:: console
83
84   $ dpdk-pmdinfo.py /usr/bin/dpdk-testpmd | \
85       jq '.[] | select(.pci_ids[]? | .vendor == "15b3" and .device == "1013").kmod'
86   "* ib_uverbs & mlx5_core & mlx5_ib"
87