From nobody Tue Oct 7 07:18:19 2025 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (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 EBDA419C558; Mon, 14 Jul 2025 06:17:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752473880; cv=none; b=s/el/XCGclQt8ZTsu3Y3ycl5jOtnZ5KH5avhk4ZMUjpkMpdgKbPQCiyZAlVh3acOOZDnBkQLFipy7ZrJqjY3IZEVo1xB5ik5WZqWPhLBVXQM2igqBdihovnDgB1Bvy3lPiefIu1+fWQhW3ugez1dNAsfPHMBahWkCz2v8FerMVQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752473880; c=relaxed/simple; bh=02BnFZ8xLBZ4QkFztEjzoclg+nOFUu1htOkloEbimIE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eVFXPPRoUJa3vKfvBy2knan5b2v3QYu5cYINGbbaaphBtVjB+WpYdoN6FBEh7IgQc4H8SzcP8tCD3M6KMmw2sNGSZurs1KUjIQWEiiBcEbm7Kyj87Z04XR/o+fGur5N5r1KiSt1sVWw1W/wyc1HO7WUrJfN1J3iwloXYDKmUVmY= 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.191 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.163]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4bgX9f6Z2Tz29dqP; Mon, 14 Jul 2025 14:15:18 +0800 (CST) Received: from kwepemk100013.china.huawei.com (unknown [7.202.194.61]) by mail.maildlp.com (Postfix) with ESMTPS id 457971800B2; Mon, 14 Jul 2025 14:17:55 +0800 (CST) Received: from localhost.localdomain (10.90.31.46) by kwepemk100013.china.huawei.com (7.202.194.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 14 Jul 2025 14:17:54 +0800 From: Jijie Shao To: , , , , , CC: , , , , , , , , , Subject: [PATCH V3 net-next 01/10] net: hns3: remove tx spare info from debugfs. Date: Mon, 14 Jul 2025 14:10:28 +0800 Message-ID: <20250714061037.2616413-2-shaojijie@huawei.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20250714061037.2616413-1-shaojijie@huawei.com> References: <20250714061037.2616413-1-shaojijie@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems500001.china.huawei.com (7.221.188.70) To kwepemk100013.china.huawei.com (7.202.194.61) Content-Type: text/plain; charset="utf-8" The tx spare info in debugfs is not very useful, and there are related statistics available for troubleshooting. This patch removes the tx spare info from debugfs. Signed-off-by: Jijie Shao Reviewed-by: Andrew Lunn Acked-by: Arnd Bergmann --- .../ethernet/hisilicon/hns3/hns3_debugfs.c | 52 ------------------- 1 file changed, 52 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c b/drivers/n= et/ethernet/hisilicon/hns3/hns3_debugfs.c index 35e57eebcf57..aec719ce3ccd 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c @@ -570,56 +570,6 @@ static int hns3_dbg_coal_info(struct hnae3_handle *h, = char *buf, int len) return 0; } =20 -static const struct hns3_dbg_item tx_spare_info_items[] =3D { - { "QUEUE_ID", 2 }, - { "COPYBREAK", 2 }, - { "LEN", 7 }, - { "NTU", 4 }, - { "NTC", 4 }, - { "LTC", 4 }, - { "DMA", 17 }, -}; - -static void hns3_dbg_tx_spare_info(struct hns3_enet_ring *ring, char *buf, - int len, u32 ring_num, int *pos) -{ - char data_str[ARRAY_SIZE(tx_spare_info_items)][HNS3_DBG_DATA_STR_LEN]; - struct hns3_tx_spare *tx_spare =3D ring->tx_spare; - char *result[ARRAY_SIZE(tx_spare_info_items)]; - char content[HNS3_DBG_INFO_LEN]; - u32 i, j; - - if (!tx_spare) { - *pos +=3D scnprintf(buf + *pos, len - *pos, - "tx spare buffer is not enabled\n"); - return; - } - - for (i =3D 0; i < ARRAY_SIZE(tx_spare_info_items); i++) - result[i] =3D &data_str[i][0]; - - *pos +=3D scnprintf(buf + *pos, len - *pos, "tx spare buffer info\n"); - hns3_dbg_fill_content(content, sizeof(content), tx_spare_info_items, - NULL, ARRAY_SIZE(tx_spare_info_items)); - *pos +=3D scnprintf(buf + *pos, len - *pos, "%s", content); - - for (i =3D 0; i < ring_num; i++) { - j =3D 0; - sprintf(result[j++], "%u", i); - sprintf(result[j++], "%u", ring->tx_copybreak); - sprintf(result[j++], "%u", tx_spare->len); - sprintf(result[j++], "%u", tx_spare->next_to_use); - sprintf(result[j++], "%u", tx_spare->next_to_clean); - sprintf(result[j++], "%u", tx_spare->last_to_clean); - sprintf(result[j++], "%pad", &tx_spare->dma); - hns3_dbg_fill_content(content, sizeof(content), - tx_spare_info_items, - (const char **)result, - ARRAY_SIZE(tx_spare_info_items)); - *pos +=3D scnprintf(buf + *pos, len - *pos, "%s", content); - } -} - static const struct hns3_dbg_item rx_queue_info_items[] =3D { { "QUEUE_ID", 2 }, { "BD_NUM", 2 }, @@ -827,8 +777,6 @@ static int hns3_dbg_tx_queue_info(struct hnae3_handle *= h, pos +=3D scnprintf(buf + pos, len - pos, "%s", content); } =20 - hns3_dbg_tx_spare_info(ring, buf, len, h->kinfo.num_tqps, &pos); - return 0; } =20 --=20 2.33.0