1. 07 9月, 2022 2 次提交
  2. 31 8月, 2022 3 次提交
  3. 13 6月, 2022 1 次提交
  4. 20 4月, 2022 1 次提交
  5. 31 3月, 2022 1 次提交
  6. 27 3月, 2022 1 次提交
  7. 07 2月, 2022 1 次提交
  8. 13 12月, 2021 1 次提交
  9. 24 11月, 2021 1 次提交
  10. 28 10月, 2021 1 次提交
  11. 27 10月, 2021 1 次提交
    • G
      net: hns3: fix pause config problem after autoneg disabled · 3bda2e5d
      Guangbin Huang 提交于
      If a TP port is configured by follow steps:
      1.ethtool -s ethx autoneg off speed 100 duplex full
      2.ethtool -A ethx rx on tx on
      3.ethtool -s ethx autoneg on(rx&tx negotiated pause results are off)
      4.ethtool -s ethx autoneg off speed 100 duplex full
      
      In step 3, driver will set rx&tx pause parameters of hardware to off as
      pause parameters negotiated with link partner are off.
      
      After step 4, the "ethtool -a ethx" command shows both rx and tx pause
      parameters are on. However, pause parameters of hardware are still off
      and port has no flow control function actually.
      
      To fix this problem, if autoneg is disabled, driver uses its saved
      parameters to restore pause of hardware. If the speed is not changed in
      this case, there is no link state changed for phy, it will cause the pause
      parameter is not taken effect, so we need to force phy to go down and up.
      
      Fixes: aacbe27e ("net: hns3: modify how pause options is displayed")
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3bda2e5d
  12. 25 10月, 2021 2 次提交
    • G
      net: hns3: device specifications add number of mac statistics · 4e4c03f6
      Guangbin Huang 提交于
      Currently, driver queries number of mac statistics before querying mac
      statistics. As the number of mac statistics is a fixed value in firmware,
      it is redundant to query this number everytime before querying mac
      statistics, it can just be queried once in initialization process and
      saved in device specifications.
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4e4c03f6
    • H
      net: hns3: add debugfs support for interrupt coalesce · c99fead7
      Huazhong Tan 提交于
      Since user may need to check the current configuration of the
      interrupt coalesce, so add debugfs support for query this info.
      
      Create a single file "coalesce_info" for it, and query it by
      "cat coalesce_info", return the result to userspace.
      
      For device whose version is above V3(include V3), the GL's register
      contains usecs and 1us unit configuration. When get the usecs
      configuration from this register, it will include the confusing unit
      configuration, so add a GL mask to get the correct value, and add
      a QL mask for the frames configuration as well.
      
      The display style is below:
      $ cat coalesce_info
      tx interrupt coalesce info:
      VEC_ID  ALGO_STATE  PROFILE_ID  CQE_MODE  TUNE_STATE  STEPS_LEFT...
      0       IN_PROG     4           EQE       ON_TOP      0...
      1       START       3           EQE       LEFT        1...
      
      rx interrupt coalesce info:
      VEC_ID  ALGO_STATE  PROFILE_ID  CQE_MODE  TUNE_STATE  STEPS_LEFT...
      0       IN_PROG     3           EQE       LEFT        1...
      1       IN_PROG     0           EQE       ON_TOP      0...
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c99fead7
  13. 20 10月, 2021 1 次提交
  14. 15 10月, 2021 1 次提交
  15. 12 10月, 2021 1 次提交
  16. 29 9月, 2021 1 次提交
  17. 14 9月, 2021 2 次提交
    • G
      net: hns3: PF support get multicast MAC address space assigned by firmware · 5c56ff48
      Guangbin Huang 提交于
      The new firmware supports to divides the whole multicast MAC address space
      equally to functions of all PFs, and calculates the space size of each PF
      according to its function number.
      
      To support this feature, PF driver adds querying multicast MAC address
      space size from firmware and limits used number according to space size.
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5c56ff48
    • G
      net: hns3: PF support get unicast MAC address space assigned by firmware · e435a6b5
      Guangbin Huang 提交于
      Currently, there are two ways for PF to set the unicast MAC address space
      size: specified by config parameters in firmware or set to default value.
      
      That's mean if the config parameters in firmware is zero, driver will
      divide the whole unicast MAC address space equally to 8 PFs. However, in
      this case, the unicast MAC address space will be wasted a lot when the
      hardware actually has less then 8 PFs. And in the other hand, if one PF has
      much more VFs than other PFs, then each function of this PF will has much
      less address space than other PFs.
      
      In order to ameliorate the above two situations, introduce the third way
      of unicast MAC address space assignment: firmware divides the whole unicast
      MAC address space equally to functions of all PFs, and calculates the space
      size of each PF according to its function number. PF queries the space size
      by the querying device specification command when in initialization
      process.
      
      The third way assignment is lower priority than specified by config
      parameters, only if the config parameters is zero can be used, and if
      firmware does not support the third way assignment, then driver still
      divides the whole unicast MAC address space equally to 8 PFs.
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e435a6b5
  18. 31 8月, 2021 1 次提交
  19. 24 8月, 2021 1 次提交
  20. 17 8月, 2021 1 次提交
  21. 29 6月, 2021 2 次提交
  22. 16 6月, 2021 2 次提交
  23. 12 6月, 2021 2 次提交
  24. 09 6月, 2021 1 次提交
  25. 08 6月, 2021 1 次提交
  26. 01 6月, 2021 3 次提交
    • J
      net: hns3: add debugfs support for vlan configuration · 0ca821da
      Jian Shen 提交于
      Add debugfs support for vlan configuraion. create a single file
      "vlan_config" for it, and query it by command "cat vlan_config",
      return the result to userspace.
      
      The new display style is below:
      $ cat vlan_config
      I_PORT_VLAN_FILTER: on
      E_PORT_VLAN_FILTER: off
      FUNC_ID  I_VF_VLAN_FILTER  E_VF_VLAN_FILTER  PORT_VLAN_FILTER_BYPASS
      pf       off               on                off
      vf0      off               on                off
      FUNC_ID  PVID    ACCEPT_TAG1  ACCEPT_TAG2  ACCEPT_UNTAG1  ACCEPT_UNTAG2
      pf       0       on           on           on             on
      vf0      0       on           on           on             on
      Signed-off-by: NJian Shen <shenjian15@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      0ca821da
    • J
      net: hns3: add query basic info support for VF · 32e6d104
      Jian Shen 提交于
      There are some features of VF depend on PF, so it's necessary
      for VF to know whether PF supports. For compatibility, modify
      the mailbox HCLGE_MBX_GET_TCINFO, extend its function, use to
      get the basic information of PF, including mailbox api version
      and PF capabilities.
      Signed-off-by: NJian Shen <shenjian15@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      32e6d104
    • J
      net: hns3: add support for modify VLAN filter state · 2ba30662
      Jian Shen 提交于
      Previously, with hardware limitation, the port VLAN filter are
      effective for both PF and its VFs simultaneously, so a single
      function is not able to enable/disable separately, and the VLAN
      filter state is default enabled. Now some device supports each
      function to bypass port VLAN filter, then each function can
      switch VLAN filter separately. Add capability flag to check
      whether the device supports modify VLAN filter state. If flag
      on, user will be able to modify the VLAN filter state by ethtool
      -K.
      
      Furtherly, the default VLAN filter state is also changed
      according to whether non-zero VLAN used. Then the device can
      receive packet with any VLAN tag if only VLAN 0 used.
      
      The function hclge_need_enable_vport_vlan_filter() is used to
      help implement above changes. And the VLAN filter handle for
      promisc mode can also be simplified by this function.
      Signed-off-by: NJian Shen <shenjian15@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      2ba30662
  27. 21 5月, 2021 4 次提交