Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp191307rdd; Tue, 9 Jan 2024 00:34:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IHvHorkaczUtCWv1p5gqg+Sx+P9UCmTa1nH31Kf3BvkZE1EU7zOuUaM1JulgW1bro3EJoSN X-Received: by 2002:a17:902:b68f:b0:1d0:6ffd:9e1f with SMTP id c15-20020a170902b68f00b001d06ffd9e1fmr4685612pls.113.1704789243936; Tue, 09 Jan 2024 00:34:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704789243; cv=none; d=google.com; s=arc-20160816; b=pDV7oMQHLrZCkDtHYJp3g4k6142L4sCLDFqjYL40di9IXfZwFGSQHPEcvkvwjTEF71 WmoWoFkENchu+DZKo0wGIrpe49WxCD6dJ/HsWZZ2yMDepWDegqTfAEZXaUlkdFD8oAN6 xKOlyicecFwowOjvPU7v/V81EhpAdtdxlcmtO5nKQn3tU1Fy9b7QrRmbFfWTP8WgJVaQ sqmLqQkjyqH/9qLNVWxHK4UdHbSIHTw02KujYm5Cb8Pnx7zifpzgBB7InQL7/nvNh0fv sGwqy6YqQ3BLj1J4V+XNsqirgQ6S0T1bYDsHTkaD3FbbciVImOvgbZIQURCmgbqZ9MU3 CSYw== ARC-Message-Signature: i=1; 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=zZan8hbO2kUpS2cr408SDYRvk5D6S7XGOkItRCzI0SQ=; fh=S2/azrDaw4uDnWXGBPh7QnJlzEzW4Lfhx54ZDioQ3Es=; b=nxnnInJc6cu/cNkBF0e7AiZ3c9WO5IhI3E+5rAfZjwDtgYxaSvUzp0bKor7YA8A49b WPye4C35pHFX6FLBB2PVWlZ5XPrfiyVzqVXsQlnlfACaWb5Czp5mDzuQSkyQKAzOTsL0 KmOns+ojk0u1eMq0aSC3moSls60gq09OiKM/jWd3YgHSNUjkr5EVRUC3Bwvnr6nCaZRX PszQWKgVVHcgNkxaLcySmv72gIenggQQvZmsz9aco7KMrphNybnxVXmc/MUAZpPky0qt FA1x10Nebww6wPh55VL45kpx/OIFJ4eLTtelabiCEjY7N0lEmFqZoce/5ndAeQs9HdJb tMQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-20542-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20542-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id h3-20020a170902f70300b001d4df29368esi1126728plo.564.2024.01.09.00.34.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 00:34:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20542-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-20542-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20542-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 225C7B268EB for ; Tue, 9 Jan 2024 08:20:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D0FEB22068; Tue, 9 Jan 2024 08:19:53 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (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 207D213ACF; Tue, 9 Jan 2024 08:19:51 +0000 (UTC) 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.88.105]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4T8P3G0dKYzsVs2; Tue, 9 Jan 2024 16:19:06 +0800 (CST) Received: from kwepemm600007.china.huawei.com (unknown [7.193.23.208]) by mail.maildlp.com (Postfix) with ESMTPS id 28AF8140136; Tue, 9 Jan 2024 16:19:49 +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_128_GCM_SHA256) id 15.1.2507.35; Tue, 9 Jan 2024 16:19:48 +0800 Message-ID: <00e5d6e2-168c-4887-8b6d-8498ebaafe6d@huawei.com> Date: Tue, 9 Jan 2024 16:19:48 +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 V4 net-next 4/4] net: hns3: support dump pfc frame statistics in tx timeout log To: Jiri Pirko References: <20240105010119.2619873-1-shaojijie@huawei.com> <20240105010119.2619873-5-shaojijie@huawei.com> From: Jijie Shao In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600007.china.huawei.com (7.193.23.208) on 2024/1/5 17:55, Jiri Pirko wrote: >> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c >> @@ -2871,8 +2871,10 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev) >> struct hns3_mac_stats mac_stats; >> >> h->ae_algo->ops->get_mac_stats(h, &mac_stats); >> - netdev_info(ndev, "tx_pause_cnt: %llu, rx_pause_cnt: %llu\n", >> - mac_stats.tx_pause_cnt, mac_stats.rx_pause_cnt); >> + netdev_info(ndev, >> + "tx_pause_cnt: %llu, rx_pause_cnt: %llu, tx_pfc_cnt: %llu, rx_pfc_cnt: %llu\n", >> + mac_stats.tx_pause_cnt, mac_stats.rx_pause_cnt, >> + mac_stats.tx_pfc_cnt, mac_stats.rx_pfc_cnt); > Don't we have a better way to expose this? I mean, whenever there is a > patch that extends the amount of text written in dmesg, it smells. > We should rather reduce it. > In fact, we include this part of the statistics in the ethtool -S statistics. However, if tx timeout occurs,the driver performs a reset attempt to recover it. And the statistics are cleared after the reset. Therefore, pfc statistics are added to tx timeout log to determine the timeout cause.