Skip to content

Commit 7d46c0e

Browse files
Michal Swiatkowskianguy11
authored andcommitted
ice: remove filters only if VSI is deleted
Filters shouldn't be removed in VSI rebuild path. Removing them on PF VSI results in no rule for PF MAC after changing for example queues amount. Remove all filters only in the VSI remove flow. As unload should also cause the filter to be removed introduce, a new function ice_stop_eth(). It will unroll ice_start_eth(), so remove filters and close VSI. Fixes: 6624e78 ("ice: split ice_vsi_setup into smaller functions") Signed-off-by: Michal Swiatkowski <[email protected]> Tested-by: Arpana Arland <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]>
1 parent 83b49e7 commit 7d46c0e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

drivers/net/ethernet/intel/ice/ice_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ static void ice_vsi_delete_from_hw(struct ice_vsi *vsi)
291291
struct ice_vsi_ctx *ctxt;
292292
int status;
293293

294+
ice_fltr_remove_all(vsi);
294295
ctxt = kzalloc(sizeof(*ctxt), GFP_KERNEL);
295296
if (!ctxt)
296297
return;
@@ -2892,7 +2893,6 @@ void ice_vsi_decfg(struct ice_vsi *vsi)
28922893
!test_bit(ICE_FLAG_FW_LLDP_AGENT, pf->flags))
28932894
ice_cfg_sw_lldp(vsi, false, false);
28942895

2895-
ice_fltr_remove_all(vsi);
28962896
ice_rm_vsi_lan_cfg(vsi->port_info, vsi->idx);
28972897
err = ice_rm_vsi_rdma_cfg(vsi->port_info, vsi->idx);
28982898
if (err)

drivers/net/ethernet/intel/ice/ice_main.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4641,6 +4641,12 @@ static int ice_start_eth(struct ice_vsi *vsi)
46414641
return err;
46424642
}
46434643

4644+
static void ice_stop_eth(struct ice_vsi *vsi)
4645+
{
4646+
ice_fltr_remove_all(vsi);
4647+
ice_vsi_close(vsi);
4648+
}
4649+
46444650
static int ice_init_eth(struct ice_pf *pf)
46454651
{
46464652
struct ice_vsi *vsi = ice_get_main_vsi(pf);
@@ -5129,7 +5135,7 @@ void ice_unload(struct ice_pf *pf)
51295135
{
51305136
ice_deinit_features(pf);
51315137
ice_deinit_rdma(pf);
5132-
ice_vsi_close(ice_get_main_vsi(pf));
5138+
ice_stop_eth(ice_get_main_vsi(pf));
51335139
ice_vsi_decfg(ice_get_main_vsi(pf));
51345140
ice_deinit_dev(pf);
51355141
}

0 commit comments

Comments
 (0)