Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp983251lqh; Fri, 29 Mar 2024 03:34:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVjLrzyFo/9OGdzG9NMQQZs1kgxuKZSh+r++wywvkZsU7XGPcZyJ3LsWRgguJgNvbAojkcvknsYWAJjXTe3x/lFFVzQVxJyoq2/0UlkjA== X-Google-Smtp-Source: AGHT+IF3V9HiswTirjTQlIfwYtHR9hAY0rTWfIUMtrcujyJ3vdeM6p/gv1Zy/SEAEgp/k2TcTilQ X-Received: by 2002:a17:906:6a20:b0:a47:4bec:a211 with SMTP id qw32-20020a1709066a2000b00a474beca211mr1768010ejc.40.1711708465608; Fri, 29 Mar 2024 03:34:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711708465; cv=pass; d=google.com; s=arc-20160816; b=LCHLaSgEmXDivCppV1nLv4f8vdTzsH/79/3U2TE2aXv9Nac0pEZD+fJIcZil8Tpibz 48XOM7UMikhz/fJQZXMtQH9Wlv+pNil/PQe6Kz2jlC9nSk++vOAVozFh3i1Vq+P56f5G P/doX+5NLisLr+zmR5UsWFMW2MQ6fPYqXxx3/SWLVgdIwV01YqzYlQiIAAnbACVZxHVO IXmAeE6EM2nVRznIlbFQNeFwdW0i1A1A7hk09PCLhrK/0p+scNiqyvZWXZwGzOpa9F6g utBJjnwTQ0bcdKQg1xEKAuObcZrBqrzitGSctb7vCpN30gBZ+dhvU0eZ0B1+yQLKH7Qd /y7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to:subject:cc :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=57e5Ru9UFHN7uJTCZaTwchw06xV9CEXpqVkn65OQeCY=; fh=ZOL73D9DHUkqQ+9bSClAgIg7PBiX3b2ETC0Ml5ebREg=; b=fWjPkPcbLbLWxpclsUDTFqqR5dxZoKdXz5UX5Qudn70vXilQn8iv+pG2F2oDlJUxn+ NYDAdQpvEWT6FtKwysMjWTf3roq1UJ3Zafan3ha/i4u7VnQPfdxjHN2z3Y4nndR1INDF lTiur6Rnnogj9uLXxhm2Np7W/YRKwb0bYIoFWjF/+UznQueCswG+WpKyZelG3KjetEpv /PzhrdPADUxAvmtTphW0kgBrQl/EgXMVG6HCtpIvzRPOc2xI11aA+UUv9zuQ2O5oBW0o nhxmluc0Y9RjjsjsHSht9pCNOEoBdDPD0vzgnT5MA6384VqNUjdLuHn3P6CntWTHXecS hEzQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-124393-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124393-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id nb14-20020a1709071c8e00b00a4e3bf46fabsi256011ejc.68.2024.03.29.03.34.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 03:34:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124393-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-124393-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124393-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 583921F244C7 for ; Fri, 29 Mar 2024 10:34:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C56D565E20; Fri, 29 Mar 2024 10:34:15 +0000 (UTC) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7C7227471; Fri, 29 Mar 2024 10:34:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711708455; cv=none; b=nmAFwJ9UlLoobmhNT/p74Jb5I29Qn3dxh4gmGa1/biKyRvZQzJlKFboybhA+ruiY6aobMVJ+YRyTmwChOMc4CqTixwMZQDs/ochGnevTnMpb/6FJ1N0pkbQ/mxRkiAqYYuJkPtUR2N9az/v82FxP/Mg3oU+eWQN95WAexolPwbs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711708455; c=relaxed/simple; bh=KG92pe3DBAHh2WhqPReKxHjjE5aM10J77GB1apHyhss=; h=Message-ID:Date:MIME-Version:CC:Subject:To:References:From: In-Reply-To:Content-Type; b=NbWkYSB8A+6h00DlhUxoaVl0BB4oZ1L96qrGuqdW7phonrMSuNC3NF57+uMPYLYB2anhUBYlFu32XAe75V/U1ZfWmPbA15Q5AURC73e9fCGqZCURhLknkmmylLCXAlFmLBIeXILGURCRb8o/BRmL6Phyoz6JweNm3oUUqJA5Wqo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4V5cCh4rz0zNmlF; Fri, 29 Mar 2024 18:32:00 +0800 (CST) Received: from kwepemm600007.china.huawei.com (unknown [7.193.23.208]) by mail.maildlp.com (Postfix) with ESMTPS id B3863140259; Fri, 29 Mar 2024 18:34:03 +0800 (CST) Received: from [10.67.120.192] (10.67.120.192) by kwepemm600007.china.huawei.com (7.193.23.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 29 Mar 2024 18:34:02 +0800 Message-ID: Date: Fri, 29 Mar 2024 18:34:02 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird CC: , , , , , , , , , , , , , Subject: Re: [PATCH V6 net-next 3/4] net: hns3: dump more reg info based on ras mod To: Jakub Kicinski References: <20240327114330.1826631-1-shaojijie@huawei.com> <20240327114330.1826631-4-shaojijie@huawei.com> <20240328191130.47242c8f@kernel.org> From: Jijie Shao In-Reply-To: <20240328191130.47242c8f@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600007.china.huawei.com (7.193.23.208) on 2024/3/29 10:11, Jakub Kicinski wrote: > On Wed, 27 Mar 2024 19:43:29 +0800 Jijie Shao wrote: >> + }, { >> + .reg_name = "MIB_TX/RX_BAD_PKTS", >> + .reg_offset_group = {19, 18, 29, 28}, >> + .group_size = 4 >> + }, { >> + .reg_name = "MIB_TX/RX_GOOD_PKTS", >> + .reg_offset_group = {21, 20, 31, 30}, >> + .group_size = 4 >> + }, { >> + .reg_name = "MIB_TX/RX_TOTAL_PKTS", >> + .reg_offset_group = {23, 22, 33, 32}, >> + .group_size = 4 >> + }, { >> + .reg_name = "MIB_TX/RX_PAUSE_PKTS", >> + .reg_offset_group = {25, 24, 35, 34}, >> + .group_size = 4 >> + }, { >> + .reg_name = "MIB_TX_ERR_ALL_PKTS", >> + .reg_offset_group = {27, 26}, >> + .group_size = 2 >> + }, { >> + .reg_name = "MIB_RX_FCS_ERR_PKTS", >> + .reg_offset_group = {37, 36}, >> + .group_size = 2 > These seem to be duplicating standard stats from rtnl_link_stats64, > ethtool_pause_stats, ethtool_eth_mac_stats, etc. > > You can add device specific stats, but please don't duplicate > stats for which we have standard APIs. Yeah, but these are not duplicate stats for ethtool or debugfs. Generally, driver will reset to restore the normal state. After the reset, many registers are cleared. Therefore, it is difficult to analyze the reason of RAS. We wang to add this information only when RAS is occurring, And these information will help to analyze the reason of RAS. these information does not appear in any new API. Therefore, we hope that we can add this information to reduce the difficulty of analyzing certain issues. Jijie