Skip to content

fix bnxt_en queue reset when queue is active

David Wei netdev 4 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 4 repliesApplied 6/6
  2. v2 posting 2/24 patches 2 repliesSuperseded
  3. v2 posting 1/20 of 3 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches5 repliesSuperseded

Changes in v3 from the cover letter

- include patches from Michael Chan that adds a FW flag for vnic flush capability
- key support for queue_mgmt_ops behind this new flag

Patches in v3 All 6 applied

#Subject and filesSizeRepliesApplied
1/6bnxt_en: Update firmware interface to 1.10.3.68drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h+249 -1400 repliesApplied
2/6bnxt_en: Add support to call FW to update a VNICdrivers/net/ethernet/broadcom/bnxt/bnxt.c drivers/net/ethernet/broadcom/bnxt/bnxt.h+23 -00 repliesApplied
3/6bnxt_en: Check the FW's VNIC flush capabilitydrivers/net/ethernet/broadcom/bnxt/bnxt.c drivers/net/ethernet/broadcom/bnxt/bnxt.h+3 -00 repliesApplied
4/6bnxt_en: set vnic->mru in bnxt_hwrm_vnic_cfg()drivers/net/ethernet/broadcom/bnxt/bnxt.c+2 -10 repliesApplied
5/6bnxt_en: stop packet flow during bnxt_queue_stop/startdrivers/net/ethernet/broadcom/bnxt/bnxt.c+18 -40 repliesApplied
6/6bnxt_en: only set dev->queue_mgmt_ops if supported by FWdrivers/net/ethernet/broadcom/bnxt/bnxt.c drivers/net/ethernet/broadcom/bnxt/bnxt.h+5 -14 repliesApplied

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchWojciech Drewek
SeriesR-b
1/6
2/6
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH net-next v3 0/6] fix bnxt_en queue reset when queue is active

The current bnxt_en queue API implementation is buggy when resetting a queue that has active traffic. The problem is that there is no FW involved to stop the flow of packets and relying on napi_disable() isn't enough.

To fix this, call bnxt_hwrm_vnic_update() with MRU set to 0 for both the default and the ntuple vnic to stop the flow of packets. This works for any Rx queue and not only those that have ntuple rules since every Rx queue is either in the default or the ntuple vnic.

For bnxt_hwrm_vnic_update() to work, proper flushing must be done by the FW. A FW flag is there to indicate support and queue_mgmt_ops is keyed behind this.

The first three patches are from Michael Chan and adds the prerequisite vnic functions and FW flags indicating that it will properly flush during vnic update.

Tested on BCM957504 while iperf3 is active:

1. Reset a queue that has an ntuple rule steering flow into it
2. Reset all queues in order, one at a time

In both cases the flow is not interrupted.

Sending this to net-next as there is no in-tree kernel consumer of queue API just yet, and there is a patch that changes when the queue_mgmt_ops is registered.

---
v3:
- include patches from Michael Chan that adds a FW flag for vnic flush capability
- key support for queue_mgmt_ops behind this new flag

v2:
- split setting vnic->mru into a separate patch (Wojciech)
- clarify why napi_enable()/disable() is removed

David Wei (3):
bnxt_en: set vnic->mru in bnxt_hwrm_vnic_cfg()
bnxt_en: stop packet flow during bnxt_queue_stop/start
bnxt_en: only set dev->queue_mgmt_ops if supported by FW

Michael Chan (3):
bnxt_en: Update firmware interface to 1.10.3.68
bnxt_en: Add support to call FW to update a VNIC
bnxt_en: Check the FW's VNIC flush capability

 drivers/net/ethernet/broadcom/bnxt/bnxt.c     |  50 ++-
 drivers/net/ethernet/broadcom/bnxt/bnxt.h     |   7 +
 drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 389 +++++++++++-------
 3 files changed, 300 insertions(+), 146 deletions(-)
Signature · 1 line
2.43.5