Commit bf301629 authored by Jakub Kicinski's avatar Jakub Kicinski

eth: bnxt: depend on core cleaning up RSS contexts

New RSS context API removes old contexts on netdev unregister.
No need to wipe them manually.
Reviewed-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
Link: https://patch.msgid.link/20240711220713.283778-7-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1a49a23c
...@@ -10274,12 +10274,12 @@ struct bnxt_rss_ctx *bnxt_alloc_rss_ctx(struct bnxt *bp) ...@@ -10274,12 +10274,12 @@ struct bnxt_rss_ctx *bnxt_alloc_rss_ctx(struct bnxt *bp)
return rss_ctx; return rss_ctx;
} }
void bnxt_clear_rss_ctxs(struct bnxt *bp, bool all) void bnxt_clear_rss_ctxs(struct bnxt *bp)
{ {
struct bnxt_rss_ctx *rss_ctx, *tmp; struct bnxt_rss_ctx *rss_ctx, *tmp;
list_for_each_entry_safe(rss_ctx, tmp, &bp->rss_ctx_list, list) list_for_each_entry_safe(rss_ctx, tmp, &bp->rss_ctx_list, list)
bnxt_del_one_rss_ctx(bp, rss_ctx, all); bnxt_del_one_rss_ctx(bp, rss_ctx, false);
} }
static void bnxt_init_multi_rss_ctx(struct bnxt *bp) static void bnxt_init_multi_rss_ctx(struct bnxt *bp)
...@@ -12331,7 +12331,7 @@ static void __bnxt_close_nic(struct bnxt *bp, bool irq_re_init, ...@@ -12331,7 +12331,7 @@ static void __bnxt_close_nic(struct bnxt *bp, bool irq_re_init,
msleep(20); msleep(20);
if (BNXT_SUPPORTS_MULTI_RSS_CTX(bp)) if (BNXT_SUPPORTS_MULTI_RSS_CTX(bp))
bnxt_clear_rss_ctxs(bp, false); bnxt_clear_rss_ctxs(bp);
/* Flush rings and disable interrupts */ /* Flush rings and disable interrupts */
bnxt_shutdown_nic(bp, irq_re_init); bnxt_shutdown_nic(bp, irq_re_init);
...@@ -15246,8 +15246,7 @@ static void bnxt_remove_one(struct pci_dev *pdev) ...@@ -15246,8 +15246,7 @@ static void bnxt_remove_one(struct pci_dev *pdev)
bnxt_free_l2_filters(bp, true); bnxt_free_l2_filters(bp, true);
bnxt_free_ntp_fltrs(bp, true); bnxt_free_ntp_fltrs(bp, true);
if (BNXT_SUPPORTS_MULTI_RSS_CTX(bp)) WARN_ON(bp->num_rss_ctx);
bnxt_clear_rss_ctxs(bp, true);
clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state); clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state);
/* Flush any pending tasks */ /* Flush any pending tasks */
cancel_work_sync(&bp->sp_task); cancel_work_sync(&bp->sp_task);
...@@ -15898,8 +15897,6 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -15898,8 +15897,6 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
bnxt_clear_int_mode(bp); bnxt_clear_int_mode(bp);
init_err_pci_clean: init_err_pci_clean:
if (BNXT_SUPPORTS_MULTI_RSS_CTX(bp))
bnxt_clear_rss_ctxs(bp, true);
bnxt_hwrm_func_drv_unrgtr(bp); bnxt_hwrm_func_drv_unrgtr(bp);
bnxt_free_hwrm_resources(bp); bnxt_free_hwrm_resources(bp);
bnxt_hwmon_uninit(bp); bnxt_hwmon_uninit(bp);
......
...@@ -2847,7 +2847,7 @@ int __bnxt_setup_vnic_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic); ...@@ -2847,7 +2847,7 @@ int __bnxt_setup_vnic_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic);
void bnxt_del_one_rss_ctx(struct bnxt *bp, struct bnxt_rss_ctx *rss_ctx, void bnxt_del_one_rss_ctx(struct bnxt *bp, struct bnxt_rss_ctx *rss_ctx,
bool all); bool all);
struct bnxt_rss_ctx *bnxt_alloc_rss_ctx(struct bnxt *bp); struct bnxt_rss_ctx *bnxt_alloc_rss_ctx(struct bnxt *bp);
void bnxt_clear_rss_ctxs(struct bnxt *bp, bool all); void bnxt_clear_rss_ctxs(struct bnxt *bp);
int bnxt_open_nic(struct bnxt *, bool, bool); int bnxt_open_nic(struct bnxt *, bool, bool);
int bnxt_half_open_nic(struct bnxt *bp); int bnxt_half_open_nic(struct bnxt *bp);
void bnxt_half_close_nic(struct bnxt *bp); void bnxt_half_close_nic(struct bnxt *bp);
......
...@@ -976,7 +976,7 @@ static int bnxt_set_channels(struct net_device *dev, ...@@ -976,7 +976,7 @@ static int bnxt_set_channels(struct net_device *dev,
bnxt_clear_usr_fltrs(bp, true); bnxt_clear_usr_fltrs(bp, true);
if (BNXT_SUPPORTS_MULTI_RSS_CTX(bp)) if (BNXT_SUPPORTS_MULTI_RSS_CTX(bp))
bnxt_clear_rss_ctxs(bp, false); bnxt_clear_rss_ctxs(bp);
if (netif_running(dev)) { if (netif_running(dev)) {
if (BNXT_PF(bp)) { if (BNXT_PF(bp)) {
/* TODO CHIMP_FW: Send message to all VF's /* TODO CHIMP_FW: Send message to all VF's
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment