From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com [209.85.217.176]) by dpdk.org (Postfix) with ESMTP id 7A7BF39EA for ; Mon, 14 Mar 2016 08:30:48 +0100 (CET) Received: by mail-lb0-f176.google.com with SMTP id bc4so226753194lbc.2 for ; Mon, 14 Mar 2016 00:30:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nfware-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=zOOO8SyReBTV5s4BdMOXOaKvVwle5+hilHaSkeSxOsE=; b=R6y5fPLP+W2FzQ+8s8XsSsna/YttSuGMPlgwLHjfeibwY+q3sVmqX2pWIKWymusRr0 P+Nt8cNaj9TDaEzSG7ol2vSa1WOmDPM3xTxEq/lBWw8420cen70xuZzWL/hVXETI9QsM t9WTb+iI6T4hm63yCc8HaweQDRsF/kPB4TUbnMovutlvWL0DO0QZEN2ux5sF/yuUFLhL L48k2IDoyzTuFDJgqx4KIOjtgkr1qZ/Q6LUgVz1MWXBNgusW/zw+ZoPS85MX7/nMXFgo 8xkbm9DDT53i+G3l2O+nCDzaiRBTRIM2y8gOHCXKwSHCmg34i7SIU2TzdAqe6mvlbFal UnAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=zOOO8SyReBTV5s4BdMOXOaKvVwle5+hilHaSkeSxOsE=; b=hhysjaiNCj4OT2aTjMxHYdtXmk5/KffjuxfjYrgu1dpzM3SfL2M/bhdq6644YBZAQ9 bbHOq2Msx0pxMUMRlTmSC/5/joznJD1yR00XEgnzPAMvS+2kYFUL3g/wRlLFP2gjQOEK +5jkomg/Qb189esP8Lp7r9A9ncIo2Bz8EMn1qR/pUa8fmnA7vD/6SKdhD5/uh2HVd64/ j02f9+hUPARYhipyhsggr0/8qAdyHYu/m8zXTfq6066oBJlLSRS9bPbJh5Wemv20VQjC ANTiV2Uih5hz7gMKwaeMmthCfoovZnMWMH+GDhzQhsaJmn+Yo3ufyE55gGrXHrWwQE9A krWg== X-Gm-Message-State: AD7BkJK32DRJSZZpRb7gyx8iqTw1blslCXJQbl1xSzPQUlqRBH8WUpEiQrPWADJzgQ2QdA== X-Received: by 10.25.210.75 with SMTP id j72mr7932895lfg.75.1457940648122; Mon, 14 Mar 2016 00:30:48 -0700 (PDT) Received: from mbp-igor.arccn.local (vpn.arccn.ru. [95.182.74.2]) by smtp.gmail.com with ESMTPSA id z194sm3360746lfd.20.2016.03.14.00.30.47 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Mar 2016 00:30:47 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) From: Igor Ryzhov In-Reply-To: <1457615010-87436-1-git-send-email-iryzhov@nfware.com> Date: Mon, 14 Mar 2016 10:30:46 +0300 Cc: dev@dpdk.org, Rahul Lakkireddy , Wenzhuo Lu , Helin Zhang , Konstantin Ananyev Content-Transfer-Encoding: quoted-printable Message-Id: <804A039F-3BC4-48A7-8708-7ED3805CA239@nfware.com> References: <1457615010-87436-1-git-send-email-iryzhov@nfware.com> To: =?utf-8?B?0JjQs9C+0YDRjCDQoNGL0LbQvtCy?= X-Mailer: Apple Mail (2.3112) Subject: Re: [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: Mon, 14 Mar 2016 07:30:48 -0000 Ping. CCing to maintainers of affected drivers. > 10 =D0=BC=D0=B0=D1=80=D1=82=D0=B0 2016 =D0=B3., =D0=B2 16:03, Igor = Ryzhov =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0= =B0): >=20 > 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. >=20 > 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(-) >=20 > 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 =3D=3D &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 =3D=3D &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 =3D 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; >=20 > /* TX Stats */ > eth_stats->opackets =3D 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 =3D stats->mpc; > rte_stats->ierrors =3D stats->crcerrs + > stats->rlec + stats->ruc + stats->roc + > - rte_stats->imissed + > stats->rxerrc + stats->algnerrc + = stats->cexterr; >=20 > /* 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 =3D stats->mpc; > rte_stats->ierrors =3D stats->crcerrs + > stats->rlec + stats->ruc + stats->roc + > - rte_stats->imissed + > stats->rxerrc + stats->algnerrc + = stats->cexterr; >=20 > /* 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 =3D 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; >=20 > 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 + > --=20 > 2.6.4 >=20