Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAD14C433F5 for ; Fri, 11 Feb 2022 08:48:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348189AbiBKIsH (ORCPT ); Fri, 11 Feb 2022 03:48:07 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:38828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348187AbiBKIsH (ORCPT ); Fri, 11 Feb 2022 03:48:07 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E9C7E54 for ; Fri, 11 Feb 2022 00:48:06 -0800 (PST) Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nIRb2-0001XS-Ha for netdev@vger.kernel.org; Fri, 11 Feb 2022 09:48:04 +0100 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1nIRb2-005vqV-2k for netdev@vger.kernel.org; Fri, 11 Feb 2022 09:48:04 +0100 Date: Fri, 11 Feb 2022 09:48:04 +0100 From: Oleksij Rempel To: netdev@vger.kernel.org Subject: packet stats validation Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 09:40:05 up 106 days, 15:07, 90 users, load average: 1.72, 1.88, 1.18 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: netdev@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi all, I'm implementing stats64 for the ksz switch and by validating my implementation found different by count methods in different sub systems. For example, i send 64 byte packet with: mausezahn enp1s0f3 -c 1 -a rand -p 64 - tshark is recognizing 64 byte frame with 50 byte data - Intel igb is counting it as 64 byte - ksz9477 switch HW counter is counting it as 68 bytes packet - linux bridge is counting it as 50 byte packet Can you please help me to understand this differences? Do linux bridge is doing it correct or it is a bug? ksz9477 is probably adding a tag and counting tagged packets. Should this number be provided to stats64? Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |