From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by dpdk.org (Postfix) with ESMTP id 959495F50 for ; Tue, 27 Jan 2015 12:39:10 +0100 (CET) Received: by mail-pa0-f50.google.com with SMTP id rd3so18033360pab.9 for ; Tue, 27 Jan 2015 03:39:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Nx0fCaZed9VRjwv9s0wY95iiZX3JZr40WIYbDVlalKo=; b=ELmIZEtVfIu6i3zXkPtFMs3kstZ4pkL1Tt/UBqUBMUzzywP95HskuYxgr71u4Xu5Qc bBv/K44nuQNYDp82QAxoMCHRqMgPBRrPZfefefllDHq9zjAQNLVmlV4S4mDmrK7VhIcH IfPAZwGK3J6OuoM60tNpy/+r1xJwkEOjgOB+fH6RMC/F5eAlg+fCNSm5F2EEGUY8pZAE h8kwJdHOZaAWjouMsBCg/+2nuwjORL9gO4k2WBuiji5zfLkR2hyyGlV24RHdL6uEcaQa pU0dY94WIjr62lFrKkWZFOgIhFvsEIO4ntDc06/tjCuV1a5z7WMKjZ9HpLGJc9jS8tQf HJsQ== X-Gm-Message-State: ALoCoQkfFgMWC8ShV4SafJXKZWqqxPQfwyYG2493jV/4pEPZtKDZi/bb4CHmESsjOemD0U/34X+r X-Received: by 10.66.119.193 with SMTP id kw1mr1438430pab.64.1422358749897; Tue, 27 Jan 2015 03:39:09 -0800 (PST) Received: from uryu.home.lan ([144.49.132.22]) by mx.google.com with ESMTPSA id zr4sm1381684pbb.18.2015.01.27.03.39.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Jan 2015 03:39:09 -0800 (PST) Date: Tue, 27 Jan 2015 11:38:47 +0000 From: Stephen Hemminger To: Thomas Monjalon Message-ID: <20150127113847.3d4d32a0@uryu.home.lan> In-Reply-To: <7916082.1WV7FdSlI3@xps13> References: <1421994224-2127-1-git-send-email-stephen@networkplumber.org> <7916082.1WV7FdSlI3@xps13> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Stephen Hemminger Subject: Re: [dpdk-dev] [PATCH] ixgbe: do not include CRC in Tx byte count 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: Tue, 27 Jan 2015 11:39:11 -0000 On Tue, 27 Jan 2015 11:11:39 +0100 Thomas Monjalon wrote: > Hi Stephen, > > 2015-01-22 22:23, stephen@networkplumber.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.