Skip to content

Commit

Permalink
net/mlx4_en: Move filters cleanup to a proper location
Browse files Browse the repository at this point in the history
Filters cleanup should be done once before destroying net device,
since filters list is contained in the private data.

Fixes: 1eb8c69 ('net/mlx4_en: Add accelerated RFS support')
Signed-off-by: Eugenia Emantayev <[email protected]>
Signed-off-by: Tariq Toukan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Eugenia Emantayev authored and davem330 committed Jul 19, 2016
1 parent c74bfbd commit 30f56e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/mellanox/mlx4/en_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2080,6 +2080,10 @@ void mlx4_en_destroy_netdev(struct net_device *dev)
mdev->upper[priv->port] = NULL;
mutex_unlock(&mdev->state_lock);

#ifdef CONFIG_RFS_ACCEL
mlx4_en_cleanup_filters(priv);
#endif

mlx4_en_free_resources(priv);

kfree(priv->tx_ring);
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/ethernet/mellanox/mlx4/en_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,6 @@ void mlx4_en_destroy_rx_ring(struct mlx4_en_priv *priv,
ring->rx_info = NULL;
kfree(ring);
*pring = NULL;
#ifdef CONFIG_RFS_ACCEL
mlx4_en_cleanup_filters(priv);
#endif
}

void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *priv,
Expand Down

0 comments on commit 30f56e3

Please sign in to comment.