Skip to content

Commit c948c09

Browse files
Pavan Chebbikuba-moo
authored andcommitted
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: 47f3ecf ("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: 1018319 ("bnxt_en: Invalidate user filters when needed") Reported-by: Jakub Kicinski <[email protected]> Closes: https://lore.kernel.org/netdev/[email protected]/ Reviewed-by: Andy Gospodarek <[email protected]> Signed-off-by: Pavan Chebbi <[email protected]> Signed-off-by: Michael Chan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b96ed2c commit c948c09

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5056,7 +5056,7 @@ void bnxt_del_one_usr_fltr(struct bnxt *bp, struct bnxt_filter_base *fltr)
50565056
list_del_init(&fltr->list);
50575057
}
50585058

5059-
void bnxt_clear_usr_fltrs(struct bnxt *bp, bool all)
5059+
static void bnxt_clear_usr_fltrs(struct bnxt *bp, bool all)
50605060
{
50615061
struct bnxt_filter_base *usr_fltr, *tmp;
50625062

@@ -10248,7 +10248,7 @@ static void bnxt_hwrm_realloc_rss_ctx_vnic(struct bnxt *bp)
1024810248
}
1024910249
}
1025010250

10251-
void bnxt_clear_rss_ctxs(struct bnxt *bp)
10251+
static void bnxt_clear_rss_ctxs(struct bnxt *bp)
1025210252
{
1025310253
struct ethtool_rxfh_context *ctx;
1025410254
unsigned long context;

drivers/net/ethernet/broadcom/bnxt/bnxt.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2790,7 +2790,6 @@ void bnxt_set_ring_params(struct bnxt *);
27902790
int bnxt_set_rx_skb_mode(struct bnxt *bp, bool page_mode);
27912791
void bnxt_insert_usr_fltr(struct bnxt *bp, struct bnxt_filter_base *fltr);
27922792
void bnxt_del_one_usr_fltr(struct bnxt *bp, struct bnxt_filter_base *fltr);
2793-
void bnxt_clear_usr_fltrs(struct bnxt *bp, bool all);
27942793
int bnxt_hwrm_func_drv_rgtr(struct bnxt *bp, unsigned long *bmap,
27952794
int bmap_size, bool async_only);
27962795
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);
28422841
int __bnxt_setup_vnic_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic);
28432842
void bnxt_del_one_rss_ctx(struct bnxt *bp, struct bnxt_rss_ctx *rss_ctx,
28442843
bool all);
2845-
void bnxt_clear_rss_ctxs(struct bnxt *bp);
28462844
int bnxt_open_nic(struct bnxt *, bool, bool);
28472845
int bnxt_half_open_nic(struct bnxt *bp);
28482846
void bnxt_half_close_nic(struct bnxt *bp);

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -968,9 +968,6 @@ static int bnxt_set_channels(struct net_device *dev,
968968
return -EINVAL;
969969
}
970970

971-
bnxt_clear_usr_fltrs(bp, true);
972-
if (BNXT_SUPPORTS_MULTI_RSS_CTX(bp))
973-
bnxt_clear_rss_ctxs(bp);
974971
if (netif_running(dev)) {
975972
if (BNXT_PF(bp)) {
976973
/* TODO CHIMP_FW: Send message to all VF's
@@ -2000,7 +1997,6 @@ static int bnxt_set_rxfh(struct net_device *dev,
20001997

20011998
bnxt_modify_rss(bp, NULL, NULL, rxfh);
20021999

2003-
bnxt_clear_usr_fltrs(bp, false);
20042000
if (netif_running(bp->dev)) {
20052001
bnxt_close_nic(bp, false, false);
20062002
rc = bnxt_open_nic(bp, false, false);

0 commit comments

Comments
 (0)