Message ID | 20240808051518.3580248-1-dw@davidwei.uk (mailing list archive) |
---|---|
Headers | show |
Series | fix bnxt_en queue reset when queue is active | expand |
Hello: This series was applied to netdev/net-next.git (main) by David S. Miller <davem@davemloft.net>: On Wed, 7 Aug 2024 22:15:12 -0700 you wrote: > 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. > > [...] Here is the summary with links: - [net-next,v3,1/6] bnxt_en: Update firmware interface to 1.10.3.68 https://git.kernel.org/netdev/net-next/c/fbda8ee64b74 - [net-next,v3,2/6] bnxt_en: Add support to call FW to update a VNIC https://git.kernel.org/netdev/net-next/c/f2878cdeb754 - [net-next,v3,3/6] bnxt_en: Check the FW's VNIC flush capability https://git.kernel.org/netdev/net-next/c/6e360862c087 - [net-next,v3,4/6] bnxt_en: set vnic->mru in bnxt_hwrm_vnic_cfg() https://git.kernel.org/netdev/net-next/c/d41575f76a6d - [net-next,v3,5/6] bnxt_en: stop packet flow during bnxt_queue_stop/start https://git.kernel.org/netdev/net-next/c/b9d2956e869c - [net-next,v3,6/6] bnxt_en: only set dev->queue_mgmt_ops if supported by FW https://git.kernel.org/netdev/net-next/c/97cbf3d0accc You are awesome, thank you!
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. Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> --- 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(-)