From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id B1E97A05D3 for ; Mon, 25 Mar 2019 09:52:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2A6592C60; Mon, 25 Mar 2019 09:52:01 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 82E9F2B9A for ; Mon, 25 Mar 2019 09:51:59 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B51E63082291; Mon, 25 Mar 2019 08:51:58 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-204-129.brq.redhat.com [10.40.204.129]) by smtp.corp.redhat.com (Postfix) with ESMTP id 735371001DE4; Mon, 25 Mar 2019 08:51:53 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: wenzhuo.lu@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com, ramirose@gmail.com, arybchenko@solarflare.com, maxime.coquelin@redhat.com, ferruh.yigit@intel.com Date: Mon, 25 Mar 2019 09:51:42 +0100 Message-Id: <1553503906-1508-1-git-send-email-david.marchand@redhat.com> In-Reply-To: <1553261824-1881-1-git-send-email-david.marchand@redhat.com> References: <1553261824-1881-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 25 Mar 2019 08:51:58 +0000 (UTC) Subject: [dpdk-dev] [PATCH v5 0/4] display testpmd forwarding engine stats on the fly X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190325085142.773EeP9LQD5ARYj35ELwDR3aulKRyQw73fMZTZcwcik@z> Here is a little series that makes it possible to display and clear testpmd fwd engines while they run without having to stop them. This is mostly handy when running stress tests and you look for packets drops without having to stop/start testpmd forwarding. Example: testpmd> show fwd stats all ------- Forward Stats for RX Port= 0/Queue= 0 -> TX Port= 1/Queue= 0 ------- RX-packets: 261977064 TX-packets: 261977064 TX-dropped: 0 ------- Forward Stats for RX Port= 1/Queue= 0 -> TX Port= 0/Queue= 0 ------- RX-packets: 261985142 TX-packets: 261985142 TX-dropped: 0 ---------------------- Forward statistics for port 0 ---------------------- RX-packets: 261977096 RX-dropped: 0 RX-total: 261977096 TX-packets: 261985155 TX-dropped: 0 TX-total: 261985155 ---------------------------------------------------------------------------- ---------------------- Forward statistics for port 1 ---------------------- RX-packets: 261985188 RX-dropped: 0 RX-total: 261985188 TX-packets: 261977128 TX-dropped: 0 TX-total: 261977128 ---------------------------------------------------------------------------- +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++ RX-packets: 523962284 RX-dropped: 0 RX-total: 523962284 TX-packets: 523962283 TX-dropped: 0 TX-total: 523962283 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ testpmd> show fwd stats all ------- Forward Stats for RX Port= 0/Queue= 0 -> TX Port= 1/Queue= 0 ------- RX-packets: 274293770 TX-packets: 274293642 TX-dropped: 128 ------- Forward Stats for RX Port= 1/Queue= 0 -> TX Port= 0/Queue= 0 ------- RX-packets: 274301850 TX-packets: 274301850 TX-dropped: 0 ---------------------- Forward statistics for port 0 ---------------------- RX-packets: 274293802 RX-dropped: 0 RX-total: 274293802 TX-packets: 274301862 TX-dropped: 0 TX-total: 274301862 ---------------------------------------------------------------------------- ---------------------- Forward statistics for port 1 ---------------------- RX-packets: 274301894 RX-dropped: 0 RX-total: 274301894 TX-packets: 274293706 TX-dropped: 128 TX-total: 274293834 ---------------------------------------------------------------------------- +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++ RX-packets: 548595696 RX-dropped: 0 RX-total: 548595696 TX-packets: 548595568 TX-dropped: 128 TX-total: 548595696 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- David Marchand --- Changelog since v4: - take csum engine output into account in patch 1 (Andrew comment) Changelog since v3: - updated patch 4 following Ferruh comments Changelog since v2: - first patch has been merged in net-next, removed from the series - split patch (numbered 3 in v2) in two following Andrew comment Changelog since v1: - Cc: stable for patch 1 - removed buggy patch 3 --- David Marchand (4): app/testpmd: add missing newline when showing statistics app/testpmd: extend fwd statistics to 64bits app/testpmd: remove useless casts on statistics app/testpmd: display/clear forwarding stats on demand app/test-pmd/cmdline.c | 49 +++ app/test-pmd/testpmd.c | 452 ++++++++++++++-------------- app/test-pmd/testpmd.h | 21 +- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 36 +++ 4 files changed, 322 insertions(+), 236 deletions(-) -- 1.8.3.1