Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7965826rwb; Tue, 6 Dec 2022 12:08:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf6PtfATBr1YiKgMuC+cSzSjcOwajMnf+u+vgwXFBWzU7XnFkEhkueCcoNmN1XHUvY7XqwjH X-Received: by 2002:a17:90a:4089:b0:216:c8ab:3f5b with SMTP id l9-20020a17090a408900b00216c8ab3f5bmr101687260pjg.157.1670357317528; Tue, 06 Dec 2022 12:08:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670357317; cv=none; d=google.com; s=arc-20160816; b=xJODeG6lyJIyDNfr/8cTvKSufQCiO7+eaTvvywRFMkkJ20r2/0deek8wjfwk1/6OMR DGMv1L6lEs5QqYOUqHv4x34Pp+JkKzms016uhPjR3VfF+TLTb86PpycQXxfXfO9Wn1Lf 9+dauw8ZyF1P+UeLpq75A5BhFVvdELbsipZRrFGFDkJ8QDaiUXqPhoLNZHOumpIZ0IM4 jz93o0PZp1GZzLQCgliovRiqCnLqe6H34cXjHF0ACOVDT5e4M47QbV4BoaK68y/WHDzf ibbU1jwaKuh7UuLOHGWx50LTbBeOXbtHv/O0/BHWA1qC5tLWPRd+pJN5iENDsyZ10rlj 95DQ== 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=HsmVXhrmcIWt7CAJcQvHd9tBWHUXwVB/RXV8/uFWT0M=; b=dNZJ4m6Jk4OsxQd21P1csACk53Bzfi2PFFS16QyRXQ70/tekkCc0trDvWeQXQ49sOl RDEW2M+OoWTuJYh8q+yCkHAZ2Ia2Yi3APY1Jq5XRV5IDxRvgUre0CVjkw3ZgaHI0emAe jrD8DrwgQC3C80FRFbLYoxBXObsFVJKOEgloyWz7Rmn/iKv0j2U/2DbDB+pg9pvHoCUg PNfmlg+1WENv16NNq7KU0EGUvneYYSQ65tvxyb/HcRhDBaCFJ+gfugBK3nze6cQSUyje gws+EQwBo1WyROQMIh9LrQEe8O2Ze1XpGklzc0Fwhtz6PQwjvQ6VwMcwSwEgJrQ4SPFs /Xsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ou4A6q7x; 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 k7-20020a170902ce0700b00186b287bd57si18646465plg.190.2022.12.06.12.08.26; Tue, 06 Dec 2022 12:08:37 -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=ou4A6q7x; 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 S229774AbiLFTli (ORCPT + 78 others); Tue, 6 Dec 2022 14:41:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbiLFTlg (ORCPT ); Tue, 6 Dec 2022 14:41:36 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9747C303DA; Tue, 6 Dec 2022 11:41:35 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 2733161851; Tue, 6 Dec 2022 19:41:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11A7EC433D7; Tue, 6 Dec 2022 19:41:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670355694; bh=wIpp5xJ3aOk1YINDuDXnwzybQsgEaelfXPcy1Neahms=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ou4A6q7x/+PsvK3XmFDZW7TmK0TTj1wZCPz0MtzBjyNx4vO+4OqWMHObEP7jxMQji l5sJnlYbq6kJdtNGkIND291wJiEmW14HC7cpzqBp40fqQgHahXV1QgeYpeg0KszFor McnyCRuN2Nw0oQ+unBXc2h5BP1vuBffMEyl+QlIw6WnWp3IAJM4cxmQ3aw2pAS+6Dq PaKPRJ39YHTEQXPcw29tZHE2DZUIr43X3jBDPP9JuF27t8cteQQ3vUHNxcScJl/CEo Wx1AfMNJLo/+lmvuf7EtMeqlLKcZljnS1bi9t3+60q5eKC/CdGok8anzWcgYwZYBjx 4lK9vlmEmS61Q== Date: Tue, 6 Dec 2022 11:41:33 -0800 From: Jakub Kicinski To: Oleksij Rempel Cc: Woojung Huh , UNGLinuxDriver@microchip.com, Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Paolo Abeni , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Arun.Ramadoss@microchip.com Subject: Re: [PATCH net-next v1 1/1] net: dsa: microchip: add stats64 support for ksz8 series of switches Message-ID: <20221206114133.291881a4@kernel.org> In-Reply-To: <20221205052904.2834962-1-o.rempel@pengutronix.de> References: <20221205052904.2834962-1-o.rempel@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 Mon, 5 Dec 2022 06:29:04 +0100 Oleksij Rempel wrote: > + stats->rx_packets = raw->rx_bcast + raw->rx_mcast + raw->rx_ucast + > + raw->rx_pause; > + stats->tx_packets = raw->tx_bcast + raw->tx_mcast + raw->tx_ucast + > + raw->tx_pause; 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..