1. 08 12月, 2018 4 次提交
  2. 07 12月, 2018 1 次提交
  3. 04 12月, 2018 2 次提交
  4. 29 11月, 2018 1 次提交
  5. 28 11月, 2018 1 次提交
  6. 24 11月, 2018 8 次提交
    • L
      net: hns3: Add "qos buffer" config info query function · 7d9d7f88
      liuzhongzhu 提交于
      This patch prints qos buffer config information.
      
      debugfs command:
      echo dump qos buf cfg > cmd
      
      Sample Command:
      root@(none)# echo dump qos buf cfg > cmd
      hns3 0000:7d:00.0: dump qos buf cfg
      hns3 0000:7d:00.0: tx_packet_buf_tc_0: 0x1aa
      hns3 0000:7d:00.0: tx_packet_buf_tc_1: 0x0
      hns3 0000:7d:00.0: tx_packet_buf_tc_2: 0x0
      hns3 0000:7d:00.0: tx_packet_buf_tc_3: 0x0
      hns3 0000:7d:00.0: tx_packet_buf_tc_4: 0x0
      hns3 0000:7d:00.0: tx_packet_buf_tc_5: 0x0
      hns3 0000:7d:00.0: tx_packet_buf_tc_6: 0x0
      hns3 0000:7d:00.0: tx_packet_buf_tc_7: 0x0
      hns3 0000:7d:00.0:
      hns3 0000:7d:00.0: rx_packet_buf_tc_0: 0x130
      hns3 0000:7d:00.0: rx_packet_buf_tc_1: 0x0
      hns3 0000:7d:00.0: rx_packet_buf_tc_2: 0x0
      hns3 0000:7d:00.0: rx_packet_buf_tc_3: 0x0
      hns3 0000:7d:00.0: rx_packet_buf_tc_4: 0x0
      hns3 0000:7d:00.0: rx_packet_buf_tc_5: 0x0
      hns3 0000:7d:00.0: rx_packet_buf_tc_6: 0x0
      hns3 0000:7d:00.0: rx_packet_buf_tc_7: 0x0
      hns3 0000:7d:00.0: rx_share_buf: 0x1e0e
      root@(none)#
      Signed-off-by: Nliuzhongzhu <liuzhongzhu@huawei.com>
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7d9d7f88
    • L
      net: hns3: Add "qos prio map" info query function · 6fc22440
      liuzhongzhu 提交于
      This patch prints qos priority map information.
      
      debugfs command:
      echo dump qos pri map > cmd
      
      Sample Command:
      root@(none)# echo dump qos pri map > cmd
      hns3 0000:7d:00.0: dump qos pri map
      hns3 0000:7d:00.0: vlan_to_pri: 0x0
      hns3 0000:7d:00.0: pri_0_to_tc: 0x0
      hns3 0000:7d:00.0: pri_1_to_tc: 0x0
      hns3 0000:7d:00.0: pri_2_to_tc: 0x0
      hns3 0000:7d:00.0: pri_3_to_tc: 0x0
      hns3 0000:7d:00.0: pri_4_to_tc: 0x0
      hns3 0000:7d:00.0: pri_5_to_tc: 0x0
      hns3 0000:7d:00.0: pri_6_to_tc: 0x0
      hns3 0000:7d:00.0: pri_7_to_tc: 0x0
      root@(none)#
      Signed-off-by: Nliuzhongzhu <liuzhongzhu@huawei.com>
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6fc22440
    • L
      net: hns3: Add "qos pause" config info query function · d958919d
      liuzhongzhu 提交于
      This patch prints qos pause config information.
      
      debugfs command:
      echo dump qos pause cfg > cmd
      
      Sample Command:
      root@(none)# echo dump qos pause cfg > cmd
      hns3 0000:7d:00.0: dump qos pause cfg
      hns3 0000:7d:00.0: pause_trans_gap: 0xff
      hns3 0000:7d:00.0: pause_trans_time: 0xffff
      root@(none)#
      Signed-off-by: Nliuzhongzhu <liuzhongzhu@huawei.com>
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d958919d
    • L
      net: hns3: Add "tm config" info query function · 96227f4c
      liuzhongzhu 提交于
      This patch prints Transmit Module's Traffic sched
      related config information.
      
      debugfs command:
      echo dump tm > cmd
      
      Sample output:
      root@(none)# echo dump tm > cmd
      hns3 0000:7d:00.0: dump tm
      hns3 0000:7d:00.0: PG_TO_PRI gp_id: 0
      hns3 0000:7d:00.0: PG_TO_PRI map: 0x1
      hns3 0000:7d:00.0: QS_TO_PRI qs_id: 0
      hns3 0000:7d:00.0: QS_TO_PRI priority: 0
      hns3 0000:7d:00.0: QS_TO_PRI link_vld: 1
      hns3 0000:7d:00.0: NQ_TO_QS nq_id: 0
      hns3 0000:7d:00.0: NQ_TO_QS qset_id: 1024
      hns3 0000:7d:00.0: PG pg_id: 0
      hns3 0000:7d:00.0: PG dwrr: 100
      hns3 0000:7d:00.0: QS qs_id: 0
      hns3 0000:7d:00.0: QS dwrr: 100
      hns3 0000:7d:00.0: PRI pri_id: 0
      hns3 0000:7d:00.0: PRI dwrr: 100
      hns3 0000:7d:00.0: PRI_C pri_id: 0
      hns3 0000:7d:00.0: PRI_C pri_shapping: 0x2850000
      hns3 0000:7d:00.0: PRI_P pri_id: 0
      hns3 0000:7d:00.0: PRI_P pri_shapping: 0x2850796
      hns3 0000:7d:00.0: PG_C pg_id: 0
      hns3 0000:7d:00.0: PG_C pg_shapping: 0x2850000
      hns3 0000:7d:00.0: PG_P pg_id: 0
      hns3 0000:7d:00.0: PG_P pg_shapping: 0x2850496
      hns3 0000:7d:00.0: PORT port_shapping: 0x2850296
      hns3 0000:7d:00.0: PG_SCH pg_id: 0
      hns3 0000:7d:00.0: PRI_SCH pg_id: 0
      hns3 0000:7d:00.0: QS_SCH pg_id: 0
      hns3 0000:7d:00.0: BP_TO_QSET pg_id: 0
      hns3 0000:7d:00.0: BP_TO_QSET pg_shapping: 0x0
      hns3 0000:7d:00.0: BP_TO_QSET qs_bit_map: 0x0
      root@(none)#
      Signed-off-by: Nliuzhongzhu <liuzhongzhu@huawei.com>
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      96227f4c
    • L
      net: hns3: Add "tc config" info query function · 2849d4e7
      liuzhongzhu 提交于
      This patch prints tc config information.
      
      debugfs command:
      echo dump tc > cmd
      
      Sample Output:
      root@(none)# echo dump tc > cmd
      hns3 0000:7d:00.0: weight_offset: 14
      hns3 0000:7d:00.0: tc(0): no sp mode
      hns3 0000:7d:00.0: tc(1): no sp mode
      hns3 0000:7d:00.0: tc(2): no sp mode
      hns3 0000:7d:00.0: tc(3): no sp mode
      hns3 0000:7d:00.0: tc(4): no sp mode
      hns3 0000:7d:00.0: tc(5): no sp mode
      hns3 0000:7d:00.0: tc(6): no sp mode
      hns3 0000:7d:00.0: tc(7): no sp mode
      root@(none)#
      Signed-off-by: Nliuzhongzhu <liuzhongzhu@huawei.com>
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2849d4e7
    • L
      net: hns3: Add "FD flow table" info query function · 3c666b58
      liuzhongzhu 提交于
      All the Flow Director rules are stored in tcam blocks.
      For each bit of tcam entry, the match value
      depends on two input value(x, y).
      
      debugfs command:
      echo dump fd tcam > cmd
      
      Sample output:
      root@(none)# echo dump fd tcam > cmd
      hns3 0000:7d:00.0: read result tcam key x(31):
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 08000000
      hns3 0000:7d:00.0: 00000600
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: read result tcam key y(31):
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: f7ff0000
      hns3 0000:7d:00.0: 0000f900
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 00000000
      hns3 0000:7d:00.0: 0000fff8
      root@(none)#
      Signed-off-by: Nliuzhongzhu <liuzhongzhu@huawei.com>
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3c666b58
    • L
      net: hns3: Add "queue info" query function · 57ceee2c
      liuzhongzhu 提交于
      Query the queue information of the current NIC
      such as BD size, queue header and tail pointer.
      
      This  patch adds support for debugfs command:
      echo queue info 1 > cmd
      
      it can  print queue config information...
      
      root@(none)# echo queue info 1 > cmd
      hns3 0000:7d:00.0: queue info
      hns3 0000:7d:00.0: RX(1) BASE ADD: 0x00000000ffb58000
      hns3 0000:7d:00.0: RX(1) RING BD NUM: 127
      hns3 0000:7d:00.0: RX(1) RING BD LEN: 2
      hns3 0000:7d:00.0: RX(1) RING TAIL: 120
      hns3 0000:7d:00.0: RX(1) RING HEAD: 0
      hns3 0000:7d:00.0: RX(1) RING FBDNUM: 0
      hns3 0000:7d:00.0: RX(1) RING PKTNUM: 0
      hns3 0000:7d:00.0: TX(1) BASE ADD: 0x00000000fffd8000
      hns3 0000:7d:00.0: TX(1) RING BD NUM: 127
      hns3 0000:7d:00.0: TX(1) RING TC: 0
      hns3 0000:7d:00.0: TX(1) RING TAIL: 2
      hns3 0000:7d:00.0: TX(1) RING HEAD: 2
      hns3 0000:7d:00.0: TX(1) RING FBDNUM: 0
      hns3 0000:7d:00.0: TX(1) RING OFFSET: 0
      hns3 0000:7d:00.0: TX(1) RING PKTNUM: 0
      root@(none)#
      Signed-off-by: Nliuzhongzhu <liuzhongzhu@huawei.com>
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      57ceee2c
    • L
      net: hns3: Add debugfs framework registration · b2292360
      liuzhongzhu 提交于
      Add the debugfs framework to the driver and create a debugfs
      command interface for each device.
      
      example command:
      "echo queue info > cmd" Query the packet forwarding queue information.
      Signed-off-by: Nliuzhongzhu <liuzhongzhu@huawei.com>
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b2292360
  7. 20 11月, 2018 1 次提交
    • Y
      net: hns3: add common validation in hclge_dcb · e432abfb
      Yunsheng Lin 提交于
      Before setting tm related configuration to hardware, driver
      needs to check the configuration provided by user is valid.
      Currently hclge_ieee_setets and hclge_setup_tc both implement
      their own checking, which has a lot in common.
      
      This patch addes hclge_dcb_common_validate to do the common
      checking. The checking in hclge_tm_prio_tc_info_update
      and hclge_tm_schd_info_update is unnecessary now, so change
      the return type to void, which removes the need to do error
      handling when one of the checking fails.
      
      Also, ets->prio_tc is indexed by user prio and ets->tc_tsa is
      indexed by tc num, so this patch changes them to use different
      index.
      Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: NTan Xiaojun <tanxiaojun@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e432abfb
  8. 18 11月, 2018 5 次提交
  9. 17 11月, 2018 1 次提交
  10. 16 11月, 2018 5 次提交
  11. 12 11月, 2018 1 次提交
  12. 10 11月, 2018 10 次提交
    • H
      net: hns3: add PCIe FLR support for VF · 6ff3cf07
      Huazhong Tan 提交于
      This patch implements the .reset_prepare and .reset_done
      ops from pci framework to support the VF FLR.
      
      This patch uses hclgevf_set_def_reset_request() and
      hclgevf_reset_event() to handle FLR, so when
      hdev->default_reset_request is non zero, it means there is
      some reset requseted by hclgevf_set_def_reset_request() need
      to be processed. Also get the hdev from the ae_dev because
      hclgevf_reset_event is called with handle being NULL.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6ff3cf07
    • H
      net: hns3: do VF's pci re-initialization while PF doing FLR · 862d969a
      Huazhong Tan 提交于
      While doing PF FLR, VF's PCIe configuration space will be cleared, so
      the pci and vector of VF should be re-initialized in the VF's reset
      process while PF doing FLR.
      
      Also, this patch fixes some memory not freed problem when pci
      re-initialization is done during reset process.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      862d969a
    • H
      net: hns3: add PCIe FLR support for PF · 6b9a97ee
      Huazhong Tan 提交于
      This patch implements the .reset_prepare and .reset_done
      ops from pci framework to support the PF FLR.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b9a97ee
    • H
      net: hns3: implement the IMP reset processing for PF · 6dd22bbc
      Huazhong Tan 提交于
      The current code only print the prompt message after receiving
      the IMP reset interrupt and does not perform the corresponding driver
      reset operation. This patch implements the missing IMP reset handling
      in the driver.
      1. The driver sets the HCLGE_STATE_CMD_DISABLE to stop sending command
         after receiving the IMP reset interrupt.
      2. The driver needs to notify the hardware to reload the IMP firmware.
      3. The IMP firmware reloading makes the reset time of hardware longer,
         so it is necessary to extend the driver's waiting time to wait for
         the hardware reset to complete.
      4. In hclge_check_event_cause, IMP reset event should have higher
         priority than other events.
      
      Also, after clearing HCLGE_STATE_CMD_DISABLE in the hclge_cmd_init(),
      it needs to check whether there is a pending reset, if so, just set
      the HCLGE_STATE_CMD_DISABLE back and return.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6dd22bbc
    • H
      net: hns3: stop napi polling when HNS3_NIC_STATE_DOWN is set · ff0699e0
      Huazhong Tan 提交于
      When calling napi_disable during reset down process, if NAPIF_STATE_MISSED
      is set, napi_complete will call __napi_schedule to do the polling again.
      So this patch uses HNS3_NIC_STATE_DOWN to ensure the polling is not
      scheduled again.
      
      Also, when napi_complete returns true, it means polling is scheduled
      again, it is not neccssary to enable the interrupt.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ff0699e0
    • H
      net: hns3: add error handler for hclgevf_reset() · 6a5f6fa3
      Huazhong Tan 提交于
      Since hclgevf_reset() may fail for some reasons, so it needs an error
      handler to deal with it. When VF reset failed, VF can only be restored
      by a higher level reset asserted by PF. So, it needs to reinitialize
      its command queue, then it can respond to higher level reset.
      
      Also, this patch adds error logging in the hclgevf_notify_client().
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6a5f6fa3
    • H
      net: hns3: stop handling command queue while resetting VF · ef5f8e50
      Huazhong Tan 提交于
      According to hardware's description, after the reset occurs, the driver
      needs to re-initialize the command queue before sending and receiving
      any commands. Therefore, the VF's driver needs to identify the command
      queue needs to re-initialize with HCLGEVF_STATE_CMD_DISABLE, and does
      not allow sending or receiving commands before the re-initialization.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef5f8e50
    • H
      net: hns3: add reset handling for VF when doing Core/Global/IMP reset · b90fcc5b
      Huazhong Tan 提交于
      When a Core/Global/IMP reset occurs, the hardware sets the reset status
      register of all PF/VF and reports a reset interrupt to all PF/VF and
      firmware.
      
      When receiving the reset interrupt:
      1. The firmware will wait for 100 ms before resetting the hardware and
         clear the reset status register of all PF when hardware reset is done.
      2. The PF/VF driver needs to down the netdev within 100 ms and then wait
         for hardware reset to finish.
      3. After firmware clearing the reset status register of all PF, the PF
         driver reinitializes the hardware and clear the reset status register
         of it's VF.
      4. After PF driver clearing the reset status register of VF, the VF driver
         reinitializes the hardware.
      
      This patch mainly add handling for the step 4.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b90fcc5b
    • H
      net: hns3: add reset handling for VF when doing PF reset · aa5c4f17
      Huazhong Tan 提交于
      When PF performs a function reset, the hardware will reset both PF
      and all the VF belong to this PF. Hence, both PF's driver and VF's
      driver need to perform corresponding reset operations.
      
      Before PF driver asserting function reset to hardware, it firstly
      set up VF's hardware reset status, and inform the VF driver with
      HNAE3_VF_PF_FUNC_RESET, then VF driver sets this reset type to
      reset_pending and shechule reset task to stop IO and waits for the
      hardware reset status to clear. When PF driver has reinitialized the
      hardware and is ready to process mailbox from VF, PF driver clears
      VF's hardware reset status for VF to continue its reset process.
      
      Also, this patch uses readl_poll_timeout to simplify the hardware reset
      status waitting.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aa5c4f17
    • H
      net: hns3: adjust VF's reset process · dea846e8
      Huazhong Tan 提交于
      Currently when VF need to reset itself, it will send a cmd to PF,
      after receiving the VF reset requset, PF sends a cmd to inform
      VF to enter the reset process and send a cmd to firmware to do the
      actual reset for the VF, it is possible that firmware has resetted
      the VF, but VF has not entered the reset process, which may cause
      IO not stopped problem when firmware is resetting VF.
      
      This patch fixes it by adjusting the VF reset process, when VF
      need to reset itself, it will enter the reset process first, and
      it will tell the PF to send cmd to firmware to reset itself.
      
      Add member reset_pending to struct hclgevf_dev, which indicates that
      there is reset event need to be processed by the VF's reset task, and
      the VF's reset task chooses the highest-level one and clears other
      low-level one when it processes reset_pending.
      
      hclge_inform_reset_assert_to_vf function is unused now, but it will
      be used to support the PF reset with VF working, so declare it in
      the header file.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dea846e8