ACK: [SRU][Bionic][PATCH 1/1] UBUNTU: SAUCE: net/mlx5e: IPoIB, initialize update_stat_work for ipoib devices

Stefan Bader stefan.bader at canonical.com
Thu Nov 26 09:14:56 UTC 2020


On 25.11.20 19:07, Ian May wrote:
> From: Amir Tzin <amirtz at nvidia.com>
> 
> BugLink: https://launchpad.net/bugs/1904848
> 
> mlx5e_detach_netdev cancels update_stats_work which was not initialized
> in ipoib netdevice profile, as a result, unloading the ib_ipoib module
> causes a call trace in the kernel ring buffer.
> current implementation inits update_stats_work in each netdev profile->init
> call back and cancels it in  mlx5e_detach_netdev, so lets follow this guideline
> and init update_stat_work for ipoib netdev in it's profile->init callback.
> 
> Fixes: cd565b4b51e5 ("IB/IPoIB: Support acceleration options callbacks")
> Signed-off-by: Amir Tzin <amirtz at nvidia.com>
> Reviewed-by: Feras Daoud <ferasda at nvidia.com>
> Signed-off-by: Ian May <ian.may at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>
> ---

Assuming we double check that nothing sticks out when looping over module load
and unload. Otherwise it looks like a sensible minimal approach.

-Stefan

>  drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
> index e97e57c64902..f9110c8beddf 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
> @@ -83,6 +83,7 @@ void mlx5i_init(struct mlx5_core_dev *mdev,
>  	priv->hard_mtu = MLX5_IB_GRH_BYTES + MLX5_IPOIB_HARD_LEN;
>  	mutex_init(&priv->state_lock);
>  
> +	INIT_DELAYED_WORK(&priv->update_stats_work, mlx5e_update_stats_work);
>  	mlx5e_build_nic_params(mdev, &priv->channels.params, profile->max_nch(mdev));
>  	mlx5i_build_nic_params(mdev, &priv->channels.params);
>  
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20201126/2362139d/attachment.sig>


More information about the kernel-team mailing list