Commit 25525b69 authored by Dave Ertman's avatar Dave Ertman Committed by Jeff Kirsher
Browse files

ice: Fix napi delete calls for remove



In the remove path, the vsi->netdev is being set to NULL before the call
to free vectors. This is causing the netif_napi_del call to never be made.

Add a call to ice_napi_del to the same location as the calls to
unregister_netdev and just prior to them. This will use the reverse flow
as the register and netif_napi_add calls.

Signed-off-by: default avatarDave Ertman <david.m.ertman@intel.com>
Signed-off-by: default avatarAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 31082519
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -370,5 +370,6 @@ int ice_set_rss(struct ice_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size);
int ice_get_rss(struct ice_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size);
void ice_fill_rss_lut(u8 *lut, u16 rss_table_size, u16 rss_size);
void ice_print_link_msg(struct ice_vsi *vsi, bool isup);
void ice_napi_del(struct ice_vsi *vsi);

#endif /* _ICE_H_ */
+1 −0
Original line number Diff line number Diff line
@@ -2458,6 +2458,7 @@ int ice_vsi_release(struct ice_vsi *vsi)
	 * on this wq
	 */
	if (vsi->netdev && !ice_is_reset_in_progress(pf->state)) {
		ice_napi_del(vsi);
		unregister_netdev(vsi->netdev);
		free_netdev(vsi->netdev);
		vsi->netdev = NULL;
+1 −1
Original line number Diff line number Diff line
@@ -1465,7 +1465,7 @@ skip_req_irq:
 * ice_napi_del - Remove NAPI handler for the VSI
 * @vsi: VSI for which NAPI handler is to be removed
 */
static void ice_napi_del(struct ice_vsi *vsi)
void ice_napi_del(struct ice_vsi *vsi)
{
	int v_idx;