1. 12 3月, 2021 2 次提交
  2. 01 3月, 2021 1 次提交
  3. 10 2月, 2021 1 次提交
  4. 07 2月, 2021 3 次提交
  5. 30 1月, 2021 1 次提交
  6. 10 12月, 2020 4 次提交
  7. 09 12月, 2020 2 次提交
    • G
      net: hns3: refine the VLAN tag handle for port based VLAN · 592b0179
      Guojia Liao 提交于
      For DEVICE_VERSION_V2, the hardware only supports max two layer
      VLAN tags, including port based tag inserted by hardware, tag in
      tx buffer descriptor(get from skb->tci) and tag in packet.
      
      For transmit packet:
      If port based VLAN disabled, and vf driver gets a VLAN tag from
      skb, the VLAN tag must be filled to the Outer_VLAN_TAG field
      (tag near to DMAC) of tx buffer descriptor, otherwise it may
      be inserted after the tag in packet.
      
      If port based VLAN enabled, and vf driver gets a VLAN tag from
      skb, the VLAN tag must be filled to the VLAN_TAG field (tag
      far to DMAC) of tx buffer descriptor, otherwise it may be
      conflicted with port based VLAN, and raise a hardware error.
      
      For receive packet:
      The hardware will strip the VLAN tags and fill them in the rx
      buffer descriptor, no matter port based VLAN enable or not.
      Because port based VLAN tag is useless for stack, so vf driver
      needs to discard the port based VLAN tag get from rx buffer
      descriptor when port based VLAN enabled.
      
      So vf must know about the port based VLAN state.
      
      For DEVICE_VERSION_V3, the hardware provides some new
      configuration to improve it.
      
      For transmit packet:
      When enable tag shift mode, hardware will handle the VLAN tag
      in outer_VLAN_TAG field as VLAN_TAG, so it won't conflict with
      port based VLAN. And hardware also make sure the tag before
      the tag in packet. So vf driver doesn't need to specify the tag
      position according to the port based VLAN state anymore.
      
      For receive packet:
      When enable discard mode, hardware will strip and discard the
      port based VLAN tag, so vf driver doesn't need to identify it
      from rx buffer descriptor.
      
      So modify the port based VLAN configuration, simplify the process
      for vf handling the VLAN tag.
      Signed-off-by: NGuojia Liao <liaoguojia@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      592b0179
    • G
      net: hns3: add support for extended promiscuous command · c43abe1a
      Guojia Liao 提交于
      For DEVICE_VERSION_V2, the hardware supports enable tx and rx
      promiscuous separately. But tx or rx promiscuous is active for
      unicast, multicast and broadcast promiscuous simultaneously.
      To support traffics between functions belong to the same port,
      we always enable tx promiscuous for broadcast promiscuous, so
      tx promiscuous for unicast and multicast promiscuous is also
      enabled.
      
      For DEVICE_VERSION_V3, the hardware decouples the above
      relationship. Tx unicast promiscuous, rx unicast promiscuous,
      tx multicast promiscuous, rx multicast promiscuous, tx broadcast
      promiscuous and rx broadcast promiscuous can be enabled separately.
      
      So add support for the new promiscuous command.
      Signed-off-by: NGuojia Liao <liaoguojia@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      c43abe1a
  8. 02 12月, 2020 2 次提交
  9. 22 11月, 2020 2 次提交
    • Y
      net: hns3: add support for pf querying new interrupt resources · 3a6863e4
      Yufeng Mo 提交于
      For HNAE3_DEVICE_VERSION_V3, a maximum of 1281 interrupt
      resources are supported. To utilize these new resources,
      extend the corresponding field or variable to 16bit type,
      and remove the restriction of NIC client that only use a
      maximum of 65 interrupt vectors. In addition, the I/O address
      of the extended interrupt resources are different, so an extra
      handler is needed.
      
      Currently, the total number of interrupts is the sum of RoCE's
      number and RoCE's offset (RoCE is in front of NIC), since
      the number of both NIC and RoCE are same. For readability,
      rewrite the corresponding field of the command, rename the
      RoCE's offset field as the number of NIC interrupts, then
      the total number of interrupts is sum of the number of RoCE
      and NIC, and replace vport->back with hdev in
      hclge_init_roce_base_info() for simplifying the code.
      Signed-off-by: NYufeng Mo <moyufeng@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      3a6863e4
    • Y
      net: hns3: add support for 1280 queues · 9a5ef4aa
      Yonglong Liu 提交于
      For DEVICE_VERSION_V1/2, there are total 1024 queues and
      queue sets. For DEVICE_VERSION_V3, it increases to 1280,
      and can be assigned to one pf, so remove the limitation
      of 1024.
      
      To keep compatible with DEVICE_VERSION_V1/2 and old driver
      version, the queue number is split into two part:
      tqp_num(range 0~1023) and ext_tqp_num(range 1024~1279).
      Signed-off-by: NYonglong Liu <liuyonglong@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      9a5ef4aa
  10. 18 11月, 2020 1 次提交
  11. 28 9月, 2020 5 次提交
  12. 25 9月, 2020 1 次提交
  13. 29 5月, 2020 1 次提交
  14. 11 5月, 2020 1 次提交
  15. 30 4月, 2020 1 次提交
  16. 21 4月, 2020 1 次提交
  17. 07 1月, 2020 1 次提交
  18. 06 11月, 2019 1 次提交
  19. 01 11月, 2019 2 次提交
  20. 22 10月, 2019 1 次提交
  21. 09 10月, 2019 2 次提交
  22. 30 8月, 2019 1 次提交
    • Y
      net: hns3: not allow SSU loopback while execute ethtool -t dev · dd2956ea
      Yufeng Mo 提交于
      The current loopback mode is to add 0x1F to the SMAC address
      as the DMAC address and enable the promiscuous mode.
      However, if the VF address is the same as the DMAC address,
      the loopback test fails.
      
      Loopback can be enabled in three places: SSU, MAC, and serdes.
      By default, SSU loopback is enabled, so if the SMAC and the DMAC
      are the same, the packets are looped back in the SSU. If SSU loopback
      is disabled, packets can reach MAC even if SMAC is the same as DMAC.
      
      Therefore, this patch disables the SSU loopback before the loopback
      test. In this way, the SMAC and DMAC can be the same, and the
      promiscuous mode does not need to be enabled. And this is not
      valid in version 0x20.
      
      This patch also uses a macro to replace 0x1F.
      
      Fixes: c39c4d98 ("net: hns3: Add mac loopback selftest support in hns3 driver")
      Signed-off-by: NYufeng Mo <moyufeng@huawei.com>
      Reviewed-by: NPeng Li <lipeng321@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dd2956ea
  23. 10 8月, 2019 1 次提交
  24. 02 8月, 2019 2 次提交
    • H
      net: hns3: clear reset interrupt status in hclge_irq_handle() · 72e2fb07
      Huazhong Tan 提交于
      Currently, the reset interrupt is cleared in the reset task, which
      is too late. Since, when the hardware finish the previous reset,
      it can begin to do a new global/IMP reset, if this new coming reset
      type is same as the previous one, the driver will clear them together,
      then driver can not get that there is another reset, but the hardware
      still wait for the driver to deal with the second one.
      
      So this patch clears PF's reset interrupt status in the
      hclge_irq_handle(), the hardware waits for handshaking from
      driver before doing reset, so the driver and hardware deal with reset
      one by one.
      
      BTW, when VF doing global/IMP reset, it reads PF's reset interrupt
      register to get that whether PF driver's re-initialization is done,
      since VF's re-initialization should be done after PF's. So we add
      a new command and a register bit to do that. When VF receive reset
      interrupt, it sets up this bit, and PF finishes re-initialization
      send command to clear this bit, then VF do re-initialization.
      
      Fixes: 4ed340ab ("net: hns3: Add reset process in hclge_main")
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Reviewed-by: NYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      72e2fb07
    • H
      net: hns3: fix some reset handshake issue · 6b428b4f
      Huazhong Tan 提交于
      Currently, the driver sets handshake status to tell the hardware
      that the driver have downed the netdev and it can continue with
      reset process. The driver will clear the handshake status when
      re-initializing the CMDQ, and does not recover this status
      when reset fail, which may cause the hardware to wait for
      the handshake status to be set and not being able to continue
      with reset process.
      
      So this patch delays clearing handshake status just before UP,
      and recovers this status when reset fail.
      
      BTW, this patch adds a new function hclge(vf)_reset_handshake() to
      deal with the reset handshake issue, and renames
      HCLGE(VF)_NIC_CMQ_ENABLE to HCLGE(VF)_NIC_SW_RST_RDY which
      represents this register bit more accurately.
      
      Fixes: ada13ee3 ("net: hns3: add handshake with hardware while doing reset")
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Reviewed-by: NPeng Li <lipeng321@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b428b4f