Lines Matching defs:mr
254 struct mlxsw_sp_mr *mr = mlxsw_sp->mr;
264 mr_route->route_priv = kzalloc(mr->mr_ops->route_priv_size,
274 err = mr->mr_ops->route_create(mlxsw_sp, mr->priv,
280 err = mr->mr_ops->route_update(mlxsw_sp, mr_route->route_priv,
292 struct mlxsw_sp_mr *mr = mlxsw_sp->mr;
294 mr->mr_ops->route_destroy(mlxsw_sp, mr->priv, mr_route->route_priv);
485 struct mlxsw_sp_mr *mr = mlxsw_sp->mr;
495 err = mr->mr_ops->route_irif_update(mlxsw_sp, rve->mr_route->route_priv,
500 err = mr->mr_ops->route_action_update(mlxsw_sp,
519 struct mlxsw_sp_mr *mr = mlxsw_sp->mr;
521 mr->mr_ops->route_action_update(mlxsw_sp, rve->mr_route->route_priv,
534 struct mlxsw_sp_mr *mr = mlxsw_sp->mr;
541 err = mr->mr_ops->route_erif_add(mlxsw_sp,
553 err = mr->mr_ops->route_action_update(mlxsw_sp,
563 err = mr->mr_ops->route_min_mtu_update(mlxsw_sp,
576 mr->mr_ops->route_action_update(mlxsw_sp,
581 mr->mr_ops->route_erif_del(mlxsw_sp, rve->mr_route->route_priv,
593 struct mlxsw_sp_mr *mr = mlxsw_sp->mr;
610 mr->mr_ops->route_action_update(mlxsw_sp,
616 mr->mr_ops->route_erif_del(mlxsw_sp, rve->mr_route->route_priv, rifi);
751 struct mlxsw_sp_mr *mr = mlxsw_sp->mr;
766 mr->mr_ops->route_min_mtu_update(mlxsw_sp,
906 struct mlxsw_sp_mr *mr = mlxsw_sp->mr;
911 mr_table = kzalloc(sizeof(*mr_table) + mr->mr_ops->route_priv_size,
934 err = mr->mr_ops->route_create(mlxsw_sp, mr->priv,
939 mutex_lock(&mr->table_list_lock);
940 list_add_tail(&mr_table->node, &mr->table_list);
941 mutex_unlock(&mr->table_list_lock);
955 struct mlxsw_sp_mr *mr = mlxsw_sp->mr;
958 mutex_lock(&mr->table_list_lock);
960 mutex_unlock(&mr->table_list_lock);
961 mr->mr_ops->route_destroy(mlxsw_sp, mr->priv,
997 struct mlxsw_sp_mr *mr = mlxsw_sp->mr;
1003 mr->mr_ops->route_stats(mlxsw_sp, mr_route->route_priv, &packets,
1014 struct mlxsw_sp_mr *mr = container_of(work, struct mlxsw_sp_mr,
1020 mutex_lock(&mr->table_list_lock);
1021 list_for_each_entry(mr_table, &mr->table_list, node) {
1028 mutex_unlock(&mr->table_list_lock);
1031 mlxsw_core_schedule_dw(&mr->stats_update_dw, interval);
1037 struct mlxsw_sp_mr *mr;
1041 mr = kzalloc(sizeof(*mr) + mr_ops->priv_size, GFP_KERNEL);
1042 if (!mr)
1044 mr->mr_ops = mr_ops;
1045 mlxsw_sp->mr = mr;
1046 INIT_LIST_HEAD(&mr->table_list);
1047 mutex_init(&mr->table_list_lock);
1049 err = mr_ops->init(mlxsw_sp, mr->priv);
1054 INIT_DELAYED_WORK(&mr->stats_update_dw, mlxsw_sp_mr_stats_update);
1056 mlxsw_core_schedule_dw(&mr->stats_update_dw, interval);
1059 mutex_destroy(&mr->table_list_lock);
1060 kfree(mr);
1066 struct mlxsw_sp_mr *mr = mlxsw_sp->mr;
1068 cancel_delayed_work_sync(&mr->stats_update_dw);
1069 mr->mr_ops->fini(mlxsw_sp, mr->priv);
1070 mutex_destroy(&mr->table_list_lock);
1071 kfree(mr);