1. 21 5月, 2021 1 次提交
    • 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 12 次提交
    • 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
    • H
      net: hns3: refactor dump bd info of debugfs · 77e91848
      Huazhong Tan 提交于
      Currently, the debugfs command for bd info is implemented
      by "echo xxxx > cmd", and record the information in dmesg.
      It's unnecessary and heavy.
      
      To improve it, add two debugfs directories "tx_bd_info" and
      "rx_bd_info", and create a file for each queue under these
      two directories, and query the bd info of specific queue by
      "cat tx_bd_info/tx_bd_queue*" or "cat rx_bd_info/rx_bd_queue*",
      return the result to userspace, rather than record in dmesg.
      
      The display style is below:
      $ cat rx_bd_info/rx_bd_queue0
      Queue 0 rx bd info:
      BD_IDX   L234_INFO  PKT_LEN   SIZE...
      0        0x0             60     60...
      1        0x0           1512   1512...
      
      $ cat tx_bd_info/tx_bd_queue0
      Queue 0 tx bd info:
      BD_IDX     ADDRESS  VLAN_TAG  SIZE...
      0          0x0          0        0...
      1          0x0          0        0...
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      77e91848
    • Jiaran Zhang's avatar
      net: hns3: refactor dev capability and dev spec of debugfs · c929bc2a
      Jiaran Zhang 提交于
      Currently, the debugfs command for dev capability and dev spec
      are implemented by "echo xxxx > cmd", and record the information
      in dmesg. It's unnecessary and heavy. To improve it, create a
      single file "dev_info" for them, and query them by command
      "cat dev_info", return the result to userspace, rather than
      record in dmesg.
      
      The display style is below:
      $cat dev_info
      dev capability:
      support FD: yes
      support GRO: yes
      support FEC: yes
      support UDP GSO: no
      support PTP: no
      support INT QL: no
      support HW TX csum: no
      support UDP tunnel csum: no
      support TX push: no
      support imp-controlled PHY: no
      support rxd advanced layout: no
      
      dev spec:
      MAC entry num: 0
      MNG entry num: 0
      MAX non tso bd num: 8
      RSS ind tbl size: 512
      RSS key size: 40
      RSS size: 1
      Allocated RSS size: 0
      Task queue pairs numbers: 1
      RX buffer length: 2048
      Desc num per TX queue: 1024
      Desc num per RX queue: 1024
      Total number of enabled TCs: 1
      MAX INT QL: 0
      MAX INT GL: 8160
      MAX TM RATE: 100000
      MAX QSET number: 1024
      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>
      c929bc2a
    • 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
    • H
      net: hns3: refactor out RX completion checksum · 1ddc028a
      Huazhong Tan 提交于
      Only when RXD advanced layout is enabled, in some cases
      (e.g. ip fragments), the checksum of entire packet will be
      calculated and filled in the least significant 16 bits of
      the unused addr field.
      
      So refactor out the handling of RX completion checksum: adjust
      the location of the checksum in RX descriptor, and use ptype table
      to identify whether this kind of checksum is calculated.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ddc028a
    • H
      net: hns3: support RXD advanced layout · 79664077
      Huazhong Tan 提交于
      Currently, the driver gets packet type by parsing the
      L3_ID/L4_ID/OL3_ID/OL4_ID from RX descriptor, it's
      time-consuming.
      
      Now some new devices support RXD advanced layout, which combines
      previous OL3_ID/OL4_ID to 8bit ptype field, so the driver gets
      packet type by looking up only one table, and L3_ID/L4_ID become
      reserved fields.
      
      Considering compatibility, the firmware will report capability of
      RXD advanced layout, the driver will identify and enable it by
      default. This patch provides basic function: identify and enable
      the RXD advanced layout, and refactor out hns3_rx_checksum() by
      using ptype table to handle RX checksum if supported.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      79664077
  3. 01 5月, 2021 4 次提交
  4. 30 4月, 2021 3 次提交
  5. 20 4月, 2021 3 次提交
  6. 16 4月, 2021 2 次提交
  7. 13 4月, 2021 1 次提交
  8. 10 4月, 2021 1 次提交
  9. 09 4月, 2021 2 次提交
  10. 07 4月, 2021 1 次提交
  11. 06 4月, 2021 3 次提交
  12. 30 3月, 2021 7 次提交