From patchwork Sat Oct 17 00:14:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 7719 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id EB40691A0; Sat, 17 Oct 2015 02:14:45 +0200 (CEST) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by dpdk.org (Postfix) with ESMTP id 8655B8E87 for ; Sat, 17 Oct 2015 02:14:37 +0200 (CEST) Received: by pabws5 with SMTP id ws5so3643360pab.1 for ; Fri, 16 Oct 2015 17:14:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pD7/yC/ni+k5ZF61RJC1NjoJgpqAQyl/oqGE/8cP63c=; b=QA62w5cwC6VD5xt2DVInJWQUNpjqq1GI6qZBB2KAiTyZTGIBCAcwgnbd5A6YMFZ5HB zP5oXRsUKtH69JXh9JJa77VgeGG8vrpFeHt68Rac1bRsAr4Rgj5LkNip+DU4oGFPOewB H7dK5T6bkc1o9skkF8kqDgdg14YrKelZ4oOsIRoT5XjTOxcu9tEF7JMQrmZZ2udVsYZU 9df7kfUa4Sbk7LxmqpjR568gR/6w3/MsiobiCYyIHUhVncEap3EVsUUizqZhveU7dYd0 dbQdSZHd3CrQRgNAHzvY1F3DldHZdGDa45X1K9sxNj8QcBUDEeKbt4YaZbnIUXNBjIlH 4S9A== X-Gm-Message-State: ALoCoQn7M+8ZdmjyfWOY87CmQI+LzTDJH9cszHJnj28VZmlIanCXonfmYpYc/cUl8s9nzgxiOn1w X-Received: by 10.68.223.34 with SMTP id qr2mr19740891pbc.97.1445040876972; Fri, 16 Oct 2015 17:14:36 -0700 (PDT) Received: from xeon-e3.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id qy7sm23431097pab.37.2015.10.16.17.14.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Oct 2015 17:14:36 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Date: Fri, 16 Oct 2015 17:14:41 -0700 Message-Id: <1445040882-31006-9-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1445040882-31006-1-git-send-email-stephen@networkplumber.org> References: <1445040882-31006-1-git-send-email-stephen@networkplumber.org> Cc: Stephen Hemminger Subject: [dpdk-dev] [PATCH 8/9] test-pmd: don't check deprecated ethernet statistics X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Stephen Hemminger Several fields in ether stats are marked deprecated, just ignore them. Signed-off-by: Stephen Hemminger --- app/test-pmd/config.c | 30 +++++------------------------ app/test-pmd/testpmd.c | 50 +++++++++--------------------------------------- app/test/test_pmd_perf.c | 12 ++++-------- 3 files changed, 18 insertions(+), 74 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index cf2aa6e..b3d974c 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -127,14 +127,10 @@ nic_stats_display(portid_t port_id) nic_stats_border, port_id, nic_stats_border); if ((!port->rx_queue_stats_mapping_enabled) && (!port->tx_queue_stats_mapping_enabled)) { - printf(" RX-packets: %-10"PRIu64" RX-missed: %-10"PRIu64" RX-bytes: " - "%-"PRIu64"\n", - stats.ipackets, stats.imissed, stats.ibytes); - printf(" RX-badcrc: %-10"PRIu64" RX-badlen: %-10"PRIu64" RX-errors: " - "%-"PRIu64"\n", - stats.ibadcrc, stats.ibadlen, stats.ierrors); - printf(" RX-nombuf: %-10"PRIu64"\n", - stats.rx_nombuf); + printf(" RX-packets: %-10"PRIu64" RX-bytes: %-"PRIu64"\n", + stats.ipackets, stats.ibytes); + printf(" RX-errors: %-10"PRIu64" RX-nombuf: %-10"PRIu64"\n", + stats.ierrors, stats.rx_nombuf); printf(" TX-packets: %-10"PRIu64" TX-errors: %-10"PRIu64" TX-bytes: " "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes); @@ -143,9 +139,7 @@ nic_stats_display(portid_t port_id) printf(" RX-packets: %10"PRIu64" RX-errors: %10"PRIu64 " RX-bytes: %10"PRIu64"\n", stats.ipackets, stats.ierrors, stats.ibytes); - printf(" RX-badcrc: %10"PRIu64" RX-badlen: %10"PRIu64 - " RX-errors: %10"PRIu64"\n", - stats.ibadcrc, stats.ibadlen, stats.ierrors); + printf(" RX-errors: %10"PRIu64"\n", stats.ierrors); printf(" RX-nombuf: %10"PRIu64"\n", stats.rx_nombuf); printf(" TX-packets: %10"PRIu64" TX-errors: %10"PRIu64 @@ -153,12 +147,6 @@ nic_stats_display(portid_t port_id) stats.opackets, stats.oerrors, stats.obytes); } - /* stats fdir */ - if (fdir_conf.mode != RTE_FDIR_MODE_NONE) - printf(" Fdirmiss: %-10"PRIu64" Fdirmatch: %-10"PRIu64"\n", - stats.fdirmiss, - stats.fdirmatch); - if (port->rx_queue_stats_mapping_enabled) { printf("\n"); for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS; i++) { @@ -177,14 +165,6 @@ nic_stats_display(portid_t port_id) } } - /* Display statistics of XON/XOFF pause frames, if any. */ - if ((stats.tx_pause_xon | stats.rx_pause_xon | - stats.tx_pause_xoff | stats.rx_pause_xoff) > 0) { - printf(" RX-XOFF: %-10"PRIu64" RX-XON: %-10"PRIu64"\n", - stats.rx_pause_xoff, stats.rx_pause_xon); - printf(" TX-XOFF: %-10"PRIu64" TX-XON: %-10"PRIu64"\n", - stats.tx_pause_xoff, stats.tx_pause_xon); - } printf(" %s############################%s\n", nic_stats_border, nic_stats_border); } diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 386bf84..26f9352 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -733,19 +733,14 @@ fwd_port_stats_display(portid_t port_id, struct rte_eth_stats *stats) fwd_stats_border, port_id, fwd_stats_border); if ((!port->rx_queue_stats_mapping_enabled) && (!port->tx_queue_stats_mapping_enabled)) { - printf(" RX-packets: %-14"PRIu64" RX-dropped: %-14"PRIu64"RX-total: " - "%-"PRIu64"\n", - stats->ipackets, stats->imissed, - (uint64_t) (stats->ipackets + stats->imissed)); + printf(" RX-packets: %-14"PRIu64"\n", stats->ipackets); if (cur_fwd_eng == &csum_fwd_engine) printf(" Bad-ipcsum: %-14"PRIu64" Bad-l4csum: %-14"PRIu64" \n", port->rx_bad_ip_csum, port->rx_bad_l4_csum); - if (((stats->ierrors - stats->imissed) + stats->rx_nombuf) > 0) { - printf(" RX-badcrc: %-14"PRIu64" RX-badlen: %-14"PRIu64 - "RX-error: %-"PRIu64"\n", - stats->ibadcrc, stats->ibadlen, stats->ierrors); - printf(" RX-nombufs: %-14"PRIu64"\n", stats->rx_nombuf); + if (stats->ierrors + stats->rx_nombuf > 0) { + printf(" RX-error: %-"PRIu64" RX-nombufs: %-14"PRIu64"\n", + stats->ierrors, stats->rx_nombuf); } printf(" TX-packets: %-14"PRIu64" TX-dropped: %-14"PRIu64"TX-total: " @@ -754,20 +749,15 @@ fwd_port_stats_display(portid_t port_id, struct rte_eth_stats *stats) (uint64_t) (stats->opackets + port->tx_dropped)); } else { - printf(" RX-packets: %14"PRIu64" RX-dropped:%14"PRIu64" RX-total:" - "%14"PRIu64"\n", - stats->ipackets, stats->imissed, - (uint64_t) (stats->ipackets + stats->imissed)); + printf(" RX-packets: %14"PRIu64"\n", + stats->ipackets); if (cur_fwd_eng == &csum_fwd_engine) printf(" Bad-ipcsum:%14"PRIu64" Bad-l4csum:%14"PRIu64"\n", port->rx_bad_ip_csum, port->rx_bad_l4_csum); - if (((stats->ierrors - stats->imissed) + stats->rx_nombuf) > 0) { - printf(" RX-badcrc: %14"PRIu64" RX-badlen: %14"PRIu64 - " RX-error:%"PRIu64"\n", - stats->ibadcrc, stats->ibadlen, stats->ierrors); - printf(" RX-nombufs: %14"PRIu64"\n", - stats->rx_nombuf); + if (stats->ierrors + stats->rx_nombuf > 0) { + printf(" RX-error:%"PRIu64" RX-nombufs: %14"PRIu64"\n", + stats->ierrors, stats->rx_nombuf); } printf(" TX-packets: %14"PRIu64" TX-dropped:%14"PRIu64" TX-total:" @@ -776,15 +766,6 @@ fwd_port_stats_display(portid_t port_id, struct rte_eth_stats *stats) (uint64_t) (stats->opackets + port->tx_dropped)); } - /* Display statistics of XON/XOFF pause frames, if any. */ - if ((stats->tx_pause_xon | stats->rx_pause_xon | - stats->tx_pause_xoff | stats->rx_pause_xoff) > 0) { - printf(" RX-XOFF: %-14"PRIu64" RX-XON: %-14"PRIu64"\n", - stats->rx_pause_xoff, stats->rx_pause_xon); - printf(" TX-XOFF: %-14"PRIu64" TX-XON: %-14"PRIu64"\n", - stats->tx_pause_xoff, stats->tx_pause_xon); - } - #ifdef RTE_TEST_PMD_RECORD_BURST_STATS if (port->rx_stream) pkt_burst_stats_display("RX", @@ -793,12 +774,6 @@ fwd_port_stats_display(portid_t port_id, struct rte_eth_stats *stats) pkt_burst_stats_display("TX", &port->tx_stream->tx_burst_stats); #endif - /* stats fdir */ - if (fdir_conf.mode != RTE_FDIR_MODE_NONE) - printf(" Fdirmiss:%14"PRIu64" Fdirmatch:%14"PRIu64"\n", - stats->fdirmiss, - stats->fdirmatch); - if (port->rx_queue_stats_mapping_enabled) { printf("\n"); for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS; i++) { @@ -1135,20 +1110,13 @@ stop_packet_forwarding(void) port->stats.ibytes = 0; stats.obytes -= port->stats.obytes; port->stats.obytes = 0; - stats.imissed -= port->stats.imissed; - port->stats.imissed = 0; stats.oerrors -= port->stats.oerrors; port->stats.oerrors = 0; stats.rx_nombuf -= port->stats.rx_nombuf; port->stats.rx_nombuf = 0; - stats.fdirmatch -= port->stats.fdirmatch; - port->stats.rx_nombuf = 0; - stats.fdirmiss -= port->stats.fdirmiss; - port->stats.rx_nombuf = 0; total_recv += stats.ipackets; total_xmit += stats.opackets; - total_rx_dropped += stats.imissed; total_tx_dropped += port->tx_dropped; total_rx_nombuf += stats.rx_nombuf; diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c index 1fd6843..9a085bd 100644 --- a/app/test/test_pmd_perf.c +++ b/app/test/test_pmd_perf.c @@ -340,14 +340,10 @@ stats_display(uint8_t port_id) struct rte_eth_stats stats; rte_eth_stats_get(port_id, &stats); - printf(" RX-packets: %-10"PRIu64" RX-missed: %-10"PRIu64" RX-bytes: " - "%-"PRIu64"\n", - stats.ipackets, stats.imissed, stats.ibytes); - printf(" RX-badcrc: %-10"PRIu64" RX-badlen: %-10"PRIu64" RX-errors: " - "%-"PRIu64"\n", - stats.ibadcrc, stats.ibadlen, stats.ierrors); - printf(" RX-nombuf: %-10"PRIu64"\n", - stats.rx_nombuf); + printf(" RX-packets: %-10"PRIu64" RX-bytes: %-"PRIu64 + " RX-errors: %-10"PRIu64" RX-nombuf: %-10"PRIu64"\n", + stats.ipackets, stats.ibytes, + stats.ierrors, stats.rx_nombuf); printf(" TX-packets: %-10"PRIu64" TX-errors: %-10"PRIu64" TX-bytes: " "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);