From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by dpdk.org (Postfix) with ESMTP id 8610E8D96 for ; Mon, 30 Nov 2015 22:06:54 +0100 (CET) Received: by pabfh17 with SMTP id fh17so202155804pab.0 for ; Mon, 30 Nov 2015 13:06:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=versa-networks-com.20150623.gappssmtp.com; s=20150623; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=rn2NaPZdz6UMSHFMRn1RnoIc1FKQnP3bTNnx1u1m+uM=; b=T498j4aMIgcG/Uq6ZCMfUeWoPAMmDPZ/IsD6zyBCHxXqJPl3I67Za9e4ej2jYV9R4H XoxrW7OS5UI+IST3FJPJ+5hSDB6CBlFYUQoVzCULNNiXpivKJe6L4BcnVDhHZoNIwI5h cnHD+vLP3Ve9LVSniRfC/AcLTU7lx2r5nd+sIKYmIMq3xXBSvOaN7nEF7Lewf59QvVg3 TaOSWX7Ogdc8xVrqTGtbqN3y1S8eedZvnV14W3ffsljdZIv2PiHDGi2sq53pD2kHTGZN 5Gk4cJyMGSfr2Byxh//6xc8BQmQ/IEs1wAVFSo3rtdu2hnhzt8HtCXBhLjcvOnF8Qpl5 34cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=rn2NaPZdz6UMSHFMRn1RnoIc1FKQnP3bTNnx1u1m+uM=; b=Hrnzbo26qwamx1k8Bbe3JPQrK/HBB6Lp+DsicUYX6YVrVV2hDmNLzNas80WVB5Zpgg kyU+xoH81XOCMXCqO/vlwR41+7G103AZIln6eUyIO+NpiYWDfoZWZIn925FU0VA8MEWZ urHSEa0kEWTDze0JNkAI4lSoOLQRgl3Wt8vKrkWNAN+gR5hBB4btaXCYavruowizOuiC TN2OTwL1RVskFCu5ON/sHo/LojpWUKJE5J7hizOxi1EPLy+u3Hyiw/E7ZleCcUmTcynZ o7eXUZHX/5Uvssf+tW+yZWS8SrOMjdFYGp3vesa2U/LTzjZk8dmPMfHg3sB9kjXxRlaW +/6g== X-Gm-Message-State: ALoCoQlq9qt2f0XjaUoKvN+D+9SxtW/pH/tgJWVR0mFYQKMNi1zMUk3BYhsqBuEnCQBfEpsAIkd8 X-Received: by 10.98.8.136 with SMTP id 8mr74402091pfi.16.1448917613871; Mon, 30 Nov 2015 13:06:53 -0800 (PST) Received: from [10.0.0.48] (70-35-56-62.static.wiline.com. [70.35.56.62]) by smtp.gmail.com with ESMTPSA id hw7sm53801785pac.12.2015.11.30.13.06.51 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Nov 2015 13:06:53 -0800 (PST) Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) From: "Sridhar.V.Iyer" In-Reply-To: Date: Mon, 30 Nov 2015 13:06:52 -0800 Message-Id: References: To: "Van Haaren, Harry" X-Mailer: Apple Mail (2.3096.5) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "users@dpdk.org" Subject: Re: [dpdk-users] e1000 port stats X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:06:55 -0000 Hi Harry, >=20 >> This works fine on esxi guests using e1000. > I presume you are passing a VF to esxi? The igbvf PMD has a different = stats_get() function to the igb PF PMD, so the bug would not be visible = there. I=E2=80=99ve tried only ESXi e1000 interface and not in ESXi sriov = (igbvf pmd). I=E2=80=99m assuming IGBVF pmd will be used only for SRIOV = interface.=20 =46rom gdb (KVM e1000), I see that the control is going to em_ethdev.c = and not igb_ethdev.c (where the patch you provided applies). I added a = similar patch in em_ethdev.c, but that didn=E2=80=99t help. However, when I apply the following patch, I seem to get the correct = byte count: sridhar@sridhar-dev1:~/devel/15.2R1$ git diff diff --git a/usr/lib/DPDK/lib/librte_pmd_e1000/em_ethdev.c = b/usr/lib/DPDK/lib/librte_pmd_e1000/em_ethdev.c index 8f9921c..83076ab 100644 --- a/usr/lib/DPDK/lib/librte_pmd_e1000/em_ethdev.c +++ b/usr/lib/DPDK/lib/librte_pmd_e1000/em_ethdev.c @@ -828,8 +828,10 @@ eth_em_stats_get(struct rte_eth_dev *dev, struct = rte_eth_stats *rte_stats) stats->roc +=3D E1000_READ_REG(hw, E1000_ROC); stats->rjc +=3D E1000_READ_REG(hw, E1000_RJC); - stats->tor +=3D E1000_READ_REG(hw, E1000_TORH); - stats->tot +=3D E1000_READ_REG(hw, E1000_TOTH); + stats->tor +=3D E1000_READ_REG(hw, E1000_TORL); + stats->tor +=3D ((uint64_t)E1000_READ_REG(hw, E1000_TORH) << = 32); + stats->tot +=3D E1000_READ_REG(hw, E1000_TOTL); + stats->tot +=3D ((uint64_t)E1000_READ_REG(hw, E1000_TOTH) << = 32); stats->tpr +=3D E1000_READ_REG(hw, E1000_TPR); stats->tpt +=3D E1000_READ_REG(hw, E1000_TPT); @@ -882,8 +884,8 @@ eth_em_stats_get(struct rte_eth_dev *dev, struct = rte_eth_stats *rte_stats) rte_stats->ipackets =3D stats->gprc; rte_stats->opackets =3D stats->gptc; - rte_stats->ibytes =3D stats->gorc; - rte_stats->obytes =3D stats->gotc; + rte_stats->ibytes =3D stats->tor; + rte_stats->obytes =3D stats->tot; GORC/GOTC account for good octets and TOR/TOT account for total octets. = The packets are being delivered to the application, so they aren=E2=80=99t= being dropped. (gdb) p *stats $2 =3D {crcerrs =3D 0, algnerrc =3D 0, symerrs =3D 0, rxerrc =3D 0, mpc = =3D 0, scc =3D 0, ecol =3D 0, mcc =3D 0, latecol =3D 0, colc =3D 0, dc =3D= 0, tncrs =3D 0, sec =3D 0, cexterr =3D 0, rlec =3D 0, xonrxc =3D 0, xontxc =3D 0, xoffrxc =3D 0, xofftxc =3D 0, fcruc =3D 0, prc64 =3D 0, = prc127 =3D 0, prc255 =3D 0, prc511 =3D 0, prc1023 =3D 0, prc1522 =3D 0, = gprc =3D 1093830, bprc =3D 0, mprc =3D 0, gptc =3D 10, gorc =3D 0, gotc =3D 0, rnbc =3D 0, ruc =3D 0, rfc =3D 0, roc =3D 0, rjc =3D 0, = mgprc =3D 0, mgpdc =3D 0, mgptc =3D 0, tor =3D 1580756080, tot =3D 816, = tpr =3D 1093830, tpt =3D 10, ptc64 =3D 0, ptc127 =3D 0, ptc255 =3D 0, ptc511 =3D 0, ptc1023 =3D 0, ptc1522 =3D 0, mptc =3D 0, bptc =3D 0, = tsctc =3D 0, tsctfc =3D 0, iac =3D 0, icrxptc =3D 0, icrxatc =3D 0, = ictxptc =3D 0, ictxatc =3D 0, ictxqec =3D 0, ictxqmtc =3D 0, icrxdmtc =3D = 0, icrxoc =3D 0, cbtmpc =3D 0, htdpmc =3D 0, cbrdpc =3D 0, cbrmpc =3D 0, = rpthc =3D 0, hgptc =3D 0, htcbdpc =3D 0, hgorc =3D 0, hgotc =3D 0, = lenerrs =3D 0, scvpc =3D 0, hrmpc =3D 0, doosync =3D 0, o2bgptc =3D 0, o2bspc =3D 0, b2ospc =3D 0, b2ogprc =3D 0} Is there a possiblity that qemu is not updating the registers? sridhar@sridhar-dev2:~$ /usr/bin/qemu-system-x86_64 -version QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.19), Copyright = (c) 2003-2008 Fabrice Bellard Regards, Sridhar=