Lines Matching refs:lag
4272 struct mlxsw_sp_lag *lag;
4293 lag = &mlxsw_sp->lags[lag_id];
4294 lag->lag_id = lag_id;
4295 lag->dev = lag_dev;
4296 refcount_set(&lag->ref_count, 1);
4298 return lag;
4302 mlxsw_sp_lag_destroy(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_lag *lag)
4306 lag->dev = NULL;
4308 mlxsw_reg_sldr_lag_destroy_pack(sldr_pl, lag->lag_id);
4376 struct mlxsw_sp_lag *lag;
4378 lag = mlxsw_sp_lag_find(mlxsw_sp, lag_dev);
4379 if (lag) {
4380 refcount_inc(&lag->ref_count);
4381 return lag;
4388 mlxsw_sp_lag_put(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_lag *lag)
4390 if (!refcount_dec_and_test(&lag->ref_count))
4393 mlxsw_sp_lag_destroy(mlxsw_sp, lag);
4513 struct mlxsw_sp_lag *lag;
4518 lag = mlxsw_sp_lag_get(mlxsw_sp, lag_dev, extack);
4519 if (IS_ERR(lag))
4520 return PTR_ERR(lag);
4522 lag_id = lag->lag_id;
4573 mlxsw_sp_lag_put(mlxsw_sp, lag);
4582 struct mlxsw_sp_lag *lag;
4586 lag = &mlxsw_sp->lags[lag_id];
4600 mlxsw_sp_lag_put(mlxsw_sp, lag);