From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com [209.85.217.179]) by dpdk.org (Postfix) with ESMTP id 3E25E2C66 for ; Thu, 10 Mar 2016 14:03:48 +0100 (CET) Received: by mail-lb0-f179.google.com with SMTP id bc4so110612148lbc.2 for ; Thu, 10 Mar 2016 05:03:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nfware-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=2V0tQxwbDhySR+QpMn47ODCM+BKZVVFufKqrkdhjmus=; b=t3defW3YK3GcssZAKSUUS70kkOdeV5Zc5MvSXM/uxhFb8tTyd6NKhgGwORsg64RdNP JYGxgcUgC9I/VTT+Oe8La0oWRK+F9/kcZTzVRY4Drn7GNgqSPC6ZvB6WeMs3sR11w9Np MwC9+XbjjZ4yMI77K/CiYgE/N5osOmH7Iwc3Ro6korfZHnc6ZclqoXGZ89R5yz6Kv+VD Yeoi3gpuxTxexTJWIFSQPKrg/Y15TVwFANrepKqHEV564aw0USdGCliZDPYiXGsD2nv0 EvWAL1WWBMypEXmPCl7qhjlw9GAf+Z+NzNr17OhA6pHrOj/GuSjZZVZ3R9++gxNePJ8V x4JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=2V0tQxwbDhySR+QpMn47ODCM+BKZVVFufKqrkdhjmus=; b=irPm6mudwT4EPXC0tiduG5IAw+HAzAvkUm0sxZoyV4LEbrK2nRzUYXfvW3BdSwT/Zw vbIOQDQsT84ZCLN+hxbprVznQf/3w79n+ah4lEfowCjXJ2rpNFWmBirQ+OUq9sQljAkI nW/G+hYA5vabHODv7RZ3Oxezmq8Izq1LlVe+OYjTnItN+bykZUvR7lAkKJXGMxvyMUJR 8BZIgJF0atFzB0ls0lVvIs0ImhyuoZYurYcs2nrgnFM0vNqHQIu+KwXH6/sAs/yCHwQn ODwDhjC7Swh65ENVV5/sjGXQiEKbUaI9+55+O9HKeMYcU7H2ky49ocjnSLoju803euzr LXww== X-Gm-Message-State: AD7BkJIMy/0XfNINBeOQ47usbsw8AlGPj/T6ZAVcX2bc4Xj8F9/dC9qEtYVMUQE1lLdnJA== X-Received: by 10.112.205.38 with SMTP id ld6mr1223019lbc.55.1457615027840; Thu, 10 Mar 2016 05:03:47 -0800 (PST) Received: from localhost.localdomain (vpn.arccn.ru. [95.182.74.2]) by smtp.gmail.com with ESMTPSA id pi5sm512559lbb.41.2016.03.10.05.03.46 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 10 Mar 2016 05:03:47 -0800 (PST) From: Igor Ryzhov To: dev@dpdk.org Date: Thu, 10 Mar 2016 16:03:30 +0300 Message-Id: <1457615010-87436-1-git-send-email-iryzhov@nfware.com> X-Mailer: git-send-email 2.6.4 Subject: [dpdk-dev] [PATCH] ethdev: don't count missed packets in erroneous packets counter 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: , X-List-Received-Date: Thu, 10 Mar 2016 13:03:48 -0000 Comment for "ierrors" counter says that it counts erroneous received packets. But for some reason "imissed" counter is added to "ierrors" counter in most drivers. It is a mistake, because missed packets are obviously not received. This patch fixes it. Signed-off-by: Igor Ryzhov --- app/test-pmd/testpmd.c | 4 ++-- drivers/net/cxgbe/cxgbe_ethdev.c | 2 +- drivers/net/e1000/em_ethdev.c | 1 - drivers/net/e1000/igb_ethdev.c | 1 - drivers/net/i40e/i40e_ethdev.c | 3 +-- drivers/net/ixgbe/ixgbe_ethdev.c | 1 - 6 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 269ef81..d3d733b 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -753,7 +753,7 @@ fwd_port_stats_display(portid_t port_id, struct rte_eth_stats *stats) 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) { + if ((stats->ierrors + stats->rx_nombuf) > 0) { printf(" RX-error: %-"PRIu64"\n", stats->ierrors); printf(" RX-nombufs: %-14"PRIu64"\n", stats->rx_nombuf); } @@ -772,7 +772,7 @@ fwd_port_stats_display(portid_t port_id, struct rte_eth_stats *stats) 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) { + if ((stats->ierrors + stats->rx_nombuf) > 0) { printf(" RX-error:%"PRIu64"\n", stats->ierrors); printf(" RX-nombufs: %14"PRIu64"\n", stats->rx_nombuf); diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index 97ef152..0070e2a 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -662,7 +662,7 @@ static void cxgbe_dev_stats_get(struct rte_eth_dev *eth_dev, ps.rx_trunc2 + ps.rx_trunc3; eth_stats->ierrors = ps.rx_symbol_err + ps.rx_fcs_err + ps.rx_jabber + ps.rx_too_long + ps.rx_runt + - ps.rx_len_err + eth_stats->imissed; + ps.rx_len_err; /* TX Stats */ eth_stats->opackets = ps.tx_frames; diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 4a843fe..27ace6d 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -914,7 +914,6 @@ eth_em_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats) rte_stats->imissed = stats->mpc; rte_stats->ierrors = stats->crcerrs + stats->rlec + stats->ruc + stats->roc + - rte_stats->imissed + stats->rxerrc + stats->algnerrc + stats->cexterr; /* Tx Errors */ diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 4ed5e95..6e93214 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -1640,7 +1640,6 @@ eth_igb_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats) rte_stats->imissed = stats->mpc; rte_stats->ierrors = stats->crcerrs + stats->rlec + stats->ruc + stats->roc + - rte_stats->imissed + stats->rxerrc + stats->algnerrc + stats->cexterr; /* Tx Errors */ diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 7e68c61..7d68d4d 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2062,8 +2062,7 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) pf->main_vsi->eth_stats.rx_discards; stats->ierrors = ns->crc_errors + ns->rx_length_errors + ns->rx_undersize + - ns->rx_oversize + ns->rx_fragments + ns->rx_jabber + - stats->imissed; + ns->rx_oversize + ns->rx_fragments + ns->rx_jabber; PMD_DRV_LOG(DEBUG, "***************** PF stats start *******************"); PMD_DRV_LOG(DEBUG, "rx_bytes: %"PRIu64"", ns->eth.rx_bytes); diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 3e6fe86..ba84544 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2552,7 +2552,6 @@ ixgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) hw_stats->rlec + hw_stats->ruc + hw_stats->roc + - total_missed_rx + hw_stats->illerrc + hw_stats->errbc + hw_stats->rfc + -- 2.6.4