-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: hns3: refactor the debugfs process
Currently, each debugfs command needs to create a file to get the information. To better support more debugfs commands, the debugfs process is reconstructed, including the process of creating dentries and files, and obtaining information. Signed-off-by: Yufeng Mo <moyufeng@huawei.com> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Yufeng Mo
authored and
David S. Miller
committed
May 14, 2021
1 parent
1ddc028
commit 5e69ea7
Showing
8 changed files
with
236 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* SPDX-License-Identifier: GPL-2.0+ */ | ||
/* Copyright (c) 2021 Hisilicon Limited. */ | ||
|
||
#ifndef __HNS3_DEBUGFS_H | ||
#define __HNS3_DEBUGFS_H | ||
|
||
#define HNS3_DBG_READ_LEN 65536 | ||
#define HNS3_DBG_WRITE_LEN 1024 | ||
|
||
enum hns3_dbg_dentry_type { | ||
HNS3_DBG_DENTRY_TM, | ||
HNS3_DBG_DENTRY_COMMON, | ||
}; | ||
|
||
struct hns3_dbg_dentry_info { | ||
const char *name; | ||
struct dentry *dentry; | ||
}; | ||
|
||
struct hns3_dbg_cmd_info { | ||
const char *name; | ||
enum hnae3_dbg_cmd cmd; | ||
enum hns3_dbg_dentry_type dentry; | ||
u32 buf_len; | ||
char *buf; | ||
int (*init)(struct hnae3_handle *handle, unsigned int cmd); | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters