Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30f56e3c authored by Eugenia Emantayev's avatar Eugenia Emantayev Committed by David S. Miller
Browse files

net/mlx4_en: Move filters cleanup to a proper location



Filters cleanup should be done once before destroying net device,
since filters list is contained in the private data.

Fixes: 1eb8c695 ('net/mlx4_en: Add accelerated RFS support')
Signed-off-by: default avatarEugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c74bfbdb
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -2080,6 +2080,10 @@ void mlx4_en_destroy_netdev(struct net_device *dev)
	mdev->upper[priv->port] = NULL;
	mdev->upper[priv->port] = NULL;
	mutex_unlock(&mdev->state_lock);
	mutex_unlock(&mdev->state_lock);


#ifdef CONFIG_RFS_ACCEL
	mlx4_en_cleanup_filters(priv);
#endif

	mlx4_en_free_resources(priv);
	mlx4_en_free_resources(priv);


	kfree(priv->tx_ring);
	kfree(priv->tx_ring);
+0 −3
Original line number Original line Diff line number Diff line
@@ -514,9 +514,6 @@ void mlx4_en_destroy_rx_ring(struct mlx4_en_priv *priv,
	ring->rx_info = NULL;
	ring->rx_info = NULL;
	kfree(ring);
	kfree(ring);
	*pring = NULL;
	*pring = NULL;
#ifdef CONFIG_RFS_ACCEL
	mlx4_en_cleanup_filters(priv);
#endif
}
}


void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *priv,
void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *priv,