Skip to content

net: hns3: Refactors "reset" handling code in HCLGE layer of HNS3 driver

Salil Mehta linux-rdma lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 2 repliesIn review
  2. v11 patch 2 repliesSuperseded

Change Log from the cover letter

Patch V2: Addressed comment by Andrew Lunn

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net: hns3: Refactor of the reset interrupt handling logicdrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h+78 -320 replies
2/3net: hns3: Add reset service task for handling reset requestsdrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h+34 -110 replies
3/3net: hns3: Refactors the requested reset & pending reset handling codedrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h+65 -360 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH V2 net-next 0/3] net: hns3: Refactors "reset" handling code in HCLGE layer of HNS3 driver

This patch refactors the code of the reset feature in HCLGE layer of HNS3 PF driver. Prime motivation to do this change is:
1. To reduce the time for which common miscellaneous Vector 0 interrupt is disabled because of the reset. Simplification of the common miscellaneous interrupt handler routine(for Vector 0) used to handle reset and other sources of Vector 0 interrupt.
2. Separate the task for handling the reset
3. Simplification of reset request submission and pending reset logic.

To achieve above below few things have been done:
1. Interrupt is disabled while common miscellaneous interrupt handler is entered and re-enabled before it is exit. This reduces the interrupt handling latency as compared to older interrupt handling scheme where interrupt was being disabled in interrupt handler context and re-enabled in task context some time later. Made Miscellaneous interrupt handler more generic to handle all sources including reset interrupt source.
2. New reset service task has been introduced to service the reset handling.
3. Introduces new reset service task for honoring software reset requests like from network stack related to timeout and serving the pending reset request(to reset the driver and associated clients).

Change Log:
Patch V2: Addressed comment by Andrew Lunn

Patch V1: Initial Submit

Salil Mehta (3):
net: hns3: Refactor of the reset interrupt handling logic
net: hns3: Add reset service task for handling reset requests
net: hns3: Refactors the requested reset & pending reset handling code

 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c    | 222 ++++++++++++++-------
 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h    |  12 +-
 2 files changed, 166 insertions(+), 68 deletions(-)
Signature · 1 line
2.11.0