mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 09:13:38 +00:00
bnxt_en: Don't clear ntuple filters and rss contexts during ethtool ops
The driver currently blindly deletes its cache of RSS cotexts and ntuple filters when the ethtool channel count is changing. It also deletes the ntuple filters cache when the default indirection table is changing. The core will not allow ethtool channels to drop below any that have been configured as ntuple destinations since this commit from 2022:47f3ecf476
("ethtool: Fail number of channels change when it conflicts with rxnfc") So there is absolutely no need to delete the ntuple filters and RSS contexts when changing ethtool channels. It is also unnecessary to delete ntuple filters when the default RSS indirection table is changing. Remove bnxt_clear_usr_fltrs() and bnxt_clear_rss_ctxis() from the ethtool ops and change them to static functions. This bug will cause confusion to the end user and causes failure when running the rss_ctx.py selftest. Fixes:1018319f94
("bnxt_en: Invalidate user filters when needed") Reported-by: Jakub Kicinski <kuba@kernel.org> Closes: https://lore.kernel.org/netdev/20240725111912.7bc17cf6@kernel.org/ 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/20240814225429.199280-1-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
b96ed2c97c
commit
c948c0973d
@ -5056,7 +5056,7 @@ void bnxt_del_one_usr_fltr(struct bnxt *bp, struct bnxt_filter_base *fltr)
|
||||
list_del_init(&fltr->list);
|
||||
}
|
||||
|
||||
void bnxt_clear_usr_fltrs(struct bnxt *bp, bool all)
|
||||
static void bnxt_clear_usr_fltrs(struct bnxt *bp, bool all)
|
||||
{
|
||||
struct bnxt_filter_base *usr_fltr, *tmp;
|
||||
|
||||
@ -10248,7 +10248,7 @@ static void bnxt_hwrm_realloc_rss_ctx_vnic(struct bnxt *bp)
|
||||
}
|
||||
}
|
||||
|
||||
void bnxt_clear_rss_ctxs(struct bnxt *bp)
|
||||
static void bnxt_clear_rss_ctxs(struct bnxt *bp)
|
||||
{
|
||||
struct ethtool_rxfh_context *ctx;
|
||||
unsigned long context;
|
||||
|
@ -2790,7 +2790,6 @@ void bnxt_set_ring_params(struct bnxt *);
|
||||
int bnxt_set_rx_skb_mode(struct bnxt *bp, bool page_mode);
|
||||
void bnxt_insert_usr_fltr(struct bnxt *bp, struct bnxt_filter_base *fltr);
|
||||
void bnxt_del_one_usr_fltr(struct bnxt *bp, struct bnxt_filter_base *fltr);
|
||||
void bnxt_clear_usr_fltrs(struct bnxt *bp, bool all);
|
||||
int bnxt_hwrm_func_drv_rgtr(struct bnxt *bp, unsigned long *bmap,
|
||||
int bmap_size, bool async_only);
|
||||
int bnxt_hwrm_func_drv_unrgtr(struct bnxt *bp);
|
||||
@ -2842,7 +2841,6 @@ int bnxt_hwrm_vnic_rss_cfg_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic);
|
||||
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,
|
||||
bool all);
|
||||
void bnxt_clear_rss_ctxs(struct bnxt *bp);
|
||||
int bnxt_open_nic(struct bnxt *, bool, bool);
|
||||
int bnxt_half_open_nic(struct bnxt *bp);
|
||||
void bnxt_half_close_nic(struct bnxt *bp);
|
||||
|
@ -968,9 +968,6 @@ static int bnxt_set_channels(struct net_device *dev,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
bnxt_clear_usr_fltrs(bp, true);
|
||||
if (BNXT_SUPPORTS_MULTI_RSS_CTX(bp))
|
||||
bnxt_clear_rss_ctxs(bp);
|
||||
if (netif_running(dev)) {
|
||||
if (BNXT_PF(bp)) {
|
||||
/* TODO CHIMP_FW: Send message to all VF's
|
||||
@ -2000,7 +1997,6 @@ static int bnxt_set_rxfh(struct net_device *dev,
|
||||
|
||||
bnxt_modify_rss(bp, NULL, NULL, rxfh);
|
||||
|
||||
bnxt_clear_usr_fltrs(bp, false);
|
||||
if (netif_running(bp->dev)) {
|
||||
bnxt_close_nic(bp, false, false);
|
||||
rc = bnxt_open_nic(bp, false, false);
|
||||
|
Loading…
Reference in New Issue
Block a user