diff mbox series

[ovs-dev,v4,1/2] dpdk: Add ovs-appctl dpdk/get-memzone-stats command.

Message ID 20250121104139.1408789-1-roid@nvidia.com
State Accepted
Commit ae8dafe6b047733129a91a475eff3a5dcd5536d6
Delegated to: Eelco Chaudron
Headers show
Series [ovs-dev,v4,1/2] dpdk: Add ovs-appctl dpdk/get-memzone-stats command. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed

Commit Message

Roi Dayan Jan. 21, 2025, 10:41 a.m. UTC
From: Eli Britstein <elibr@nvidia.com>

New appctl 'dpdk/get-memzone-stats' implemented to get result of
'rte_memzone_dump()' function.

Could be used for debugging.

Signed-off-by: Eli Britstein <elibr@nvidia.com>
Acked-by: Roi Dayan <roid@nvidia.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
---

Notes:
    v2
    - Add info to NEWS and dpdk-unixctl.man.
    - Remove redundant wrapper.

 NEWS                 | 1 +
 lib/dpdk-unixctl.man | 2 ++
 lib/dpdk.c           | 2 ++
 3 files changed, 5 insertions(+)

Comments

Simon Horman Jan. 22, 2025, 1:56 p.m. UTC | #1
On Tue, Jan 21, 2025 at 12:41:38PM +0200, Roi Dayan via dev wrote:
> From: Eli Britstein <elibr@nvidia.com>
> 
> New appctl 'dpdk/get-memzone-stats' implemented to get result of
> 'rte_memzone_dump()' function.
> 
> Could be used for debugging.
> 
> Signed-off-by: Eli Britstein <elibr@nvidia.com>
> Acked-by: Roi Dayan <roid@nvidia.com>
> Acked-by: Eelco Chaudron <echaudro@redhat.com>

Acked-by: Simon Horman <horms@ovn.org>
Eelco Chaudron Jan. 23, 2025, 4:05 p.m. UTC | #2
On 21 Jan 2025, at 11:41, Roi Dayan wrote:

> From: Eli Britstein <elibr@nvidia.com>
>
> New appctl 'dpdk/get-memzone-stats' implemented to get result of
> 'rte_memzone_dump()' function.
>
> Could be used for debugging.
>
> Signed-off-by: Eli Britstein <elibr@nvidia.com>
> Acked-by: Roi Dayan <roid@nvidia.com>
> Acked-by: Eelco Chaudron <echaudro@redhat.com>

Applied to main after fixing the NEWS section (moving the news item to the correct release).

Thanks,

Eelco
diff mbox series

Patch

diff --git a/NEWS b/NEWS
index d59692d8b305..067282727e2d 100644
--- a/NEWS
+++ b/NEWS
@@ -43,6 +43,7 @@  Post-v3.4.0
      * Add support for DPDK 24.11.1.
      * Add hardware offload support for matching ICMPv6 protocol
        (experimental).
+     * New debug appctl command 'dpdk/get-memzone-stats'.
    - Tunnels:
      * LISP and STT tunnel port types are deprecated and will be removed in
        the next release.
diff --git a/lib/dpdk-unixctl.man b/lib/dpdk-unixctl.man
index 5bac80638940..bc2a1a675db2 100644
--- a/lib/dpdk-unixctl.man
+++ b/lib/dpdk-unixctl.man
@@ -15,5 +15,7 @@  components (see \fBdpdk/log-list\fR command on \fBovs\-appctl\fR(8)) separated
 by a colon from the logging \fBlevel\fR to apply.
 .IP "\fBdpdk/get-malloc-stats\fR"
 Prints the heap information statistics about DPDK malloc.
+.IP "\fBdpdk/get-memzone-stats\fR"
+Prints the reserved memory zones from DPDK.
 .RE
 .
diff --git a/lib/dpdk.c b/lib/dpdk.c
index b7516257c5e4..2d22e2b8dd07 100644
--- a/lib/dpdk.c
+++ b/lib/dpdk.c
@@ -437,6 +437,8 @@  dpdk_init__(const struct smap *ovs_other_config)
     unixctl_command_register("dpdk/get-malloc-stats", "", 0, 0,
                              dpdk_unixctl_mem_stream,
                              malloc_dump_stats_wrapper);
+    unixctl_command_register("dpdk/get-memzone-stats", "", 0, 0,
+                             dpdk_unixctl_mem_stream, rte_memzone_dump);
 
     /* We are called from the main thread here */
     RTE_PER_LCORE(_lcore_id) = NON_PMD_CORE_ID;