From patchwork Fri Jul 23 13:15:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Rybchenko X-Patchwork-Id: 96247 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F40F1A0C46; Fri, 23 Jul 2021 15:15:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7DCD140040; Fri, 23 Jul 2021 15:15:27 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 922C74003C for ; Fri, 23 Jul 2021 15:15:26 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 122) id 4158E7F523; Fri, 23 Jul 2021 16:15:26 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shelob.oktetlabs.ru X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_DISCARD, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from aros.oktetlabs.ru (aros.oktetlabs.ru [192.168.38.17]) by shelob.oktetlabs.ru (Postfix) with ESMTP id 7B19B7F523; Fri, 23 Jul 2021 16:15:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 7B19B7F523 Authentication-Results: shelob.oktetlabs.ru/7B19B7F523; dkim=none; dkim-atps=neutral From: Andrew Rybchenko To: dev@dpdk.org Cc: David Marchand Date: Fri, 23 Jul 2021 16:15:04 +0300 Message-Id: <20210723131515.2317168-1-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210604144225.287678-1-andrew.rybchenko@oktetlabs.ru> References: <20210604144225.287678-1-andrew.rybchenko@oktetlabs.ru> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v3 00/11] net/sfc: provide Rx/Tx doorbells stats X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Rx/Tx doorbells stats are essential for performance investigation. On the way fix ethdev documenation to refine requirements on driver callback. It allows to make these callbacks a bit simpler. Add testpmd option to show specified xstats periodically or upon request, for example: * --display-xstats rx_good_packets,tx_good_packets --stats-period 1 Port statistics ==================================== ######################## NIC statistics for port 0 ######################## RX-packets: 14102808 RX-missed: 0 RX-bytes: 7164239264 RX-errors: 0 RX-nombuf: 0 TX-packets: 14102789 TX-errors: 0 TX-bytes: 7164226028 Throughput (since last show) Rx-pps: 2349577 Rx-bps: 9548682392 Tx-pps: 2349576 Tx-bps: 9548682408 Value Rate (since last show) rx_good_packets 14103280 2349575 tx_good_packets 14103626 2349573 ############################################################################ * -i --display-xstats tx_good_packets,vadapter_rx_overflow testpmd> port start 0 ... No xstat 'vadapter_rx_overflow' on port 0 - skip it ... testpmd> start tx_first testpmd> show port stats all Value Rate (since last show) tx_good_packets 132545336 1420439 v3: - testpmd: avoid duplicatin xstats resolution - testpmd: remove debug printout - testpmd: add missing const qualifier v2: - address Ferruh review notes on ethdev patches Ivan Ilchenko (11): net/sfc: fix get xstats by ID callback to use MAC stats lock net/sfc: fix reading adapter state without locking ethdev: fix docs of functions getting xstats by IDs ethdev: fix docs of drivers callbacks getting xstats by IDs net/sfc: fix xstats by ID callbacks according to ethdev net/sfc: fix accessing xstats by an unsorted list of IDs net/sfc: fix MAC stats update to work for stopped device net/sfc: simplify getting of available xstats case net/sfc: prepare to add more xstats net/sfc: add xstats for Rx/Tx doorbells app/testpmd: add option to display extended statistics app/test-pmd/cmdline.c | 55 +++ app/test-pmd/config.c | 66 +++ app/test-pmd/parameters.c | 18 + app/test-pmd/testpmd.c | 120 ++++++ app/test-pmd/testpmd.h | 21 + doc/guides/testpmd_app_ug/run_app.rst | 5 + drivers/net/sfc/meson.build | 1 + drivers/net/sfc/sfc.c | 16 + drivers/net/sfc/sfc.h | 18 +- drivers/net/sfc/sfc_dp.h | 10 + drivers/net/sfc/sfc_ef10.h | 3 +- drivers/net/sfc/sfc_ef100_rx.c | 1 + drivers/net/sfc/sfc_ef100_tx.c | 1 + drivers/net/sfc/sfc_ef10_essb_rx.c | 3 +- drivers/net/sfc/sfc_ef10_rx.c | 3 +- drivers/net/sfc/sfc_ef10_tx.c | 1 + drivers/net/sfc/sfc_ethdev.c | 185 +++++---- drivers/net/sfc/sfc_port.c | 127 +++++- drivers/net/sfc/sfc_rx.c | 1 + drivers/net/sfc/sfc_sw_stats.c | 572 ++++++++++++++++++++++++++ drivers/net/sfc/sfc_sw_stats.h | 49 +++ drivers/net/sfc/sfc_tx.c | 4 +- lib/ethdev/ethdev_driver.h | 43 +- lib/ethdev/rte_ethdev.h | 23 +- 24 files changed, 1240 insertions(+), 106 deletions(-) create mode 100644 drivers/net/sfc/sfc_sw_stats.c create mode 100644 drivers/net/sfc/sfc_sw_stats.h