1. 20 May, 2021 9 commits
    • Guangbin Huang's avatar
      net: hns3: refactor dump tc of debugfs · 0e32038d
      Guangbin Huang authored
      Currently, user gets tc schedule info by implementing debugfs command
      "echo dump tc > cmd", this command will dump info in dmesg. It's
      unnecessary and heavy.
      
      To optimize it, create a single file "tc_sch_info" and use cat command
      to get info. It will return info to userspace, rather than record in
      dmesg.
      
      The display style is below:
      $ cat tc_sch_info
      enabled tc number: 4
      weight_offset: 14
      TC    MODE  WEIGHT
      0     dwrr     25
      1     dwrr     25
      2     dwrr     25
      3     dwrr     25
      4     dwrr      0
      5     dwrr      0
      6     dwrr      0
      7     dwrr      0
      Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0e32038d
    • Guangbin Huang's avatar
      net: hns3: refactor dump tm of debugfs · cad7c215
      Guangbin Huang authored
      Currently, user gets some tm info by implementing debugfs command
      "echo dump tm > cmd", this command will dump info in dmesg. It's
      unnecessary and heavy.
      
      In addition, the info of this command mixes info of qset, priority,
      pg and port. Qset and priority have their own command to get info of
      themself, so can remove info of qset and priority from this command.
      
      To optimize it, create two new files "tm_pg", "tm_port" in tm directory
      and use cat command to separately get info of pg and port.
      
      The display style is below:
      $ cat tm_pg
      ID  PRI_MAP  MODE DWRR  C_IR_B  C_IR_U  C_IR_S  C_BS_B  C_BS_S ...
      00   0x1f    dwrr  1       75       9       0      31      20  ...
      
      $ cat tm_port
      IR_B  IR_U  IR_S  BS_B  BS_S  FLAG  RATE(Mbps)
      75     9     0    31    20    1     200000
      Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cad7c215
    • Guangbin Huang's avatar
      net: hns3: refactor dump tm map of debugfs · 7679f28e
      Guangbin Huang authored
      Currently, the debugfs command for tm map is implemented by
      "echo xxxx > cmd", and record the information in dmesg. It's
      unnecessary and heavy. To improve it, create a single file
      "tm_map" for it, and query it by command "cat tm_map",
      return the result to userspace, rather than record in dmesg.
      
      As user can't specify queue id in cat command, driver will return info
      of all queue id.
      
      The display style is below:
      $ cat tm_map
      queue_id   qset_id   pri_id   tc_id
      0000         0000      00       00
      INDEX | TM BP QSET MAPPING:
      0000  | 00000000:00000000:00000000:00000000:00000000:00000000:00000000
      0256  | 00000000:00000000:00000000:00000000:00000000:00000002:00000000
      0512  | 00000000:00000000:00000000:00000004:00000000:00000000:00000000
      0768  | 00000000:00000008:00000000:00000000:00000000:00000000:00000000
      Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7679f28e
    • Hao Chen's avatar
      net: hns3: refactor dump fd tcam of debugfs · b5a0b70d
      Hao Chen authored
      Currently, the debugfs command for fd tcam is implemented by
      "echo xxxx > cmd", and record the information in dmesg. It's
      unnecessary and heavy. To improve it, create a single file
      "fd_tcam" for it, and query it by command "cat fd_tcam",
      return the result to userspace, rather than record in dmesg.
      
      The display style is below:
      $ cat fd_tcam
      read result tcam key x(31):
      00000000
      00000000
      00000000
      08000000
      00000600
      00000000
      00000000
      00000000
      00000000
      00000000
      00000000
      00000000
      00000000
      read result tcam key y(31):
      00000000
      00000000
      00000000
      f7ff0000
      0000f900
      00000000
      00000000
      00000000
      00000000
      00000000
      00000000
      00000000
      0000fff8
      Signed-off-by: default avatarHao Chen <chenhao288@hisilicon.com>
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b5a0b70d
    • Hao Chen's avatar
      net: hns3: refactor queue info of debugfs · e44c495d
      Hao Chen authored
      Currently, the debugfs command for queue info is implemented by
      "echo xxxx > cmd", and record the information in dmesg. It's
      unnecessary and heavy. To improve it, create two files
      "rx_queue_info" and "tx_queue_info" for it, and query it
      by command "cat rx_queue_info" and "cat tx_queue_info",
      return the result to userspace, rather than record in dmesg.
      
      The display style is below:
      $ cat rx_queue_info
      QUEUE_ID  BD_NUM  BD_LEN  TAIL  HEAD  FBDNUM  PKTNUM   ...
      0           0       0     0     0       0       0      ...
      1           0       0     0     0       0       0      ...
      2           0       0     0     0       0       0      ...
      
      $ cat tx_queue_info
      QUEUE_ID  BD_NUM  TC  TAIL  HEAD  FBDNUM  OFFSET  PKTNUM  ...
      0           0     0     0     0       0       0        0  ...
      1           0     0     0     0       0       0        0  ...
      2           0     0     0     0       0       0        0  ...
      Signed-off-by: default avatarHao Chen <chenhao288@hisilicon.com>
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e44c495d
    • Hao Chen's avatar
      net: hns3: refactor queue map of debugfs · d2f737cf
      Hao Chen authored
      Currently, the debugfs command for queue map is implemented by
      "echo xxxx > cmd", and record the information in dmesg. It's
      unnecessary and heavy. To improve it, create a single file
      "queue_map" for it, and query it by command "cat queue_map",
      return the result to userspace, rather than record in dmesg.
      
      The display style is below:
      $ cat queue_map
      local_queue_id   global_queue_id   vector_id
      0                0                 341
      Signed-off-by: default avatarHao Chen <chenhao288@hisilicon.com>
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d2f737cf
    • Yufeng Mo's avatar
      net: hns3: refactor dump reg dcb info of debugfs · 365e860a
      Yufeng Mo authored
      Currently, the debugfs command for reg dcb info is implemented by
      "echo xxxx > cmd", and record the information in dmesg. It's
      unnecessary and heavy. To improve it, create a single file
      "dcb" for it, and query it by command "cat dcb",
      return the result to userspace, rather than record in dmesg.
      
      The display style is below:
      $ cat dcb
      qset_id  roce_qset_mask  nic_qset_mask  qset_shaping_pass  qset_bp_status
      0000           0x1            0x1             0x1               0x0
      0001           0x1            0x1             0x1               0x0
      0002           0x1            0x1             0x1               0x0
      0003           0x1            0x1             0x1               0x0
      0004           0x1            0x1             0x1               0x0
      0005           0x1            0x1             0x1               0x0
      0006           0x1            0x1             0x1               0x0
      0007           0x1            0x1             0x1               0x0
      pri_id  pri_mask  pri_cshaping_pass  pri_pshaping_pass
      000       0x1           0x0                0x1
      001       0x1           0x0                0x0
      002       0x1           0x0                0x0
      003       0x1           0x0                0x0
      004       0x1           0x0                0x0
      005       0x1           0x0                0x0
      006       0x1           0x0                0x0
      007       0x1           0x0                0x0
      pg_id  pg_mask  pg_cshaping_pass  pg_pshaping_pass
      000      0x1           0x0               0x1
      Signed-off-by: default avatarYufeng Mo <moyufeng@huawei.com>
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      365e860a
    • Yufeng Mo's avatar
      net: hns3: refactor dump reg of debugfs · d96b0e59
      Yufeng Mo authored
      Currently, the debugfs command for reg is implemented by
      "echo xxxx > cmd", and record the information in dmesg. It's
      unnecessary and heavy. To improve it, create some files
      "bios_common/ssu/igu_egu/rpu/ncsi/rtc/ppp/rcb/tqp/mac" for it,
      and query it by command "cat xxx", return the result to
      userspace, rather than record in dmesg.
      
      The display style is below:
      $ cat bios_common
      BP_CPU_STATE: 0x0
      DFX_MSIX_INFO_NIC_0: 0xc000
      DFX_MSIX_INFO_NIC_1: 0x0
      DFX_MSIX_INFO_NIC_2: 0x0
      DFX_MSIX_INFO_NIC_3: 0x0
      DFX_MSIX_INFO_ROC_0: 0xc000
      DFX_MSIX_INFO_ROC_1: 0x0
      DFX_MSIX_INFO_ROC_2: 0x0
      DFX_MSIX_INFO_ROC_3: 0x0
      Signed-off-by: default avatarYufeng Mo <moyufeng@huawei.com>
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d96b0e59
    • Zhen Lei's avatar
      mISDN: Remove obsolete PIPELINE_DEBUG debugging information · 2682ea32
      Zhen Lei authored
      As Leon Romanovsky's tips:
      The definition of macro PIPELINE_DEBUG is commented more than 10 years ago
      and can be seen as a dead code that should be removed.
      Suggested-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2682ea32
  2. 19 May, 2021 31 commits