mbox series

[net-next,00/15] net: hns3: refactor some debugfs commands

Message ID 1621477304-4495-1-git-send-email-tanhuazhong@huawei.com
Headers show
Series net: hns3: refactor some debugfs commands | expand

Message

Huazhong Tan May 20, 2021, 2:21 a.m. UTC
This series refactors the debugfs command to the new
process and removes the useless debugfs file node cmd
for the HNS3 ethernet driver.

Guangbin Huang (7):
  net: hns3: refactor dump tm map of debugfs
  net: hns3: refactor dump tm of debugfs
  net: hns3: refactor dump tc of debugfs
  net: hns3: refactor dump qos pause cfg of debugfs
  net: hns3: refactor dump qos pri map of debugfs
  net: hns3: refactor dump qos buf cfg of debugfs
  net: hns3: refactor dump qs shaper of debugfs

Hao Chen (3):
  net: hns3: refactor queue map of debugfs
  net: hns3: refactor queue info of debugfs
  net: hns3: refactor dump fd tcam of debugfs

Jiaran Zhang (1):
  net: hns3: refactor dump mac tnl status of debugfs

Yufeng Mo (4):
  net: hns3: refactor dump reg of debugfs
  net: hns3: refactor dump reg dcb info of debugfs
  net: hns3: refactor dump serv info of debugfs
  net: hns3: remove the useless debugfs file node cmd

 drivers/net/ethernet/hisilicon/hns3/hnae3.h        |   25 +-
 drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c |  646 +++++---
 drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.h |    4 +
 .../ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | 1698 +++++++++++---------
 .../ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h |   13 +-
 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c    |    1 -
 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h    |    1 -
 .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c  |  215 ++-
 .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h  |   19 +-
 9 files changed, 1585 insertions(+), 1037 deletions(-)

Comments

Arnd Bergmann July 23, 2021, 7:56 p.m. UTC | #1
On Thu, May 20, 2021 at 4:22 AM Huazhong Tan <tanhuazhong@huawei.com> wrote:
>  static int hclge_dbg_dump_tm_qset(struct hclge_dev *hdev, char *buf, int len)

>  {

> +       char data_str[ARRAY_SIZE(tm_qset_items)][HCLGE_DBG_DATA_STR_LEN];

> +       char *result[ARRAY_SIZE(tm_qset_items)], *sch_mode_str;

>         u8 priority, link_vld, sch_mode, weight;

> -       char *sch_mode_str;

> +       struct hclge_tm_shaper_para shaper_para;

> +       char content[HCLGE_DBG_TM_INFO_LEN];

> +       u16 qset_num, i;

>         int ret, pos;

> -       u16 qset_num;

> -       u16 i;

> +       u8 j;


These variables are too large to put on the stack of a function, as pointed out
by this compiler warning:

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c: In
function 'hclge_dbg_dump_tm_pg':
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:782:1:
error: the frame size of 1416 bytes is larger than 1400 bytes
[-Werror=frame-larger-than=]

I couldn't find an obvious way to fix it. Using kmalloc to dynamically
allocate them
would work, but it's probably better to use a seq_file here and change the loop
to multiple calls.

        Arnd