Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp153057rwb; Wed, 7 Dec 2022 15:59:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf4948XUO3z7BmkRxPK0jbY/5aNP1A04catmkCvbGRDT8znCBsK4OTyVuY137/Wq4uOlRkpS X-Received: by 2002:aa7:cc93:0:b0:462:6b8e:1ddb with SMTP id p19-20020aa7cc93000000b004626b8e1ddbmr81527480edt.276.1670457575900; Wed, 07 Dec 2022 15:59:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670457575; cv=none; d=google.com; s=arc-20160816; b=D8Li22/6MCRzIMkeLPxC8/BjeHgFio+JuyJxkWZBtB6/VR0fePzcyLaFIcMJBhcL+Q EJO6bk3JrR/GBj4vlaohgA7DbRK8JyWKjIZHS9B4w1aLHyjMt+DDvvzJN4V2DlGyVKOu 6i6nnHoKqm3ql9MBmYR91EAwCXABbA9FTKEK41PiRwgbVyqwAFpFAjx/VSL4FWM5nKGD WYS/KxlVsVl1KopqvSJpJsy43wXRIAfVDxSNSuNE9sBDHZ4CpeCrQYvD2PyKZezSl3hV jl9WwmeOMClvrZK2TPJ868Gz6fjj3buJhGxV+bZyBhEuRqwy0Kn6qQQwyM/LJG3k8noe mglQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=xvUjwt9f1JadbFfYO7EudPWfogHhI7yaftzW0T1dJvA=; b=QaHgmLe7E+TZ7gsjOi0giBtT6yhh2LkZJPNEJdzocDjvKF4P3CFJvE9/j4CksBoLyg gBOciaZVYFGWS/OM5/asvfyPziK8nEyVP33/iXxgpsHoGMhI0PpExYUGhHdppWWkfJi0 vs4x/BbLratp/C+MVUATcEsgojCIBkFoCTHh9k5MUTphXNHyGnzWsRsGtoDeMMdmexsd gAEvEegkd2mCyPXJTDCs4dPXL3/idpOy1TDuzhBP1xsceEl1nQz+3Eft3GGVwVB9oJ/G iKwEki8ml3sTTXYSH6HbKELzeM7wl97RGzYTotPB9LqqZ/pSSNSopwFuvbQv7tLTq9sk wUqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YIEQIkN6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa41-20020a17090786a900b007c07ac26356si18025399ejc.513.2022.12.07.15.59.17; Wed, 07 Dec 2022 15:59:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YIEQIkN6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229795AbiLGXsc (ORCPT + 75 others); Wed, 7 Dec 2022 18:48:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbiLGXsb (ORCPT ); Wed, 7 Dec 2022 18:48:31 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35FC92FC3F; Wed, 7 Dec 2022 15:48:30 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DAFD6B81CEC; Wed, 7 Dec 2022 23:48:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16F6FC433D6; Wed, 7 Dec 2022 23:48:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670456907; bh=yayt23wn+GArDo93jmU42JfNMrSGxzH7B3q5Dt5xjDs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YIEQIkN64G6nXouBGC+7JU9QUuFiz3lrFfVpTk+ohMLKv1xw1FyRA3of3z3bv6XfT SkT02OLQKvTQCMc9WI9xU2HgAncYVxrxBvzOhkKjVGU7vUqoDdB8YZthHizwZaCuTY rKin3G1hQcoNu/RF68kq67U+4YMXRI482LOXKd0axsYatLqtD9Ah0cul6PagFMkEEK amPlp8dmvZDHtVQ88QB6IEYUwy/l511ipdBYU3naT+Ng8nBa0H+zqk16QA0fcU3qMM 9haF0Ry7JZ1CO5JQanEijimlVOw8wWlmK9iX3jVZCwOZFwOp8V9clJVsZLYvYl6Eud OkLhW5cw0rijA== Date: Wed, 7 Dec 2022 15:48:26 -0800 From: Jakub Kicinski To: Oleksij Rempel Cc: Woojung Huh , Andrew Lunn , Arun.Ramadoss@microchip.com, Florian Fainelli , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, UNGLinuxDriver@microchip.com, Eric Dumazet , kernel@pengutronix.de, Paolo Abeni , Vladimir Oltean , Vivien Didelot Subject: Re: [PATCH net-next v1 1/1] net: dsa: microchip: add stats64 support for ksz8 series of switches Message-ID: <20221207154826.5477008b@kernel.org> In-Reply-To: <20221207061630.GC19179@pengutronix.de> References: <20221205052904.2834962-1-o.rempel@pengutronix.de> <20221206114133.291881a4@kernel.org> <20221207061630.GC19179@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 Dec 2022 07:16:30 +0100 Oleksij Rempel wrote: > > FWIW for normal netdevs / NICs the rtnl_link_stat pkts do not include > > pause frames, normally. Otherwise one can't maintain those stats in SW > > (and per-ring stats, if any, don't add up to the full link stats). > > But if you have a good reason to do this - I won't nack.. > > Pause frames are accounted by rx/tx_bytes by HW. Since pause frames may > have different size, it is not possible to correct byte counters, so I > need to add them to the packet counters. I have embarrassed myself with my lack of understanding of pause frames before but nonetheless - are you sure? I thought they are always 64B. Quick look at the standard seems to agree: 31C.3.1 Receive state diagram (INITIATE MAC CONTROL FUNCTION) for EXTENSION operation shows a 64 octet frame. Sending long pause frames seems self-defeating as we presumably want the receiver to react ASAP.