1. 15 5月, 2020 1 次提交
  2. 26 4月, 2020 2 次提交
    • J
      net: hns3: optimize the filter table entries handling when resetting · 039ba863
      Jian Shen 提交于
      Currently, the PF driver removes all (including its VFs') MAC/VLAN
      flow director table entries when resetting, and restores them after
      reset completed.
      
      In fact, the hardware will clear all table entries only in IMP
      reset and global reset. So driver only needs to restore the table
      entries in these cases, and needs do nothing when PF reset, FLR
      or other function level reset.
      
      This patch optimizes it by removing unnecessary table entries clear
      and restoring handling in the reset flow, and doing the restoring
      after reset completed.
      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>
      039ba863
    • J
      net: hns3: refactor the MAC address configure · ee4bcd3b
      Jian Shen 提交于
      Currently, the HNS3 driver sync and unsync MAC address in function
      hns3_set_rx_mode(). For PF, it adds and deletes MAC address directly
      in the path of dev_set_rx_mode(). If failed, it won't retry until
      next calling of hns3_set_rx_mode(). On the other hand, if request
      add and remove a same address many times at a short interval, each
      request must be done one by one, can't be merged. For VF, it sends
      mailbox messages to PF to request adding or deleting MAC address in
      the path of function hns3_set_rx_mode(), no matter the address is
      configured success.
      
      This patch refines it by recording the MAC address in function
      hns3_set_rx_mode(), and updating MAC address in the service task.
      If failed, it will retry by the next calling of periodical service
      task. It also uses some state to mark the state of each MAC address
      in the MAC list, which can help merge configure request for a same
      address. With these changes, when global reset or IMP reset occurs,
      we can restore the MAC table with the MAC list.
      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>
      ee4bcd3b
  3. 21 4月, 2020 1 次提交
  4. 22 3月, 2020 3 次提交
  5. 13 3月, 2020 1 次提交
  6. 07 1月, 2020 1 次提交
  7. 21 12月, 2019 1 次提交
  8. 17 12月, 2019 1 次提交
    • Y
      net: hns3: remove mailbox and reset work in hclge_main · 1c6dfe6f
      Yunsheng Lin 提交于
      There are three work (mbx_service_task, service_task,
      rst_service_task) in the HNS3 driver, mbx_service_task is for
      handling mailbox work, service_task is for periodic management
      issue and rst_service_task is for reset related issue, which can
      be handled in a single work.
      
      This patch removes the mbx_service_task and rst_service_task
      work, and moves the related handling to the service_task work
      in order to remove concurrency between the three work and to
      improve efficiency.
      
      BTW, since stats_timer in struct hclge_hw_stats is not needed
      anymore, so removes the definition of struct hclge_hw_stats,
      and moves mac_stats into struct hclge_dev.
      Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1c6dfe6f
  9. 01 11月, 2019 2 次提交
  10. 09 10月, 2019 4 次提交
  11. 19 8月, 2019 1 次提交
  12. 02 8月, 2019 2 次提交
  13. 22 7月, 2019 1 次提交
  14. 06 7月, 2019 1 次提交
  15. 15 6月, 2019 1 次提交
  16. 10 6月, 2019 2 次提交
  17. 29 5月, 2019 1 次提交
  18. 04 5月, 2019 1 次提交
    • J
      net: hns3: add support for multiple media type · 88d10bd6
      Jian Shen 提交于
      Previously, we can only identify copper and fiber type, the
      supported link modes of port information are always showing
      SR type. This patch adds support for multiple media types,
      include SR, LR CR, KR. Driver needs to query the media type
      from firmware periodicly, and updates the port information.
      
      The new port information looks like this:
      Settings for eth0:
              Supported ports: [ FIBRE ]
              Supported link modes:   25000baseCR/Full
                                      25000baseSR/Full
                                      1000baseX/Full
                                      10000baseCR/Full
                                      10000baseSR/Full
                                      10000baseLR/Full
              Supported pause frame use: Symmetric
              Supports auto-negotiation: No
              Supported FEC modes: None BaseR
              Advertised link modes:  Not reported
              Advertised pause frame use: No
              Advertised auto-negotiation: No
              Advertised FEC modes: Not reported
              Speed: 10000Mb/s
              Duplex: Full
              Port: FIBRE
              PHYAD: 0
              Transceiver: internal
              Auto-negotiation: off
              Current message level: 0x00000036 (54)
                                     probe link ifdown ifup
              Link detected: yes
      
      In order to be compatible with old firmware which only support
      sfp speed, we remained using the same query command, and kept
      the former logic.
      Signed-off-by: NJian Shen <shenjian15@huawei.com>
      Signed-off-by: NPeng Li <lipeng321@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      88d10bd6
  19. 27 4月, 2019 1 次提交
  20. 15 4月, 2019 2 次提交
    • J
      net: hns3: fix set port based VLAN issue for VF · 92f11ea1
      Jian Shen 提交于
      In original codes, ndo_set_vf_vlan() in hns3 driver was implemented
      wrong. It adds or removes VLAN into VLAN filter for VF, but VF is
      unaware of it.
      
      This patch fixes it. When VF loads up, it firstly queries the port
      based VLAN state from PF. When user change port based VLAN state
      from PF, PF firstly checks whether the VF is alive. If the VF is
      alive, then PF notifies the VF the modification; otherwise PF
      configure the port based VLAN state directly.
      
      Fixes: 46a3df9f ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
      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>
      92f11ea1
    • J
      net: hns3: fix set port based VLAN for PF · 21e043cd
      Jian Shen 提交于
      In original codes, ndo_set_vf_vlan() in hns3 driver was implemented
      wrong. It adds or removes VLAN into VLAN filter for VF, but VF is
      unaware of it.
      
      Indeed, ndo_set_vf_vlan() is expected to enable or disable port based
      VLAN (hardware inserts a specified VLAN tag to all TX packets for a
      specified VF) . When enable port based VLAN, we use port based VLAN id
      as VLAN filter entry. When disable port based VLAN, we use VLAN id of
      VLAN device.
      
      This patch fixes it for PF, enable/disable port based VLAN when calls
      ndo_set_vf_vlan().
      
      Fixes: 46a3df9f ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
      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>
      21e043cd
  21. 05 4月, 2019 1 次提交
  22. 25 2月, 2019 2 次提交
  23. 22 2月, 2019 2 次提交
  24. 03 2月, 2019 1 次提交
  25. 31 1月, 2019 1 次提交
  26. 27 1月, 2019 1 次提交
  27. 16 12月, 2018 1 次提交
  28. 18 11月, 2018 1 次提交