1. 29 11月, 2021 2 次提交
  2. 27 11月, 2021 4 次提交
  3. 24 11月, 2021 4 次提交
  4. 22 11月, 2021 4 次提交
  5. 18 11月, 2021 1 次提交
  6. 17 11月, 2021 1 次提交
  7. 16 11月, 2021 1 次提交
  8. 10 11月, 2021 8 次提交
    • G
      net: hns3: allow configure ETS bandwidth of all TCs · 688db0c7
      Guangbin Huang 提交于
      Currently, driver only allow configuring ETS bandwidth of TCs according
      to the max TC number queried from firmware. However, the hardware actually
      supports 8 TCs and users may need to configure ETS bandwidth of all TCs,
      so remove the restriction.
      
      Fixes: 330baff5 ("net: hns3: add ETS TC weight setting in SSU module")
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      688db0c7
    • G
      net: hns3: remove check VF uc mac exist when set by PF · 91fcc79b
      Guangbin Huang 提交于
      If users set unicast mac address for VFs by PF, they need to guarantee all
      VFs' address is different. This patch removes the check mac address exist
      of VFs, for usrs can refresh mac addresses of all VFs directly without
      need to modify the exist mac address to other value firstly.
      
      Fixes: 8e6de441 ("net: hns3: add support for configuring VF MAC from the host")
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      91fcc79b
    • G
      net: hns3: fix some mac statistics is always 0 in device version V2 · 1122eac1
      Guangbin Huang 提交于
      When driver queries the register number of mac statistics from firmware,
      the old firmware runs in device version V2 only returns number of valid
      registers, not include number of three reserved registers among of them.
      It cause driver doesn't record the last three data when query mac
      statistics.
      
      To fix this problem, driver never query register number in device version
      V2 and set it to a fixed value which include three reserved registers.
      
      Fixes: c8af2887 ("net: hns3: add support pause/pfc durations for mac statistics")
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1122eac1
    • Y
      net: hns3: fix kernel crash when unload VF while it is being reset · e140c798
      Yufeng Mo 提交于
      When fully configure VLANs for a VF, then unload the VF while
      triggering a reset to PF, will cause a kernel crash because the
      irq is already uninit.
      
      [ 293.177579] ------------[ cut here ]------------
      [ 293.183502] kernel BUG at drivers/pci/msi.c:352!
      [ 293.189547] Internal error: Oops - BUG: 0 [#1] SMP
      ......
      [ 293.390124] Workqueue: hclgevf hclgevf_service_task [hclgevf]
      [ 293.402627] pstate: 80c00009 (Nzcv daif +PAN +UAO)
      [ 293.414324] pc : free_msi_irqs+0x19c/0x1b8
      [ 293.425429] lr : free_msi_irqs+0x18c/0x1b8
      [ 293.436545] sp : ffff00002716fbb0
      [ 293.446950] x29: ffff00002716fbb0 x28: 0000000000000000
      [ 293.459519] x27: 0000000000000000 x26: ffff45b91ea16b00
      [ 293.472183] x25: 0000000000000000 x24: ffffa587b08f4700
      [ 293.484717] x23: ffffc591ac30e000 x22: ffffa587b08f8428
      [ 293.497190] x21: ffffc591ac30e300 x20: 0000000000000000
      [ 293.509594] x19: ffffa58a062a8300 x18: 0000000000000000
      [ 293.521949] x17: 0000000000000000 x16: ffff45b91dcc3f48
      [ 293.534013] x15: 0000000000000000 x14: 0000000000000000
      [ 293.545883] x13: 0000000000000040 x12: 0000000000000228
      [ 293.557508] x11: 0000000000000020 x10: 0000000000000040
      [ 293.568889] x9 : ffff45b91ea1e190 x8 : ffffc591802d0000
      [ 293.580123] x7 : ffffc591802d0148 x6 : 0000000000000120
      [ 293.591190] x5 : ffffc591802d0000 x4 : 0000000000000000
      [ 293.602015] x3 : 0000000000000000 x2 : 0000000000000000
      [ 293.612624] x1 : 00000000000004a4 x0 : ffffa58a1e0c6b80
      [ 293.623028] Call trace:
      [ 293.630340] free_msi_irqs+0x19c/0x1b8
      [ 293.638849] pci_disable_msix+0x118/0x140
      [ 293.647452] pci_free_irq_vectors+0x20/0x38
      [ 293.656081] hclgevf_uninit_msi+0x44/0x58 [hclgevf]
      [ 293.665309] hclgevf_reset_rebuild+0x1ac/0x2e0 [hclgevf]
      [ 293.674866] hclgevf_reset+0x358/0x400 [hclgevf]
      [ 293.683545] hclgevf_reset_service_task+0xd0/0x1b0 [hclgevf]
      [ 293.693325] hclgevf_service_task+0x4c/0x2e8 [hclgevf]
      [ 293.702307] process_one_work+0x1b0/0x448
      [ 293.710034] worker_thread+0x54/0x468
      [ 293.717331] kthread+0x134/0x138
      [ 293.724114] ret_from_fork+0x10/0x18
      [ 293.731324] Code: f940b000 b4ffff00 a903e7b8 f90017b6 (d4210000)
      
      This patch fixes the problem by waiting for the VF reset done
      while unloading the VF.
      
      Fixes: e2cb1dec ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
      Signed-off-by: NYufeng Mo <moyufeng@huawei.com>
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e140c798
    • Y
      net: hns3: sync rx ring head in echo common pull · 3b6db4a0
      Yufeng Mo 提交于
      When the driver processes rx packets, the head pointer is updated only
      after the number of received packets reaches 16. However, hardware
      relies on the head pointer to calculate the number of FBDs. As a result,
      the hardware calculates the FBD incorrectly. Therefore, the driver
      proactively updates the head pointer in each common poll to ensure that
      the number of FBDs calculated by the hardware is correct.
      
      Fixes: 68752b24 ("net: hns3: schedule the polling again when allocation fails")
      Signed-off-by: NYufeng Mo <moyufeng@huawei.com>
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3b6db4a0
    • J
      net: hns3: fix pfc packet number incorrect after querying pfc parameters · 0b653a81
      Jie Wang 提交于
      Currently, driver will send command to firmware to query pfc packet number
      when user uses dcb tool to get pfc parameters. However, the periodic
      service task will also periodically query and record MAC statistics,
      including pfc packet number.
      
      As the hardware registers of statistics is cleared after reading, it will
      cause pfc packet number of MAC statistics are not correct after using dcb
      tool to get pfc parameters.
      
      To fix this problem, when user uses dcb tool to get pfc parameters, driver
      updates MAC statistics firstly and then get pfc packet number from MAC
      statistics.
      
      Fixes: 64fd2300 ("net: hns3: add support for querying pfc puase packets statistic")
      Signed-off-by: NJie Wang <wangjie125@huawei.com>
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0b653a81
    • J
      net: hns3: fix ROCE base interrupt vector initialization bug · beb27ca4
      Jie Wang 提交于
      Currently, NIC init ROCE interrupt vector with MSIX interrupt. But ROCE use
      pci_irq_vector() to get interrupt vector, which adds the relative interrupt
      vector again and gets wrong interrupt vector.
      
      So fixes it by assign relative interrupt vector to ROCE instead of MSIX
      interrupt vector and delete the unused struct member base_msi_vector
      declaration of hclgevf_dev.
      
      Fixes: 46a3df9f ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
      Signed-off-by: NJie Wang <wangjie125@huawei.com>
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      beb27ca4
    • G
      net: hns3: fix failed to add reuse multicast mac addr to hardware when mc mac table is full · 3b4c6566
      Guangbin Huang 提交于
      Currently, when driver is failed to add a new multicast mac address to
      hardware due to the multicast mac table is full, it will directly return.
      In this case, if the multicast mac list has some reuse addresses after the
      new address, those reuse addresses will never be added to hardware.
      
      To fix this problem, if function hclge_add_mc_addr_common() returns
      -ENOSPC, hclge_sync_vport_mac_list() should judge whether continue or
      stop to add next address.
      
      As function hclge_sync_vport_mac_list() needs parameter mac_type to know
      whether is uc or mc, refine this function to add parameter mac_type and
      remove parameter sync. So does function hclge_unsync_vport_mac_list().
      
      Fixes: ee4bcd3b ("net: hns3: refactor the MAC address configure")
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3b4c6566
  9. 08 11月, 2021 1 次提交
  10. 28 10月, 2021 1 次提交
  11. 27 10月, 2021 7 次提交
    • G
      net: hns3: adjust string spaces of some parameters of tx bd info in debugfs · 630a6738
      Guangbin Huang 提交于
      This patch adjusts the string spaces of some parameters of tx bd info in
      debugfs according to their maximum needs.
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      630a6738
    • G
      net: hns3: expand buffer len for some debugfs command · c7a6e397
      Guangbin Huang 提交于
      The specified buffer length for three debugfs files fd_tcam, uc and tqp
      is not enough for their maximum needs, so this patch fixes them.
      
      Fixes: b5a0b70d ("net: hns3: refactor dump fd tcam of debugfs")
      Fixes: 1556ea91 ("net: hns3: refactor dump mac list of debugfs")
      Fixes: d96b0e59 ("net: hns3: refactor dump reg of debugfs")
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c7a6e397
    • J
      net: hns3: add more string spaces for dumping packets number of queue info in debugfs · 6754614a
      Jie Wang 提交于
      As the width of packets number registers is 32 bits, they needs at most
      10 characters for decimal data printing, but now the string spaces is not
      enough, so this patch fixes it.
      
      Fixes: e44c495d ("net: hns3: refactor queue info of debugfs")
      Signed-off-by: NJie Wang <wangjie125@huawei.com>
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6754614a
    • J
      net: hns3: fix data endian problem of some functions of debugfs · 2a21dab5
      Jie Wang 提交于
      The member data in struct hclge_desc is type of __le32, it needs endian
      conversion before using it, and some functions of debugfs didn't do that,
      so this patch fixes it.
      
      Fixes: c0ebebb9 ("net: hns3: Add "dcb register" status information query function")
      Signed-off-by: NJie Wang <wangjie125@huawei.com>
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2a21dab5
    • G
      net: hns3: ignore reset event before initialization process is done · 0251d196
      Guangbin Huang 提交于
      Currently, if there is a reset event triggered by RAS during device in
      initialization process, driver may run reset process concurrently with
      initialization process. In this case, it may cause problem. For example,
      the RSS indirection table may has not been alloc memory in initialization
      process yet, but it is used in reset process, it will cause a call trace
      like this:
      
      [61228.744836] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
      ...
      [61228.897677] Workqueue: hclgevf hclgevf_service_task [hclgevf]
      [61228.911390] pstate: 40400009 (nZcv daif +PAN -UAO -TCO BTYPE=--)
      [61228.918670] pc : hclgevf_set_rss_indir_table+0xb4/0x190 [hclgevf]
      [61228.927812] lr : hclgevf_set_rss_indir_table+0x90/0x190 [hclgevf]
      [61228.937248] sp : ffff8000162ebb50
      [61228.941087] x29: ffff8000162ebb50 x28: ffffb77add72dbc0 x27: ffff0820c7dc8080
      [61228.949516] x26: 0000000000000000 x25: ffff0820ad4fc880 x24: ffff0820c7dc8080
      [61228.958220] x23: ffff0820c7dc8090 x22: 00000000ffffffff x21: 0000000000000040
      [61228.966360] x20: ffffb77add72b9c0 x19: 0000000000000000 x18: 0000000000000030
      [61228.974646] x17: 0000000000000000 x16: ffffb77ae713feb0 x15: ffff0820ad4fcce8
      [61228.982808] x14: ffffffffffffffff x13: ffff8000962eb7f7 x12: 00003834ec70c960
      [61228.991990] x11: 00e0fafa8c206982 x10: 9670facc78a8f9a8 x9 : ffffb77add717530
      [61229.001123] x8 : ffff0820ad4fd6b8 x7 : 0000000000000000 x6 : 0000000000000011
      [61229.010249] x5 : 00000000000cb1b0 x4 : 0000000000002adb x3 : 0000000000000049
      [61229.018662] x2 : ffff8000162ebbb8 x1 : 0000000000000000 x0 : 0000000000000480
      [61229.027002] Call trace:
      [61229.030177]  hclgevf_set_rss_indir_table+0xb4/0x190 [hclgevf]
      [61229.039009]  hclgevf_rss_init_hw+0x128/0x1b4 [hclgevf]
      [61229.046809]  hclgevf_reset_rebuild+0x17c/0x69c [hclgevf]
      [61229.053862]  hclgevf_reset_service_task+0x4cc/0xa80 [hclgevf]
      [61229.061306]  hclgevf_service_task+0x6c/0x630 [hclgevf]
      [61229.068491]  process_one_work+0x1dc/0x48c
      [61229.074121]  worker_thread+0x15c/0x464
      [61229.078562]  kthread+0x168/0x16c
      [61229.082873]  ret_from_fork+0x10/0x18
      [61229.088221] Code: 7900e7f6 f904a683 d503201f 9101a3e2 (38616b43)
      [61229.095357] ---[ end trace 153661a538f6768c ]---
      
      To fix this problem, don't schedule reset task before initialization
      process is done.
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0251d196
    • Y
      net: hns3: change hclge/hclgevf workqueue to WQ_UNBOUND mode · f29da408
      Yufeng Mo 提交于
      Currently, the workqueue of hclge/hclgevf is executed on
      the CPU that initiates scheduling requests by default. In
      stress scenarios, the CPU may be busy and workqueue scheduling
      is completed after a long period of time. To avoid this
      situation and implement proper scheduling, use the WQ_UNBOUND
      mode instead. In this way, the workqueue can be performed on
      a relatively idle CPU.
      Signed-off-by: NYufeng Mo <moyufeng@huawei.com>
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f29da408
    • 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 6 次提交