]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
bnxt_en: Fix RSS context delete logic
authorPavan Chebbi <pavan.chebbi@broadcom.com>
Thu, 19 Feb 2026 18:53:11 +0000 (10:53 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 21 Feb 2026 00:34:47 +0000 (16:34 -0800)
commite123d9302d223767bd910bfbcfe607bae909f8ac
tree45ce872d7f9da0f59e479d310cee225c58684cf6
parent470c7ca2b4c3e3a51feeb952b7f97a775b5c49cd
bnxt_en: Fix RSS context delete logic

We need to free the corresponding RSS context VNIC
in FW everytime an RSS context is deleted in driver.
Commit 667ac333dbb7 added a check to delete the VNIC
in FW only when netif_running() is true to help delete
RSS contexts with interface down.

Having that condition will make the driver leak VNICs
in FW whenever close() happens with active RSS contexts.
On the subsequent open(), as part of RSS context restoration,
we will end up trying to create extra VNICs for which we
did not make any reservation. FW can fail this request,
thereby making us lose active RSS contexts.

Suppose an RSS context is deleted already and we try to
process a delete request again, then the HWRM functions
will check for validity of the request and they simply
return if the resource is already freed. So, even for
delete-when-down cases, netif_running() check is not
necessary.

Remove the netif_running() condition check when deleting
an RSS context.

Reported-by: Jakub Kicinski <kicinski@meta.com>
Fixes: 667ac333dbb7 ("eth: bnxt: allow deleting RSS contexts when the device is down")
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20260219185313.2682148-2-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c