1. 21 5月, 2021 8 次提交
    • G
      net: hns3: refactor dump qos pri map of debugfs · 28d3bada
      Guangbin Huang 提交于
      Currently, user gets priority map by implementing debugfs command
      "echo dump qos pri map > cmd", this command will dump info in dmesg.
      It's unnecessary and heavy.
      
      To optimize it, create a single file "qos_pri_map" in tm directory
      and use cat command to get info. It will return info to userspace,
      rather than record in dmesg.
      
      The display style is below:
      $ cat qos_pri_map
      vlan_to_pri: 0
      PRI    TC
      0       0
      1       1
      2       2
      3       3
      4       0
      5       1
      6       2
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28d3bada
    • G
      net: hns3: refactor dump qos pause cfg of debugfs · 6571ec2e
      Guangbin Huang 提交于
      Currently, user gets pause config by implementing debugfs command
      "echo dump qos pause cfg > cmd", this command will dump info in dmesg.
      It's unnecessary and heavy.
      
      To optimize it, create a single file "qos_pause_cfg" in tm directory
      and use cat command to get info. It will return info to userspace,
      rather than record in dmesg.
      
      The display style is below:
      $ cat qos_pause_cfg
      pause_trans_gap: 0x7f
      pause_trans_time: 0xffff
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6571ec2e
    • G
      net: hns3: refactor dump tc of debugfs · 0e32038d
      Guangbin Huang 提交于
      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: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0e32038d
    • G
      net: hns3: refactor dump tm of debugfs · cad7c215
      Guangbin Huang 提交于
      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: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cad7c215
    • G
      net: hns3: refactor dump tm map of debugfs · 7679f28e
      Guangbin Huang 提交于
      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: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7679f28e
    • H
      net: hns3: refactor dump fd tcam of debugfs · b5a0b70d
      Hao Chen 提交于
      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: NHao Chen <chenhao288@hisilicon.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b5a0b70d
    • Y
      net: hns3: refactor dump reg dcb info of debugfs · 365e860a
      Yufeng Mo 提交于
      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: NYufeng Mo <moyufeng@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      365e860a
    • Y
      net: hns3: refactor dump reg of debugfs · d96b0e59
      Yufeng Mo 提交于
      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: NYufeng Mo <moyufeng@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d96b0e59
  2. 15 5月, 2021 8 次提交
    • Jiaran Zhang's avatar
      net: hns3: refactor dump ncl config of debugfs · e76e6886
      Jiaran Zhang 提交于
      Currently, the debugfs command for ncl config is implemented by
      "echo xxxx > cmd", and record the information in dmesg. It's
      unnecessary and heavy. To improve it, create a single file
      "ncl_config" for it, and query it by command "cat ncl_config",
      return the result to userspace, rather than record in dmesg.
      
      The display style is below:
      $cat ncl_config
      offset | data
      0x0000 | 0x00000028
      0x0004 | 0x00000400
      0x0008 | 0x08040201
      0x000c | 0x00000000
      0x0010 | 0x00040004
      0x0014 | 0x00040004
      0x0018 | 0x00000000
      0x001c | 0x00000000
      0x0020 | 0x00040004
      Signed-off-by: Jiaran Zhang's avatarJiaran Zhang <zhangjiaran@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e76e6886
    • Jiaran Zhang's avatar
      net: hns3: refactor dump m7 info of debugfs · 0b198b0d
      Jiaran Zhang 提交于
      Currently, the debugfs command for m7 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
      "imp_info" for it, and query it by command "cat imp_info",
      return the result to userspace, rather than record in dmesg.
      
      The display style is below:
      $cat imp_info
      offset | data
      0x0000 | 0x00000000  0x00000000
      0x0008 | 0x00000000  0x00000000
      0x0010 | 0x00000000  0x00000001
      0x0018 | 0x00000000  0x00000000
      0x0020 | 0x00000000  0x00000000
      0x0028 | 0x00000000  0x00000000
      0x0030 | 0x00000000  0x00000000
      Signed-off-by: Jiaran Zhang's avatarJiaran Zhang <zhangjiaran@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0b198b0d
    • Jiaran Zhang's avatar
      net: hns3: refactor dump reset info of debugfs · 1a7ff828
      Jiaran Zhang 提交于
      Currently, the debugfs command for reset 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
      "reset_info" for it, and query it by command "cat reset_info",
      return the result to userspace, rather than record in dmesg.
      
      The display style is below:
      $cat reset_info
      PF reset count: 0
      FLR reset count: 0
      GLOBAL reset count: 0
      IMP reset count: 0
      reset done count: 0
      HW reset done count: 0
      reset count: 0
      reset fail count: 0
      vector0 interrupt enable status: 0x1
      reset interrupt source: 0x0
      reset interrupt status: 0x0
      RAS interrupt status:0x0
      hardware reset status: 0x0
      handshake status: 0x80
      function reset status: 0x0
      
      Change to the "hclge_show_rst_info" in the "hclge_reset_err_handle",
      when the reset fails, display reset info immediately.
      Signed-off-by: Jiaran Zhang's avatarJiaran Zhang <zhangjiaran@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a7ff828
    • Jiaran Zhang's avatar
      net: hns3: refactor dump intr of debugfs · 9149ca0f
      Jiaran Zhang 提交于
      Currently, the debugfs command for intr is implemented by
      "echo xxxx > cmd", and record the information in dmesg. It's
      unnecessary and heavy. To improve it, create a single file
      "interrupt_info" for it, and query it by command "cat interrupt_info",
      return the result to userspace, rather than record in dmesg.
      
      The display style is below:
      $cat interrupt_info
      num_nic_msi: 65
      num_roce_msi: 65
      num_msi_used: 2
      num_msi_left: 128
      Signed-off-by: Jiaran Zhang's avatarJiaran Zhang <zhangjiaran@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9149ca0f
    • Y
      net: hns3: refactor dump loopback of debugfs · d658ff34
      Yufeng Mo 提交于
      Currently, the debugfs command for loopback is implemented by
      "echo xxxx > cmd", and record the information in dmesg. It's
      unnecessary and heavy. To improve it, create a single file
      "loopback" for it, and query it by command "cat loopback",
      return the result to userspace, rather than record in dmesg.
      
      The display style is below:
      $ cat loopback
      mac id: 0
      app loopback: off
      serdes serial loopback: off
      serdes parallel loopback: off
      Signed-off-by: NYufeng Mo <moyufeng@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d658ff34
    • Y
      net: hns3: refactor dump mng tbl of debugfs · 8ddfd9c4
      Yufeng Mo 提交于
      Currently, the debugfs command for mng tbl is implemented by
      "echo xxxx > cmd", and record the information in dmesg. It's
      unnecessary and heavy. To improve it, create a single file
      "mng_tbl" for it, and query it by command "cat mng_tbl",
      return the result to userspace, rather than record in dmesg.
      
      The display style is below:
      $ cat mng_tbl
      entry  mac_addr          mask  ether  mask  vlan  mask  i_map ...
      00     00:00:00:00:00:00 0     88cc   0     0000  1     0f    ...
      Signed-off-by: NYufeng Mo <moyufeng@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8ddfd9c4
    • H
      net: hns3: refactor dump mac list of debugfs · 1556ea91
      Huazhong Tan 提交于
      Currently, the debugfs command for mac list info is implemented
      by "echo xxxx > cmd", and record the information in dmesg. It's
      unnecessary and heavy. To improve it, create two files "uc" and
      "mc" under directory "mac_list" for it, and query mac list info
      by "cat mac_list/uc" and "mac_list/mc", return the result to
      userspace, rather than record in dmesg.
      
      The display style is below:
      $ cat mac_list/uc
      UC MAC_LIST:
      FUNC_ID  MAC_ADDR            STATE
      pf       00:18:2d:00:00:71   ACTIVE
      
      $ cat mac_list/mc
      MC MAC_LIST:
      FUNC_ID  MAC_ADDR            STATE
      pf       01:80:c2:00:00:21   ACTIVE
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1556ea91
    • Y
      net: hns3: refactor the debugfs process · 5e69ea7e
      Yufeng Mo 提交于
      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: NYufeng Mo <moyufeng@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5e69ea7e
  3. 27 3月, 2021 1 次提交
  4. 14 3月, 2021 1 次提交
  5. 13 2月, 2021 1 次提交
  6. 10 2月, 2021 1 次提交
  7. 07 2月, 2021 1 次提交
  8. 30 1月, 2021 1 次提交
  9. 10 12月, 2020 1 次提交
  10. 22 11月, 2020 2 次提交
  11. 25 9月, 2020 2 次提交
  12. 24 9月, 2020 1 次提交
    • R
      net: hns3: Constify static structs · e4b91468
      Rikard Falkeborn 提交于
      A number of static variables were not modified. Make them const to allow
      the compiler to put them in read-only memory. In order to do so,
      constify a couple of input pointers as well as some local pointers.
      This moves about 35Kb to read-only memory as seen by the output of the
      size command.
      
      Before:
         text    data     bss     dec     hex filename
       404938  111534     640  517112   7e3f8 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge.ko
      
      After:
         text    data     bss     dec     hex filename
       439499   76974     640  517113   7e3f9 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge.ko
      Signed-off-by: NRikard Falkeborn <rikard.falkeborn@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e4b91468
  13. 15 5月, 2020 1 次提交
  14. 11 5月, 2020 1 次提交
  15. 26 4月, 2020 1 次提交
  16. 21 4月, 2020 2 次提交
  17. 10 3月, 2020 4 次提交
  18. 20 2月, 2020 2 次提交
  19. 21 1月, 2020 1 次提交