1. 10 11月, 2021 1 次提交
  2. 27 10月, 2021 1 次提交
  3. 25 10月, 2021 2 次提交
    • G
      net: hns3: add support pause/pfc durations for mac statistics · c8af2887
      Guangbin Huang 提交于
      The mac statistics add pause/pfc durations in device version V3, we can
      get total active cycle of pause/pfc from these durations.
      
      As driver gets register number from firmware to calculate desc number to
      query mac statistics, it needs to set mac statistics extended enable bit
      in firmware command 0x701A to tell firmware that driver supports extended
      mac statistics, otherwise firmware only returns register number of
      version V1.
      
      As pause/pfc durations are not supported by hardware of old version, they
      should not been shown in command "ethtool -S ethX" in this case, so add
      checking max register number of each mac statistic in their version.
      If the max register number of one mac statistic is greater than register
      number got from firmware, it means hardware does not support this mac
      statistic, so ignore this statistic when get string and data of mac
      statistic.
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c8af2887
    • G
      net: hns3: modify mac statistics update process for compatibility · 0bd7e894
      Guangbin Huang 提交于
      After querying mac statistics from firmware, driver copies data from
      descriptors to struct mac_stats of hdev, and the number of copied data
      is just according to the register number queried from firmware. There is
      a problem that if the register number queried from firmware is larger
      than data number of struct mac_stats, it will cause a copy overflow.
      
      So if the firmware adds more mac statistics in later version, it is not
      compatible with driver of old version.
      
      To fix this problem, the number of copied data needs to be used the
      minimum value between the register number queried from firmware and
      data number of struct mac_stats.
      
      The first descriptor has three data and there is one reserved, to
      optimize the copy process, add this reserverd data to struct mac_stats.
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0bd7e894
  4. 14 9月, 2021 1 次提交
  5. 28 8月, 2021 1 次提交
  6. 27 8月, 2021 1 次提交
  7. 26 8月, 2021 1 次提交
  8. 12 8月, 2021 1 次提交
  9. 26 7月, 2021 1 次提交
  10. 16 6月, 2021 1 次提交
  11. 12 6月, 2021 1 次提交
  12. 09 6月, 2021 1 次提交
  13. 08 6月, 2021 1 次提交
  14. 01 6月, 2021 5 次提交
  15. 25 5月, 2021 2 次提交
  16. 21 5月, 2021 1 次提交
  17. 15 5月, 2021 3 次提交
    • 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
    • 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: 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
  18. 16 4月, 2021 1 次提交
  19. 30 3月, 2021 1 次提交
  20. 27 3月, 2021 1 次提交
  21. 23 3月, 2021 3 次提交
    • J
      net: hns3: add support for user-def data of flow director · 67b0e142
      Jian Shen 提交于
      For DEVICE_VERSION_V3, the hardware supports to match specified
      data in the specified offset of packet payload. Each layer can
      have one offset, and can't be masked when configure flow director
      rule by ethtool command. The layer is selected based on the
      flow-type, ether for L2, ip4/ipv6 for L3, and tcp4/tcp6/udp4/udp6
      for L4. For example, tcp4/tcp6/udp4/udp6 rules share the same
      user-def offset, but each rule can have its own user-def value.
      
      For the user-def field of ethtool -N/U command is 64 bits long.
      The bit 0~15 is used for user-def value, and bit 32~47 for user-def
      offset in HNS3 driver.
      Signed-off-by: NJian Shen <shenjian15@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      67b0e142
    • J
      net: hns3: refactor flow director configuration · fc4243b8
      Jian Shen 提交于
      Currently, the flow director rule of aRFS is configured in
      the IO path. It's time-consuming. So move out the configuration,
      and configure it asynchronously. And keep ethtool and tc flower
      rule using synchronous way, otherwise the application maybe
      unable to know the rule is installed or pending.
      
      Add a state member for each flow director rule to indicate the
      rule state. There are 4 states:
      TO_ADD: the rule is waiting to add to hardware
      TO_DEL: the rule is waiting to remove from hardware
      DELETED: the rule has been removed from hardware. It's a middle
              state, used to remove the rule node in the fd_rule_list.
      ACTIVE: the rule is already added in hardware
      
      For asynchronous way, when receive a new request to add or delete
      flow director rule by aRFS, update the rule list, then request to
      schedule the service task to finish the configuration.
      
      For synchronous way, when receive a new request to add or delete
      flow director rule by ethtool or tc flower, configure hardware
      directly, then update the rule list if success.
      Signed-off-by: NJian Shen <shenjian15@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fc4243b8
    • J
      net: hns3: refactor for function hclge_fd_convert_tuple · fb72699d
      Jian Shen 提交于
      Currently, there are too many branches for hclge_fd_convert_tuple().
      And it may be more when add new tuples. Refactor it by sorting the
      tuples according to their length. So it only needs several KEY_OPT
      now, and being flexible to add new tuples.
      Signed-off-by: NJian Shen <shenjian15@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fb72699d
  22. 10 2月, 2021 2 次提交
  23. 07 2月, 2021 3 次提交
  24. 30 1月, 2021 1 次提交
  25. 06 1月, 2021 1 次提交
  26. 10 12月, 2020 2 次提交