!273 [sync] PR-271: Add dumping features for proc-info
From: @openeuler-sync-bot Reviewed-by: @li-huisong Signed-off-by: @li-huisong
This commit is contained in:
commit
82218a6ce9
71
0205-doc-fix-application-name-in-procinfo-guide.patch
Normal file
71
0205-doc-fix-application-name-in-procinfo-guide.patch
Normal file
@ -0,0 +1,71 @@
|
||||
From 3ebc362fe3f70616922d46f3959c1e6d63cf76dc Mon Sep 17 00:00:00 2001
|
||||
From: Dongdong Liu <liudongdong3@huawei.com>
|
||||
Date: Tue, 11 Oct 2022 19:18:43 +0800
|
||||
Subject: doc: fix application name in procinfo guide
|
||||
|
||||
[ upstream commit 2a65f12f6ab461e2cb81192c6bdd136191c82ea9 ]
|
||||
|
||||
In commit 996ef1176111 ("app: add all remaining apps to meson build"),
|
||||
building the procinfo application through Meson has been done with a
|
||||
binary name different from the previous Makefile build system [1].
|
||||
|
||||
When we dropped Makefile support, the documentation was not updated.
|
||||
|
||||
Fixes: 3cc6ecfdfe85 ("build: remove makefiles")
|
||||
Cc: stable@dpdk.org
|
||||
|
||||
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
|
||||
Signed-off-by: David Marchand <david.marchand@redhat.com>
|
||||
---
|
||||
doc/guides/tools/proc_info.rst | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/doc/guides/tools/proc_info.rst b/doc/guides/tools/proc_info.rst
|
||||
index 9772d97ef0..e4f0c83f1b 100644
|
||||
--- a/doc/guides/tools/proc_info.rst
|
||||
+++ b/doc/guides/tools/proc_info.rst
|
||||
@@ -1,10 +1,10 @@
|
||||
.. SPDX-License-Identifier: BSD-3-Clause
|
||||
Copyright(c) 2015 Intel Corporation.
|
||||
|
||||
-dpdk-procinfo Application
|
||||
-=========================
|
||||
+dpdk-proc-info Application
|
||||
+==========================
|
||||
|
||||
-The dpdk-procinfo application is a Data Plane Development Kit (DPDK) application
|
||||
+The dpdk-proc-info application is a Data Plane Development Kit (DPDK) application
|
||||
that runs as a DPDK secondary process and is capable of retrieving port
|
||||
statistics, resetting port statistics, printing DPDK memory information and
|
||||
displaying debug information for port.
|
||||
@@ -17,7 +17,7 @@ The application has a number of command line options:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
- ./<build_dir>/app/dpdk-procinfo -- -m | [-p PORTMASK] [--stats | --xstats |
|
||||
+ ./<build_dir>/app/dpdk-proc-info -- -m | [-p PORTMASK] [--stats | --xstats |
|
||||
--stats-reset | --xstats-reset] [ --show-port | --show-tm | --show-crypto |
|
||||
--show-ring[=name] | --show-mempool[=name] | --iter-mempool=name ]
|
||||
|
||||
@@ -72,14 +72,14 @@ by name. For invalid or no mempool name no elements are displayed.
|
||||
Limitations
|
||||
-----------
|
||||
|
||||
-* dpdk-procinfo should run alongside primary process with same DPDK version.
|
||||
+* dpdk-proc-info should run alongside primary process with same DPDK version.
|
||||
|
||||
-* When running ``dpdk-procinfo`` with shared library mode, it is required to
|
||||
+* When running ``dpdk-proc-info`` with shared library mode, it is required to
|
||||
pass the same NIC PMD libraries as used for the primary application. Any
|
||||
mismatch in PMD library arguments can lead to undefined behavior and results
|
||||
affecting primary application too.
|
||||
|
||||
-* Stats retrieval using ``dpdk-procinfo`` is not supported for virtual devices like PCAP and TAP.
|
||||
+* Stats retrieval using ``dpdk-proc-info`` is not supported for virtual devices like PCAP and TAP.
|
||||
|
||||
-* Since default DPDK EAL arguments for ``dpdk-procinfo`` are ``-c1, -n4 & --proc-type=secondary``,
|
||||
+* Since default DPDK EAL arguments for ``dpdk-proc-info`` are ``-c1, -n4 & --proc-type=secondary``,
|
||||
It is not expected that the user passes any EAL arguments.
|
||||
--
|
||||
2.23.0
|
||||
|
||||
44
0206-doc-document-device-dump-in-procinfo-guide.patch
Normal file
44
0206-doc-document-device-dump-in-procinfo-guide.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From 245e4f0da830830c6ca9b59ce9eb2f7d9ba6e0a5 Mon Sep 17 00:00:00 2001
|
||||
From: Dongdong Liu <liudongdong3@huawei.com>
|
||||
Date: Tue, 11 Oct 2022 19:18:43 +0800
|
||||
Subject: doc: document device dump in procinfo guide
|
||||
|
||||
[ upstream commit dd2658f8d0e4725f579ff098f1ee159d897d6abc ]
|
||||
|
||||
The --show-port-private option was not documented.
|
||||
|
||||
Fixes: bb947a7264da ("app/procinfo: dump device private info")
|
||||
|
||||
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
|
||||
Signed-off-by: David Marchand <david.marchand@redhat.com>
|
||||
---
|
||||
doc/guides/tools/proc_info.rst | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/doc/guides/tools/proc_info.rst b/doc/guides/tools/proc_info.rst
|
||||
index e4f0c83f1b..5dd6f9ecae 100644
|
||||
--- a/doc/guides/tools/proc_info.rst
|
||||
+++ b/doc/guides/tools/proc_info.rst
|
||||
@@ -19,7 +19,8 @@ The application has a number of command line options:
|
||||
|
||||
./<build_dir>/app/dpdk-proc-info -- -m | [-p PORTMASK] [--stats | --xstats |
|
||||
--stats-reset | --xstats-reset] [ --show-port | --show-tm | --show-crypto |
|
||||
- --show-ring[=name] | --show-mempool[=name] | --iter-mempool=name ]
|
||||
+ --show-ring[=name] | --show-mempool[=name] | --iter-mempool=name |
|
||||
+ --show-port-private ]
|
||||
|
||||
Parameters
|
||||
~~~~~~~~~~
|
||||
@@ -69,6 +70,9 @@ mempool. For invalid or no mempool name, whole list is dump.
|
||||
The iter-mempool parameter iterates and displays mempool elements specified
|
||||
by name. For invalid or no mempool name no elements are displayed.
|
||||
|
||||
+**--show-port-private**
|
||||
+The show-port-private parameter displays ports private information.
|
||||
+
|
||||
Limitations
|
||||
-----------
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
108
0207-app-procinfo-remove-doxygen-comments.patch
Normal file
108
0207-app-procinfo-remove-doxygen-comments.patch
Normal file
@ -0,0 +1,108 @@
|
||||
From 85da70e47d6f94ddaf88625b87e1ba9144c2df1d Mon Sep 17 00:00:00 2001
|
||||
From: Dongdong Liu <liudongdong3@huawei.com>
|
||||
Date: Tue, 11 Oct 2022 19:18:41 +0800
|
||||
Subject: app/procinfo: remove doxygen comments
|
||||
|
||||
[ upstream commit 797f2f510ce10fd049f4815bd7cce9bc19c460be ]
|
||||
|
||||
This code is to do cleanup for the wrong doxygen syntax comments
|
||||
The DPDK API is documented using doxygen comment annotations in the
|
||||
header files. The procinfo code seems no need to use doxygen comment.
|
||||
|
||||
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
|
||||
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
|
||||
---
|
||||
app/proc-info/main.c | 42 +++++++++++++++++++++---------------------
|
||||
1 file changed, 21 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/app/proc-info/main.c b/app/proc-info/main.c
|
||||
index accb5e716d..a75a1aa9bd 100644
|
||||
--- a/app/proc-info/main.c
|
||||
+++ b/app/proc-info/main.c
|
||||
@@ -48,33 +48,33 @@
|
||||
#define STATS_BDR_STR(w, s) printf("%.*s%s%.*s\n", w, \
|
||||
STATS_BDR_FMT, s, w, STATS_BDR_FMT)
|
||||
|
||||
-/**< mask of enabled ports */
|
||||
+/* mask of enabled ports */
|
||||
static unsigned long enabled_port_mask;
|
||||
-/**< Enable stats. */
|
||||
+/* Enable stats. */
|
||||
static uint32_t enable_stats;
|
||||
-/**< Enable xstats. */
|
||||
+/* Enable xstats. */
|
||||
static uint32_t enable_xstats;
|
||||
-/**< Enable collectd format*/
|
||||
+/* Enable collectd format */
|
||||
static uint32_t enable_collectd_format;
|
||||
-/**< FD to send collectd format messages to STDOUT*/
|
||||
+/* FD to send collectd format messages to STDOUT */
|
||||
static int stdout_fd;
|
||||
-/**< Host id process is running on */
|
||||
+/* Host id process is running on */
|
||||
static char host_id[MAX_LONG_OPT_SZ];
|
||||
#ifdef RTE_LIB_METRICS
|
||||
-/**< Enable metrics. */
|
||||
+/* Enable metrics. */
|
||||
static uint32_t enable_metrics;
|
||||
#endif
|
||||
-/**< Enable stats reset. */
|
||||
+/* Enable stats reset. */
|
||||
static uint32_t reset_stats;
|
||||
-/**< Enable xstats reset. */
|
||||
+/* Enable xstats reset. */
|
||||
static uint32_t reset_xstats;
|
||||
-/**< Enable memory info. */
|
||||
+/* Enable memory info. */
|
||||
static uint32_t mem_info;
|
||||
-/**< Enable displaying xstat name. */
|
||||
+/* Enable displaying xstat name. */
|
||||
static uint32_t enable_xstats_name;
|
||||
static char *xstats_name;
|
||||
|
||||
-/**< Enable xstats by ids. */
|
||||
+/* Enable xstats by ids. */
|
||||
#define MAX_NB_XSTATS_IDS 1024
|
||||
static uint32_t nb_xstats_ids;
|
||||
static uint64_t xstats_ids[MAX_NB_XSTATS_IDS];
|
||||
@@ -82,28 +82,28 @@ static uint64_t xstats_ids[MAX_NB_XSTATS_IDS];
|
||||
/* show border */
|
||||
static char bdr_str[MAX_STRING_LEN];
|
||||
|
||||
-/**< Enable show port. */
|
||||
+/* Enable show port. */
|
||||
static uint32_t enable_shw_port;
|
||||
-/**< Enable show port private info. */
|
||||
+/* Enable show port private info. */
|
||||
static uint32_t enable_shw_port_priv;
|
||||
-/**< Enable show tm. */
|
||||
+/* Enable show tm. */
|
||||
static uint32_t enable_shw_tm;
|
||||
-/**< Enable show crypto. */
|
||||
+/* Enable show crypto. */
|
||||
static uint32_t enable_shw_crypto;
|
||||
-/**< Enable show ring. */
|
||||
+/* Enable show ring. */
|
||||
static uint32_t enable_shw_ring;
|
||||
static char *ring_name;
|
||||
-/**< Enable show mempool. */
|
||||
+/* Enable show mempool. */
|
||||
static uint32_t enable_shw_mempool;
|
||||
static char *mempool_name;
|
||||
-/**< Enable iter mempool. */
|
||||
+/* Enable iter mempool. */
|
||||
static uint32_t enable_iter_mempool;
|
||||
static char *mempool_iter_name;
|
||||
-/**< Enable dump regs. */
|
||||
+/* Enable dump regs. */
|
||||
static uint32_t enable_dump_regs;
|
||||
static char *dump_regs_file_prefix;
|
||||
|
||||
-/**< display usage */
|
||||
+/* display usage */
|
||||
static void
|
||||
proc_info_usage(const char *prgname)
|
||||
{
|
||||
--
|
||||
2.23.0
|
||||
|
||||
118
0208-app-procinfo-dump-DPDK-version.patch
Normal file
118
0208-app-procinfo-dump-DPDK-version.patch
Normal file
@ -0,0 +1,118 @@
|
||||
From 1cc631c496d706bfc02cf776ef403b0c22bfede3 Mon Sep 17 00:00:00 2001
|
||||
From: "Min Hu (Connor)" <humin29@huawei.com>
|
||||
Date: Tue, 11 Oct 2022 19:18:36 +0800
|
||||
Subject: app/procinfo: dump DPDK version
|
||||
|
||||
[ upstream commit 4778a8ec8bcf453f039b0663534cc37cb5367b43 ]
|
||||
|
||||
Add support for dump dpdk version.
|
||||
|
||||
The command is like:
|
||||
dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=xxx -- --version
|
||||
|
||||
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
|
||||
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
|
||||
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
|
||||
---
|
||||
app/proc-info/main.c | 19 ++++++++++++++++++-
|
||||
doc/guides/tools/proc_info.rst | 5 ++++-
|
||||
2 files changed, 22 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/app/proc-info/main.c b/app/proc-info/main.c
|
||||
index a75a1aa9bd..651d678cd1 100644
|
||||
--- a/app/proc-info/main.c
|
||||
+++ b/app/proc-info/main.c
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <rte_cryptodev.h>
|
||||
#include <rte_tm.h>
|
||||
#include <rte_hexdump.h>
|
||||
+#include <rte_version.h>
|
||||
|
||||
/* Maximum long option length for option parsing. */
|
||||
#define MAX_LONG_OPT_SZ 64
|
||||
@@ -102,6 +103,8 @@ static char *mempool_iter_name;
|
||||
/* Enable dump regs. */
|
||||
static uint32_t enable_dump_regs;
|
||||
static char *dump_regs_file_prefix;
|
||||
+/* Enable show DPDK version. */
|
||||
+static uint32_t enable_shw_version;
|
||||
|
||||
/* display usage */
|
||||
static void
|
||||
@@ -130,6 +133,7 @@ proc_info_usage(const char *prgname)
|
||||
" --show-crypto: to display crypto information\n"
|
||||
" --show-ring[=name]: to display ring information\n"
|
||||
" --show-mempool[=name]: to display mempool information\n"
|
||||
+ " --version: to display DPDK version\n"
|
||||
" --iter-mempool=name: iterate mempool elements to display content\n"
|
||||
" --dump-regs=file-prefix: dump registers to file with the file-prefix\n",
|
||||
prgname);
|
||||
@@ -242,6 +246,7 @@ proc_info_parse_args(int argc, char **argv)
|
||||
{"show-mempool", optional_argument, NULL, 0},
|
||||
{"iter-mempool", required_argument, NULL, 0},
|
||||
{"dump-regs", required_argument, NULL, 0},
|
||||
+ {"version", 0, NULL, 0},
|
||||
{NULL, 0, 0, 0}
|
||||
};
|
||||
|
||||
@@ -313,7 +318,9 @@ proc_info_parse_args(int argc, char **argv)
|
||||
"dump-regs", MAX_LONG_OPT_SZ)) {
|
||||
enable_dump_regs = 1;
|
||||
dump_regs_file_prefix = optarg;
|
||||
- }
|
||||
+ } else if (!strncmp(long_option[option_index].name,
|
||||
+ "version", MAX_LONG_OPT_SZ))
|
||||
+ enable_shw_version = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Print xstat single value given by name*/
|
||||
@@ -1476,6 +1483,14 @@ dump_regs(char *file_prefix)
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+show_version(void)
|
||||
+{
|
||||
+ snprintf(bdr_str, MAX_STRING_LEN, " show - DPDK version ");
|
||||
+ STATS_BDR_STR(10, bdr_str);
|
||||
+ printf("DPDK version: %s\n", rte_version());
|
||||
+}
|
||||
+
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
@@ -1589,6 +1604,8 @@ main(int argc, char **argv)
|
||||
iter_mempool(mempool_iter_name);
|
||||
if (enable_dump_regs)
|
||||
dump_regs(dump_regs_file_prefix);
|
||||
+ if (enable_shw_version)
|
||||
+ show_version();
|
||||
|
||||
RTE_ETH_FOREACH_DEV(i)
|
||||
rte_eth_dev_close(i);
|
||||
diff --git a/doc/guides/tools/proc_info.rst b/doc/guides/tools/proc_info.rst
|
||||
index 5dd6f9ecae..121142fdd4 100644
|
||||
--- a/doc/guides/tools/proc_info.rst
|
||||
+++ b/doc/guides/tools/proc_info.rst
|
||||
@@ -20,7 +20,7 @@ The application has a number of command line options:
|
||||
./<build_dir>/app/dpdk-proc-info -- -m | [-p PORTMASK] [--stats | --xstats |
|
||||
--stats-reset | --xstats-reset] [ --show-port | --show-tm | --show-crypto |
|
||||
--show-ring[=name] | --show-mempool[=name] | --iter-mempool=name |
|
||||
- --show-port-private ]
|
||||
+ --show-port-private | --version ]
|
||||
|
||||
Parameters
|
||||
~~~~~~~~~~
|
||||
@@ -73,6 +73,9 @@ by name. For invalid or no mempool name no elements are displayed.
|
||||
**--show-port-private**
|
||||
The show-port-private parameter displays ports private information.
|
||||
|
||||
+**--version**
|
||||
+The version parameter displays DPDK version.
|
||||
+
|
||||
Limitations
|
||||
-----------
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
134
0209-app-procinfo-dump-firmware-version.patch
Normal file
134
0209-app-procinfo-dump-firmware-version.patch
Normal file
@ -0,0 +1,134 @@
|
||||
From a9114b29e2916f51faac5923cab0a12c34749d10 Mon Sep 17 00:00:00 2001
|
||||
From: Dongdong Liu <liudongdong3@huawei.com>
|
||||
Date: Tue, 11 Oct 2022 19:18:37 +0800
|
||||
Subject: app/procinfo: dump firmware version
|
||||
|
||||
[ upstream commit 37ebf5ab67d7ef4b532819de47ab780dded655e4 ]
|
||||
|
||||
Add support for dump ethdev firmware version.
|
||||
|
||||
The command is like:
|
||||
dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=xxx -- --firmware-version
|
||||
|
||||
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
|
||||
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
|
||||
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
|
||||
---
|
||||
app/proc-info/main.c | 35 ++++++++++++++++++++++++++++++++++
|
||||
doc/guides/tools/proc_info.rst | 5 ++++-
|
||||
2 files changed, 39 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/app/proc-info/main.c b/app/proc-info/main.c
|
||||
index 651d678cd1..351c55896b 100644
|
||||
--- a/app/proc-info/main.c
|
||||
+++ b/app/proc-info/main.c
|
||||
@@ -45,6 +45,8 @@
|
||||
#define MAX_LONG_OPT_SZ 64
|
||||
#define MAX_STRING_LEN 256
|
||||
|
||||
+#define ETHDEV_FWVERS_LEN 32
|
||||
+
|
||||
#define STATS_BDR_FMT "========================================"
|
||||
#define STATS_BDR_STR(w, s) printf("%.*s%s%.*s\n", w, \
|
||||
STATS_BDR_FMT, s, w, STATS_BDR_FMT)
|
||||
@@ -105,6 +107,8 @@ static uint32_t enable_dump_regs;
|
||||
static char *dump_regs_file_prefix;
|
||||
/* Enable show DPDK version. */
|
||||
static uint32_t enable_shw_version;
|
||||
+/* Enable show ethdev firmware version. */
|
||||
+static uint32_t enable_shw_fw_version;
|
||||
|
||||
/* display usage */
|
||||
static void
|
||||
@@ -134,6 +138,7 @@ proc_info_usage(const char *prgname)
|
||||
" --show-ring[=name]: to display ring information\n"
|
||||
" --show-mempool[=name]: to display mempool information\n"
|
||||
" --version: to display DPDK version\n"
|
||||
+ " --firmware-version: to display ethdev firmware version\n"
|
||||
" --iter-mempool=name: iterate mempool elements to display content\n"
|
||||
" --dump-regs=file-prefix: dump registers to file with the file-prefix\n",
|
||||
prgname);
|
||||
@@ -247,6 +252,7 @@ proc_info_parse_args(int argc, char **argv)
|
||||
{"iter-mempool", required_argument, NULL, 0},
|
||||
{"dump-regs", required_argument, NULL, 0},
|
||||
{"version", 0, NULL, 0},
|
||||
+ {"firmware-version", 0, NULL, 0},
|
||||
{NULL, 0, 0, 0}
|
||||
};
|
||||
|
||||
@@ -321,6 +327,9 @@ proc_info_parse_args(int argc, char **argv)
|
||||
} else if (!strncmp(long_option[option_index].name,
|
||||
"version", MAX_LONG_OPT_SZ))
|
||||
enable_shw_version = 1;
|
||||
+ else if (!strncmp(long_option[option_index].name,
|
||||
+ "firmware-version", MAX_LONG_OPT_SZ))
|
||||
+ enable_shw_fw_version = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Print xstat single value given by name*/
|
||||
@@ -1491,6 +1500,30 @@ show_version(void)
|
||||
printf("DPDK version: %s\n", rte_version());
|
||||
}
|
||||
|
||||
+static void
|
||||
+show_firmware_version(void)
|
||||
+{
|
||||
+ char fw_version[ETHDEV_FWVERS_LEN];
|
||||
+ uint16_t i;
|
||||
+
|
||||
+ snprintf(bdr_str, MAX_STRING_LEN, " show - firmware version ");
|
||||
+ STATS_BDR_STR(10, bdr_str);
|
||||
+
|
||||
+ RTE_ETH_FOREACH_DEV(i) {
|
||||
+ /* Skip if port is not in mask */
|
||||
+ if ((enabled_port_mask & (1ul << i)) == 0)
|
||||
+ continue;
|
||||
+
|
||||
+ if (rte_eth_dev_fw_version_get(i, fw_version,
|
||||
+ ETHDEV_FWVERS_LEN) == 0)
|
||||
+ printf("Ethdev port %u firmware version: %s\n", i,
|
||||
+ fw_version);
|
||||
+ else
|
||||
+ printf("Ethdev port %u firmware version: %s\n", i,
|
||||
+ "not available");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
@@ -1606,6 +1639,8 @@ main(int argc, char **argv)
|
||||
dump_regs(dump_regs_file_prefix);
|
||||
if (enable_shw_version)
|
||||
show_version();
|
||||
+ if (enable_shw_fw_version)
|
||||
+ show_firmware_version();
|
||||
|
||||
RTE_ETH_FOREACH_DEV(i)
|
||||
rte_eth_dev_close(i);
|
||||
diff --git a/doc/guides/tools/proc_info.rst b/doc/guides/tools/proc_info.rst
|
||||
index 121142fdd4..4eb9fb9249 100644
|
||||
--- a/doc/guides/tools/proc_info.rst
|
||||
+++ b/doc/guides/tools/proc_info.rst
|
||||
@@ -20,7 +20,7 @@ The application has a number of command line options:
|
||||
./<build_dir>/app/dpdk-proc-info -- -m | [-p PORTMASK] [--stats | --xstats |
|
||||
--stats-reset | --xstats-reset] [ --show-port | --show-tm | --show-crypto |
|
||||
--show-ring[=name] | --show-mempool[=name] | --iter-mempool=name |
|
||||
- --show-port-private | --version ]
|
||||
+ --show-port-private | --version | --firmware-version ]
|
||||
|
||||
Parameters
|
||||
~~~~~~~~~~
|
||||
@@ -76,6 +76,9 @@ The show-port-private parameter displays ports private information.
|
||||
**--version**
|
||||
The version parameter displays DPDK version.
|
||||
|
||||
+**--firmware-version**
|
||||
+The firmware-version parameter displays ethdev firmware version.
|
||||
+
|
||||
Limitations
|
||||
-----------
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
156
0210-app-procinfo-dump-RSS-RETA.patch
Normal file
156
0210-app-procinfo-dump-RSS-RETA.patch
Normal file
@ -0,0 +1,156 @@
|
||||
From 1ec0e71ea5d6b0fbb5bbe7bcde8bf11f57a708ef Mon Sep 17 00:00:00 2001
|
||||
From: "Min Hu (Connor)" <humin29@huawei.com>
|
||||
Date: Tue, 11 Oct 2022 19:18:38 +0800
|
||||
Subject: app/procinfo: dump RSS RETA
|
||||
|
||||
[ upstream commit 0cc5126ccfe5b67b60d869d036cf40496f7591d3 ]
|
||||
|
||||
This patch add support for RSS reta dump.
|
||||
|
||||
The command is like:
|
||||
dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=xxx -- --show-rss-reta
|
||||
|
||||
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
|
||||
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
|
||||
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
|
||||
---
|
||||
app/proc-info/main.c | 57 ++++++++++++++++++++++++++++++++++
|
||||
doc/guides/tools/proc_info.rst | 5 ++-
|
||||
2 files changed, 61 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/app/proc-info/main.c b/app/proc-info/main.c
|
||||
index 351c55896b..efae5c6036 100644
|
||||
--- a/app/proc-info/main.c
|
||||
+++ b/app/proc-info/main.c
|
||||
@@ -46,6 +46,8 @@
|
||||
#define MAX_STRING_LEN 256
|
||||
|
||||
#define ETHDEV_FWVERS_LEN 32
|
||||
+#define RTE_RETA_CONF_GROUP_NUM 32
|
||||
+#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
|
||||
|
||||
#define STATS_BDR_FMT "========================================"
|
||||
#define STATS_BDR_STR(w, s) printf("%.*s%s%.*s\n", w, \
|
||||
@@ -109,6 +111,8 @@ static char *dump_regs_file_prefix;
|
||||
static uint32_t enable_shw_version;
|
||||
/* Enable show ethdev firmware version. */
|
||||
static uint32_t enable_shw_fw_version;
|
||||
+/* Enable show RSS reta. */
|
||||
+static uint32_t enable_shw_rss_reta;
|
||||
|
||||
/* display usage */
|
||||
static void
|
||||
@@ -139,6 +143,7 @@ proc_info_usage(const char *prgname)
|
||||
" --show-mempool[=name]: to display mempool information\n"
|
||||
" --version: to display DPDK version\n"
|
||||
" --firmware-version: to display ethdev firmware version\n"
|
||||
+ " --show-rss-reta: to display ports redirection table\n"
|
||||
" --iter-mempool=name: iterate mempool elements to display content\n"
|
||||
" --dump-regs=file-prefix: dump registers to file with the file-prefix\n",
|
||||
prgname);
|
||||
@@ -253,6 +258,7 @@ proc_info_parse_args(int argc, char **argv)
|
||||
{"dump-regs", required_argument, NULL, 0},
|
||||
{"version", 0, NULL, 0},
|
||||
{"firmware-version", 0, NULL, 0},
|
||||
+ {"show-rss-reta", 0, NULL, 0},
|
||||
{NULL, 0, 0, 0}
|
||||
};
|
||||
|
||||
@@ -330,6 +336,9 @@ proc_info_parse_args(int argc, char **argv)
|
||||
else if (!strncmp(long_option[option_index].name,
|
||||
"firmware-version", MAX_LONG_OPT_SZ))
|
||||
enable_shw_fw_version = 1;
|
||||
+ else if (!strncmp(long_option[option_index].name,
|
||||
+ "show-rss-reta", MAX_LONG_OPT_SZ))
|
||||
+ enable_shw_rss_reta = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Print xstat single value given by name*/
|
||||
@@ -1524,6 +1533,52 @@ show_firmware_version(void)
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+show_port_rss_reta_info(void)
|
||||
+{
|
||||
+ struct rte_eth_rss_reta_entry64 reta_conf[RTE_RETA_CONF_GROUP_NUM + 1];
|
||||
+ struct rte_eth_dev_info dev_info;
|
||||
+ uint16_t i, idx, shift;
|
||||
+ uint16_t num;
|
||||
+ uint16_t id;
|
||||
+ int ret;
|
||||
+
|
||||
+ RTE_ETH_FOREACH_DEV(id) {
|
||||
+ /* Skip if port is not in mask */
|
||||
+ if ((enabled_port_mask & (1ul << id)) == 0)
|
||||
+ continue;
|
||||
+
|
||||
+ snprintf(bdr_str, MAX_STRING_LEN, " Port %u ", id);
|
||||
+ STATS_BDR_STR(5, bdr_str);
|
||||
+
|
||||
+ ret = rte_eth_dev_info_get(id, &dev_info);
|
||||
+ if (ret != 0) {
|
||||
+ fprintf(stderr, "Error getting device info: %s\n",
|
||||
+ strerror(-ret));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ num = DIV_ROUND_UP(dev_info.reta_size, RTE_ETH_RETA_GROUP_SIZE);
|
||||
+ memset(reta_conf, 0, sizeof(reta_conf));
|
||||
+ for (i = 0; i < num; i++)
|
||||
+ reta_conf[i].mask = ~0ULL;
|
||||
+
|
||||
+ ret = rte_eth_dev_rss_reta_query(id, reta_conf, dev_info.reta_size);
|
||||
+ if (ret != 0) {
|
||||
+ fprintf(stderr, "Error getting RSS RETA info: %s\n",
|
||||
+ strerror(-ret));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < dev_info.reta_size; i++) {
|
||||
+ idx = i / RTE_ETH_RETA_GROUP_SIZE;
|
||||
+ shift = i % RTE_ETH_RETA_GROUP_SIZE;
|
||||
+ printf("RSS RETA configuration: hash index=%u, queue=%u\n",
|
||||
+ i, reta_conf[idx].reta[shift]);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
@@ -1641,6 +1696,8 @@ main(int argc, char **argv)
|
||||
show_version();
|
||||
if (enable_shw_fw_version)
|
||||
show_firmware_version();
|
||||
+ if (enable_shw_rss_reta)
|
||||
+ show_port_rss_reta_info();
|
||||
|
||||
RTE_ETH_FOREACH_DEV(i)
|
||||
rte_eth_dev_close(i);
|
||||
diff --git a/doc/guides/tools/proc_info.rst b/doc/guides/tools/proc_info.rst
|
||||
index 4eb9fb9249..7c8d115fdf 100644
|
||||
--- a/doc/guides/tools/proc_info.rst
|
||||
+++ b/doc/guides/tools/proc_info.rst
|
||||
@@ -20,7 +20,7 @@ The application has a number of command line options:
|
||||
./<build_dir>/app/dpdk-proc-info -- -m | [-p PORTMASK] [--stats | --xstats |
|
||||
--stats-reset | --xstats-reset] [ --show-port | --show-tm | --show-crypto |
|
||||
--show-ring[=name] | --show-mempool[=name] | --iter-mempool=name |
|
||||
- --show-port-private | --version | --firmware-version ]
|
||||
+ --show-port-private | --version | --firmware-version | --show-rss-reta ]
|
||||
|
||||
Parameters
|
||||
~~~~~~~~~~
|
||||
@@ -79,6 +79,9 @@ The version parameter displays DPDK version.
|
||||
**--firmware-version**
|
||||
The firmware-version parameter displays ethdev firmware version.
|
||||
|
||||
+**--show-rss-reta**
|
||||
+The show-rss-reta parameter displays ports rss redirection table.
|
||||
+
|
||||
Limitations
|
||||
-----------
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
152
0211-app-procinfo-dump-module-EEPROM-info.patch
Normal file
152
0211-app-procinfo-dump-module-EEPROM-info.patch
Normal file
@ -0,0 +1,152 @@
|
||||
From 24094ec56e38b32eb2d8bab9822a9fb1355a5ef4 Mon Sep 17 00:00:00 2001
|
||||
From: "Min Hu (Connor)" <humin29@huawei.com>
|
||||
Date: Tue, 11 Oct 2022 19:18:39 +0800
|
||||
Subject: app/procinfo: dump module EEPROM info
|
||||
|
||||
[ upstream commit 0084463ea0042f15b3ef50d9e4c47dbe4d3704b1 ]
|
||||
|
||||
This patch add support for module eeprom info dump.
|
||||
|
||||
The command is like:
|
||||
dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=xxx -- --show-module-eeprom
|
||||
|
||||
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
|
||||
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
|
||||
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
|
||||
---
|
||||
app/proc-info/main.c | 52 ++++++++++++++++++++++++++++++++++
|
||||
doc/guides/tools/proc_info.rst | 6 +++-
|
||||
2 files changed, 57 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/app/proc-info/main.c b/app/proc-info/main.c
|
||||
index efae5c6036..2d12644543 100644
|
||||
--- a/app/proc-info/main.c
|
||||
+++ b/app/proc-info/main.c
|
||||
@@ -48,6 +48,7 @@
|
||||
#define ETHDEV_FWVERS_LEN 32
|
||||
#define RTE_RETA_CONF_GROUP_NUM 32
|
||||
#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
|
||||
+#define EEPROM_DUMP_CHUNKSIZE 1024
|
||||
|
||||
#define STATS_BDR_FMT "========================================"
|
||||
#define STATS_BDR_STR(w, s) printf("%.*s%s%.*s\n", w, \
|
||||
@@ -113,6 +114,8 @@ static uint32_t enable_shw_version;
|
||||
static uint32_t enable_shw_fw_version;
|
||||
/* Enable show RSS reta. */
|
||||
static uint32_t enable_shw_rss_reta;
|
||||
+/* Enable show module eeprom information. */
|
||||
+static uint32_t enable_shw_module_eeprom;
|
||||
|
||||
/* display usage */
|
||||
static void
|
||||
@@ -144,6 +147,7 @@ proc_info_usage(const char *prgname)
|
||||
" --version: to display DPDK version\n"
|
||||
" --firmware-version: to display ethdev firmware version\n"
|
||||
" --show-rss-reta: to display ports redirection table\n"
|
||||
+ " --show-module-eeprom: to display ports module eeprom information\n"
|
||||
" --iter-mempool=name: iterate mempool elements to display content\n"
|
||||
" --dump-regs=file-prefix: dump registers to file with the file-prefix\n",
|
||||
prgname);
|
||||
@@ -259,6 +263,7 @@ proc_info_parse_args(int argc, char **argv)
|
||||
{"version", 0, NULL, 0},
|
||||
{"firmware-version", 0, NULL, 0},
|
||||
{"show-rss-reta", 0, NULL, 0},
|
||||
+ {"show-module-eeprom", 0, NULL, 0},
|
||||
{NULL, 0, 0, 0}
|
||||
};
|
||||
|
||||
@@ -339,6 +344,9 @@ proc_info_parse_args(int argc, char **argv)
|
||||
else if (!strncmp(long_option[option_index].name,
|
||||
"show-rss-reta", MAX_LONG_OPT_SZ))
|
||||
enable_shw_rss_reta = 1;
|
||||
+ else if (!strncmp(long_option[option_index].name,
|
||||
+ "show-module-eeprom", MAX_LONG_OPT_SZ))
|
||||
+ enable_shw_module_eeprom = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Print xstat single value given by name*/
|
||||
@@ -1579,6 +1587,48 @@ show_port_rss_reta_info(void)
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+show_module_eeprom_info(void)
|
||||
+{
|
||||
+ unsigned char bytes_eeprom[EEPROM_DUMP_CHUNKSIZE];
|
||||
+ struct rte_eth_dev_module_info module_info;
|
||||
+ struct rte_dev_eeprom_info eeprom_info;
|
||||
+ uint16_t i;
|
||||
+ int ret;
|
||||
+
|
||||
+ RTE_ETH_FOREACH_DEV(i) {
|
||||
+ /* Skip if port is not in mask */
|
||||
+ if ((enabled_port_mask & (1ul << i)) == 0)
|
||||
+ continue;
|
||||
+
|
||||
+ snprintf(bdr_str, MAX_STRING_LEN, " Port %u ", i);
|
||||
+ STATS_BDR_STR(5, bdr_str);
|
||||
+
|
||||
+ ret = rte_eth_dev_get_module_info(i, &module_info);
|
||||
+ if (ret != 0) {
|
||||
+ fprintf(stderr, "Module EEPROM information read error: %s\n",
|
||||
+ strerror(-ret));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ eeprom_info.offset = 0;
|
||||
+ eeprom_info.length = module_info.eeprom_len;
|
||||
+ eeprom_info.data = bytes_eeprom;
|
||||
+
|
||||
+ ret = rte_eth_dev_get_module_eeprom(i, &eeprom_info);
|
||||
+ if (ret != 0) {
|
||||
+ fprintf(stderr, "Module EEPROM read error: %s\n",
|
||||
+ strerror(-ret));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ rte_hexdump(stdout, "hexdump", eeprom_info.data,
|
||||
+ eeprom_info.length);
|
||||
+ printf("Finish -- Port: %u MODULE EEPROM length: %d bytes\n",
|
||||
+ i, eeprom_info.length);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
@@ -1698,6 +1748,8 @@ main(int argc, char **argv)
|
||||
show_firmware_version();
|
||||
if (enable_shw_rss_reta)
|
||||
show_port_rss_reta_info();
|
||||
+ if (enable_shw_module_eeprom)
|
||||
+ show_module_eeprom_info();
|
||||
|
||||
RTE_ETH_FOREACH_DEV(i)
|
||||
rte_eth_dev_close(i);
|
||||
diff --git a/doc/guides/tools/proc_info.rst b/doc/guides/tools/proc_info.rst
|
||||
index 7c8d115fdf..dc5d017cff 100644
|
||||
--- a/doc/guides/tools/proc_info.rst
|
||||
+++ b/doc/guides/tools/proc_info.rst
|
||||
@@ -20,7 +20,8 @@ The application has a number of command line options:
|
||||
./<build_dir>/app/dpdk-proc-info -- -m | [-p PORTMASK] [--stats | --xstats |
|
||||
--stats-reset | --xstats-reset] [ --show-port | --show-tm | --show-crypto |
|
||||
--show-ring[=name] | --show-mempool[=name] | --iter-mempool=name |
|
||||
- --show-port-private | --version | --firmware-version | --show-rss-reta ]
|
||||
+ --show-port-private | --version | --firmware-version | --show-rss-reta |
|
||||
+ --show-module-eeprom ]
|
||||
|
||||
Parameters
|
||||
~~~~~~~~~~
|
||||
@@ -82,6 +83,9 @@ The firmware-version parameter displays ethdev firmware version.
|
||||
**--show-rss-reta**
|
||||
The show-rss-reta parameter displays ports rss redirection table.
|
||||
|
||||
+**--show-module-eeprom**
|
||||
+The show-module-eeprom parameter displays ports module eeprom information.
|
||||
+
|
||||
Limitations
|
||||
-----------
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
76
0212-app-procinfo-add-burst-mode-to-Rx-Tx-queue-info.patch
Normal file
76
0212-app-procinfo-add-burst-mode-to-Rx-Tx-queue-info.patch
Normal file
@ -0,0 +1,76 @@
|
||||
From cf883e9e107e5f646ab8cb41c50e0cd0ab41b3ce Mon Sep 17 00:00:00 2001
|
||||
From: Jie Hai <haijie1@huawei.com>
|
||||
Date: Tue, 11 Oct 2022 19:18:40 +0800
|
||||
Subject: app/procinfo: add burst mode to Rx/Tx queue info
|
||||
|
||||
[ upstream commit a6d81dc0326aae58ea377fc1dc3d62f6bad4ad94 ]
|
||||
|
||||
Add dump of Rx/Tx burst mode in --show-port.
|
||||
|
||||
Sample output changes:
|
||||
- rx queue
|
||||
- -- 0 descriptors 0/1024 drop_en rx buffer size 2048 \
|
||||
mempool mb_pool_0 socket 0
|
||||
+ -- 0 descriptors 0/1024 drop_en rx buffer size 2048 \
|
||||
mempool mb_pool_0 socket 0 burst mode : Vector Neon
|
||||
- tx queue
|
||||
- -- 0 descriptors 1024 thresh 32/928 \
|
||||
offloads : MBUF_FAST_FREE
|
||||
+ -- 0 descriptors 1024 thresh 32/928 \
|
||||
offloads : MBUF_FAST_FREE burst mode : Scalar
|
||||
|
||||
Signed-off-by: Jie Hai <haijie1@huawei.com>
|
||||
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
|
||||
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
|
||||
---
|
||||
app/proc-info/main.c | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/app/proc-info/main.c b/app/proc-info/main.c
|
||||
index 2d12644543..dc948c7cc5 100644
|
||||
--- a/app/proc-info/main.c
|
||||
+++ b/app/proc-info/main.c
|
||||
@@ -845,6 +845,7 @@ show_port(void)
|
||||
|
||||
for (j = 0; j < dev_info.nb_rx_queues; j++) {
|
||||
struct rte_eth_rxq_info queue_info;
|
||||
+ struct rte_eth_burst_mode mode;
|
||||
int count;
|
||||
|
||||
ret = rte_eth_rx_queue_info_get(i, j, &queue_info);
|
||||
@@ -880,11 +881,18 @@ show_port(void)
|
||||
if (queue_info.conf.offloads != 0)
|
||||
show_offloads(queue_info.conf.offloads, rte_eth_dev_rx_offload_name);
|
||||
|
||||
+ if (rte_eth_rx_burst_mode_get(i, j, &mode) == 0)
|
||||
+ printf(" burst mode : %s%s",
|
||||
+ mode.info,
|
||||
+ mode.flags & RTE_ETH_BURST_FLAG_PER_QUEUE ?
|
||||
+ " (per queue)" : "");
|
||||
+
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
for (j = 0; j < dev_info.nb_tx_queues; j++) {
|
||||
struct rte_eth_txq_info queue_info;
|
||||
+ struct rte_eth_burst_mode mode;
|
||||
|
||||
ret = rte_eth_tx_queue_info_get(i, j, &queue_info);
|
||||
if (ret != 0)
|
||||
@@ -905,6 +913,13 @@ show_port(void)
|
||||
|
||||
if (queue_info.conf.offloads != 0)
|
||||
show_offloads(queue_info.conf.offloads, rte_eth_dev_tx_offload_name);
|
||||
+
|
||||
+ if (rte_eth_tx_burst_mode_get(i, j, &mode) == 0)
|
||||
+ printf(" burst mode : %s%s",
|
||||
+ mode.info,
|
||||
+ mode.flags & RTE_ETH_BURST_FLAG_PER_QUEUE ?
|
||||
+ " (per queue)" : "");
|
||||
+
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
223
0213-app-procinfo-dump-detailed-info-for-Rx-Tx-descriptor.patch
Normal file
223
0213-app-procinfo-dump-detailed-info-for-Rx-Tx-descriptor.patch
Normal file
@ -0,0 +1,223 @@
|
||||
From 95af4fb4b6c89c9488637920c497849b9ffb1bc6 Mon Sep 17 00:00:00 2001
|
||||
From: Dongdong Liu <liudongdong3@huawei.com>
|
||||
Date: Tue, 11 Oct 2022 19:18:42 +0800
|
||||
Subject: app/procinfo: dump detailed info for Rx/Tx descriptors
|
||||
|
||||
[ upstream commit 6ff065b221b1048e27a0c9a9438d0f11e6fae06d ]
|
||||
|
||||
This patch support Rx/Tx descriptor dump
|
||||
|
||||
The command is like:
|
||||
dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=xxx --
|
||||
--show-rx-descriptor queue_id:offset:num
|
||||
|
||||
dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=xxx --
|
||||
--show-tx-descriptor queue_id:offset:num
|
||||
|
||||
queue_id: A queue identifier on this port.
|
||||
offset: The offset of the descriptor starting from tail.
|
||||
num: The number of the descriptors to dump.
|
||||
|
||||
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
|
||||
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
|
||||
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
|
||||
---
|
||||
app/proc-info/main.c | 104 +++++++++++++++++++++++++++++++++
|
||||
doc/guides/tools/proc_info.rst | 17 +++++-
|
||||
2 files changed, 120 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/app/proc-info/main.c b/app/proc-info/main.c
|
||||
index dc948c7cc5..0cc01e3dad 100644
|
||||
--- a/app/proc-info/main.c
|
||||
+++ b/app/proc-info/main.c
|
||||
@@ -117,6 +117,21 @@ static uint32_t enable_shw_rss_reta;
|
||||
/* Enable show module eeprom information. */
|
||||
static uint32_t enable_shw_module_eeprom;
|
||||
|
||||
+/* Enable dump Rx/Tx descriptor. */
|
||||
+static uint32_t enable_shw_rx_desc_dump;
|
||||
+static uint32_t enable_shw_tx_desc_dump;
|
||||
+
|
||||
+#define DESC_PARAM_NUM 3
|
||||
+
|
||||
+struct desc_param {
|
||||
+ uint16_t queue_id; /* A queue identifier on this port. */
|
||||
+ uint16_t offset; /* The offset of the descriptor starting from tail. */
|
||||
+ uint16_t num; /* The number of the descriptors to dump. */
|
||||
+};
|
||||
+
|
||||
+static struct desc_param rx_desc_param;
|
||||
+static struct desc_param tx_desc_param;
|
||||
+
|
||||
/* display usage */
|
||||
static void
|
||||
proc_info_usage(const char *prgname)
|
||||
@@ -148,6 +163,14 @@ proc_info_usage(const char *prgname)
|
||||
" --firmware-version: to display ethdev firmware version\n"
|
||||
" --show-rss-reta: to display ports redirection table\n"
|
||||
" --show-module-eeprom: to display ports module eeprom information\n"
|
||||
+ " --show-rx-descriptor queue_id:offset:num to display ports Rx descriptor information. "
|
||||
+ "queue_id: A Rx queue identifier on this port. "
|
||||
+ "offset: The offset of the descriptor starting from tail. "
|
||||
+ "num: The number of the descriptors to dump.\n"
|
||||
+ " --show-tx-descriptor queue_id:offset:num to display ports Tx descriptor information. "
|
||||
+ "queue_id: A Tx queue identifier on this port. "
|
||||
+ "offset: The offset of the descriptor starting from tail. "
|
||||
+ "num: The number of the descriptors to dump.\n"
|
||||
" --iter-mempool=name: iterate mempool elements to display content\n"
|
||||
" --dump-regs=file-prefix: dump registers to file with the file-prefix\n",
|
||||
prgname);
|
||||
@@ -200,6 +223,19 @@ parse_xstats_ids(char *list, uint64_t *ids, int limit) {
|
||||
return length;
|
||||
}
|
||||
|
||||
+static int
|
||||
+parse_descriptor_param(char *list, struct desc_param *desc)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = sscanf(list, "%hu:%hu:%hu", &desc->queue_id, &desc->offset,
|
||||
+ &desc->num);
|
||||
+ if (ret != DESC_PARAM_NUM)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int
|
||||
proc_info_preparse_args(int argc, char **argv)
|
||||
{
|
||||
@@ -264,6 +300,8 @@ proc_info_parse_args(int argc, char **argv)
|
||||
{"firmware-version", 0, NULL, 0},
|
||||
{"show-rss-reta", 0, NULL, 0},
|
||||
{"show-module-eeprom", 0, NULL, 0},
|
||||
+ {"show-rx-descriptor", required_argument, NULL, 1},
|
||||
+ {"show-tx-descriptor", required_argument, NULL, 1},
|
||||
{NULL, 0, 0, 0}
|
||||
};
|
||||
|
||||
@@ -367,6 +405,26 @@ proc_info_parse_args(int argc, char **argv)
|
||||
return -1;
|
||||
}
|
||||
nb_xstats_ids = ret;
|
||||
+ } else if (!strncmp(long_option[option_index].name,
|
||||
+ "show-rx-descriptor", MAX_LONG_OPT_SZ)) {
|
||||
+ int ret = parse_descriptor_param(optarg,
|
||||
+ &rx_desc_param);
|
||||
+ if (ret < 0) {
|
||||
+ fprintf(stderr, "Error parsing Rx descriptor param: %s\n",
|
||||
+ strerror(-ret));
|
||||
+ return -1;
|
||||
+ }
|
||||
+ enable_shw_rx_desc_dump = 1;
|
||||
+ } else if (!strncmp(long_option[option_index].name,
|
||||
+ "show-tx-descriptor", MAX_LONG_OPT_SZ)) {
|
||||
+ int ret = parse_descriptor_param(optarg,
|
||||
+ &tx_desc_param);
|
||||
+ if (ret < 0) {
|
||||
+ fprintf(stderr, "Error parsing Tx descriptor param: %s\n",
|
||||
+ strerror(-ret));
|
||||
+ return -1;
|
||||
+ }
|
||||
+ enable_shw_tx_desc_dump = 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -1644,6 +1702,48 @@ show_module_eeprom_info(void)
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+nic_rx_descriptor_display(uint16_t port_id, struct desc_param *desc)
|
||||
+{
|
||||
+ uint16_t queue_id = desc->queue_id;
|
||||
+ uint16_t offset = desc->offset;
|
||||
+ uint16_t num = desc->num;
|
||||
+ int ret;
|
||||
+
|
||||
+ snprintf(bdr_str, MAX_STRING_LEN, " show - Rx descriptor ");
|
||||
+ STATS_BDR_STR(10, bdr_str);
|
||||
+
|
||||
+ printf("Dump ethdev Rx descriptor for port %u, queue %u, offset %u, num %u\n",
|
||||
+ port_id, queue_id, offset, num);
|
||||
+
|
||||
+ ret = rte_eth_rx_descriptor_dump(port_id, queue_id, offset, num,
|
||||
+ stdout);
|
||||
+ if (ret < 0)
|
||||
+ fprintf(stderr, "Error dumping ethdev Rx descriptor: %s\n",
|
||||
+ strerror(-ret));
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+nic_tx_descriptor_display(uint16_t port_id, struct desc_param *desc)
|
||||
+{
|
||||
+ uint16_t queue_id = desc->queue_id;
|
||||
+ uint16_t offset = desc->offset;
|
||||
+ uint16_t num = desc->num;
|
||||
+ int ret;
|
||||
+
|
||||
+ snprintf(bdr_str, MAX_STRING_LEN, " show - Tx descriptor ");
|
||||
+ STATS_BDR_STR(10, bdr_str);
|
||||
+
|
||||
+ printf("Dump ethdev Tx descriptor for port %u, queue %u, offset %u, num %u\n",
|
||||
+ port_id, queue_id, offset, num);
|
||||
+
|
||||
+ ret = rte_eth_tx_descriptor_dump(port_id, queue_id, offset, num,
|
||||
+ stdout);
|
||||
+ if (ret < 0)
|
||||
+ fprintf(stderr, "Error dumping ethdev Tx descriptor: %s\n",
|
||||
+ strerror(-ret));
|
||||
+}
|
||||
+
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
@@ -1732,6 +1832,10 @@ main(int argc, char **argv)
|
||||
metrics_display(i);
|
||||
#endif
|
||||
|
||||
+ if (enable_shw_rx_desc_dump)
|
||||
+ nic_rx_descriptor_display(i, &rx_desc_param);
|
||||
+ if (enable_shw_tx_desc_dump)
|
||||
+ nic_tx_descriptor_display(i, &tx_desc_param);
|
||||
}
|
||||
|
||||
#ifdef RTE_LIB_METRICS
|
||||
diff --git a/doc/guides/tools/proc_info.rst b/doc/guides/tools/proc_info.rst
|
||||
index dc5d017cff..cf3502a8cb 100644
|
||||
--- a/doc/guides/tools/proc_info.rst
|
||||
+++ b/doc/guides/tools/proc_info.rst
|
||||
@@ -21,7 +21,8 @@ The application has a number of command line options:
|
||||
--stats-reset | --xstats-reset] [ --show-port | --show-tm | --show-crypto |
|
||||
--show-ring[=name] | --show-mempool[=name] | --iter-mempool=name |
|
||||
--show-port-private | --version | --firmware-version | --show-rss-reta |
|
||||
- --show-module-eeprom ]
|
||||
+ --show-module-eeprom | --show-rx-descriptor queue_id:offset:num |
|
||||
+ --show-tx-descriptor queue_id:offset:num ]
|
||||
|
||||
Parameters
|
||||
~~~~~~~~~~
|
||||
@@ -86,6 +87,20 @@ The show-rss-reta parameter displays ports rss redirection table.
|
||||
**--show-module-eeprom**
|
||||
The show-module-eeprom parameter displays ports module eeprom information.
|
||||
|
||||
+**--show-rx-descriptor queue_id:offset:num**
|
||||
+The show-rx-descriptor parameter displays ports Rx descriptor information
|
||||
+specified by queue_id, offset and num.
|
||||
+queue_id: A Rx queue identifier on this port.
|
||||
+offset: The offset of the descriptor starting from tail.
|
||||
+num: The number of the descriptors to dump.
|
||||
+
|
||||
+**--show-tx-descriptor queue_id:offset:num**
|
||||
+The show-tx-descriptor parameter displays ports Tx descriptor information
|
||||
+specified by queue_id, offset and num.
|
||||
+queue_id: A Tx queue identifier on this port.
|
||||
+offset: The offset of the descriptor starting from tail.
|
||||
+num: The number of the descriptors to dump.
|
||||
+
|
||||
Limitations
|
||||
-----------
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
20
dpdk.spec
20
dpdk.spec
@ -1,6 +1,6 @@
|
||||
Name: dpdk
|
||||
Version: 21.11
|
||||
Release: 25
|
||||
Release: 26
|
||||
Packager: packaging@6wind.com
|
||||
URL: http://dpdk.org
|
||||
%global source_version 21.11
|
||||
@ -222,6 +222,15 @@ Patch9201: 0201-net-add-UDP-TCP-checksum-in-mbuf-segments.patch
|
||||
Patch9202: 0202-app-testpmd-add-SW-L4-checksum-in-multi-segments.patch
|
||||
Patch9203: 0203-app-testpmd-fix-L4-checksum-in-multi-segments.patch
|
||||
Patch9204: 0204-net-bonding-fix-mbuf-fast-free-handling.patch
|
||||
Patch9205: 0205-doc-fix-application-name-in-procinfo-guide.patch
|
||||
Patch9206: 0206-doc-document-device-dump-in-procinfo-guide.patch
|
||||
Patch9207: 0207-app-procinfo-remove-doxygen-comments.patch
|
||||
Patch9208: 0208-app-procinfo-dump-DPDK-version.patch
|
||||
Patch9209: 0209-app-procinfo-dump-firmware-version.patch
|
||||
Patch9210: 0210-app-procinfo-dump-RSS-RETA.patch
|
||||
Patch9211: 0211-app-procinfo-dump-module-EEPROM-info.patch
|
||||
Patch9212: 0212-app-procinfo-add-burst-mode-to-Rx-Tx-queue-info.patch
|
||||
Patch9213: 0213-app-procinfo-dump-detailed-info-for-Rx-Tx-descriptor.patch
|
||||
|
||||
Summary: Data Plane Development Kit core
|
||||
Group: System Environment/Libraries
|
||||
@ -364,6 +373,15 @@ strip -g $RPM_BUILD_ROOT/lib/modules/%{kern_devel_ver}/extra/dpdk/igb_uio.ko
|
||||
/usr/sbin/depmod
|
||||
|
||||
%changelog
|
||||
* Wed Nov 16 2022 chenjiji <chenjiji09@163.com> - 21.11-26
|
||||
proc-info adds dumping the following features:
|
||||
- dpdk version
|
||||
- firmware version
|
||||
- RSS RETA
|
||||
- module eeprom information
|
||||
- Rx/Tx burst mode
|
||||
- Rx/Tx descriptor
|
||||
|
||||
* Wed Nov 16 2022 chenjiji <chenjiji09@163.com> - 21.11-25
|
||||
Sync some patches for bonding PMD and testpmd. And patchs
|
||||
are as follows:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user