]> www.infradead.org Git - users/dwmw2/linux.git/commit
Merge branch 'bnxt_en-fix-queue-reset-when-queue-active'
authorDavid S. Miller <davem@davemloft.net>
Sun, 11 Aug 2024 12:48:03 +0000 (13:48 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Aug 2024 12:48:03 +0000 (13:48 +0100)
commit80d021bc572fbf1b59b029672df5be069dd078ae
treeebbe506d9b8fe651ac16ad734933ed07555ad0b2
parent969afb4347130b7dfd5b652aa60560cf60e214d8
parent97cbf3d0accce0f29db0be3ac1b50d9d561d3206
Merge branch 'bnxt_en-fix-queue-reset-when-queue-active'

David Wei says:

====================
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.

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
====================

Signed-off-by: David S. Miller <davem@davemloft.net>