From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] ixgbe: do not include CRC in Tx byte count Date: Tue, 27 Jan 2015 11:38:47 +0000 Message-ID: <20150127113847.3d4d32a0@uryu.home.lan> References: <1421994224-2127-1-git-send-email-stephen@networkplumber.org> <7916082.1WV7FdSlI3@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev-VfR2kkLFssw@public.gmane.org, Stephen Hemminger To: Thomas Monjalon Return-path: In-Reply-To: <7916082.1WV7FdSlI3@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" On Tue, 27 Jan 2015 11:11:39 +0100 Thomas Monjalon wrote: > Hi Stephen, > > 2015-01-22 22:23, stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org: > > From: Stephen Hemminger > > > > The ixgbe driver was including CRC in the transmit packet byte > > count, but not for packets received. This was notice when forwarding and > > the number of bytes received was greater than the number of bytes transmitted > > Tx includes CRC and Rx count is greater, really? > > > for the same number of packets. Make the driver behave like other > > virtual devices and not include CRC in byte count. Use the same queue > > counters already computed and used for Rx. > > Please could you describe the difference between gptc/gotc and qptc/qbtc? > > Thank you The byte counts for global registers include CRC in the byte count. This has been observed by experimentation and validated by QA and documented in Intel HW specs. The original code used queue counts for Rx because the global counters include missed packets (which must not be included in the ipacket counts). I suspect that is why the original developer used the queue counts, as a good side effect the Rx byte count was correct (no CRC). I just extended this for Tx.