Home
last modified time | relevance | path

Searched refs:mr_table (Results 1 – 18 of 18) sorted by relevance

/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_mr.c55 bool (*is_route_valid)(const struct mlxsw_sp_mr_table *mr_table,
57 void (*key_create)(struct mlxsw_sp_mr_table *mr_table,
60 bool (*is_route_starg)(const struct mlxsw_sp_mr_table *mr_table,
86 const struct mlxsw_sp_mr_table *mr_table; member
143 if (mr_route->mr_table->ops->is_route_starg(mr_route->mr_table, in mlxsw_sp_mr_route_action()
165 return mr_route->mr_table->ops->is_route_starg(mr_route->mr_table, in mlxsw_sp_mr_route_prio()
207 mlxsw_sp_mr_route_info_create(struct mlxsw_sp_mr_table *mr_table, in mlxsw_sp_mr_route_info_create() argument
248 static int mlxsw_sp_mr_route_write(struct mlxsw_sp_mr_table *mr_table, in mlxsw_sp_mr_route_write() argument
252 struct mlxsw_sp *mlxsw_sp = mr_table->mlxsw_sp; in mlxsw_sp_mr_route_write()
257 err = mlxsw_sp_mr_route_info_create(mr_table, mr_route, &route_info); in mlxsw_sp_mr_route_write()
[all …]
Dspectrum_mr.h73 int mlxsw_sp_mr_route_add(struct mlxsw_sp_mr_table *mr_table,
75 void mlxsw_sp_mr_route_del(struct mlxsw_sp_mr_table *mr_table,
77 int mlxsw_sp_mr_vif_add(struct mlxsw_sp_mr_table *mr_table,
81 void mlxsw_sp_mr_vif_del(struct mlxsw_sp_mr_table *mr_table, vifi_t vif_index);
82 int mlxsw_sp_mr_rif_add(struct mlxsw_sp_mr_table *mr_table,
84 void mlxsw_sp_mr_rif_del(struct mlxsw_sp_mr_table *mr_table,
86 void mlxsw_sp_mr_rif_mtu_update(struct mlxsw_sp_mr_table *mr_table,
91 void mlxsw_sp_mr_table_destroy(struct mlxsw_sp_mr_table *mr_table);
92 void mlxsw_sp_mr_table_flush(struct mlxsw_sp_mr_table *mr_table);
93 bool mlxsw_sp_mr_table_empty(const struct mlxsw_sp_mr_table *mr_table);
Dspectrum_router.c479 struct mlxsw_sp_mr_table *mr_table[MLXSW_SP_L3_PROTO_MAX]; member
764 !!vr->mr_table[MLXSW_SP_L3_PROTO_IPV4] || in mlxsw_sp_vr_is_used()
765 !!vr->mr_table[MLXSW_SP_L3_PROTO_IPV6]; in mlxsw_sp_vr_is_used()
895 vr->mr_table[MLXSW_SP_L3_PROTO_IPV4] = mr4_table; in mlxsw_sp_vr_create()
896 vr->mr_table[MLXSW_SP_L3_PROTO_IPV6] = mr6_table; in mlxsw_sp_vr_create()
912 mlxsw_sp_mr_table_destroy(vr->mr_table[MLXSW_SP_L3_PROTO_IPV6]); in mlxsw_sp_vr_destroy()
913 vr->mr_table[MLXSW_SP_L3_PROTO_IPV6] = NULL; in mlxsw_sp_vr_destroy()
914 mlxsw_sp_mr_table_destroy(vr->mr_table[MLXSW_SP_L3_PROTO_IPV4]); in mlxsw_sp_vr_destroy()
915 vr->mr_table[MLXSW_SP_L3_PROTO_IPV4] = NULL; in mlxsw_sp_vr_destroy()
938 mlxsw_sp_mr_table_empty(vr->mr_table[MLXSW_SP_L3_PROTO_IPV4]) && in mlxsw_sp_vr_put()
[all …]
/drivers/infiniband/hw/mthca/
Dmthca_mr.c199 if (mthca_table_get_range(dev, dev->mr_table.mtt_table, seg, in mthca_alloc_mtt_range()
237 return __mthca_alloc_mtt(dev, size, &dev->mr_table.mtt_buddy); in mthca_alloc_mtt()
247 mthca_table_put_range(dev, dev->mr_table.mtt_table, in mthca_free_mtt()
268 mtt_entry[0] = cpu_to_be64(dev->mr_table.mtt_base + in __mthca_write_mtt()
301 if (dev->mr_table.fmr_mtt_buddy != &dev->mr_table.mtt_buddy || in mthca_write_mtt_size()
322 mtts = dev->mr_table.tavor_fmr.mtt_base + mtt->first_seg * dev->limits.mtt_seg_size + in mthca_tavor_write_mtt_seg()
343 mtts = mthca_table_find(dev->mr_table.mtt_table, mtt->first_seg + in mthca_arbel_write_mtt_seg()
364 if (dev->mr_table.fmr_mtt_buddy != &dev->mr_table.mtt_buddy || in mthca_write_mtt()
440 key = mthca_alloc(&dev->mr_table.mpt_alloc); in mthca_mr_alloc()
447 err = mthca_table_get(dev, dev->mr_table.mpt_table, key); in mthca_mr_alloc()
[all …]
Dmthca_main.c421 mdev->mr_table.mtt_table = mthca_alloc_icm_table(mdev, init_hca->mtt_base, in mthca_init_icm()
426 if (!mdev->mr_table.mtt_table) { in mthca_init_icm()
432 mdev->mr_table.mpt_table = mthca_alloc_icm_table(mdev, init_hca->mpt_base, in mthca_init_icm()
437 if (!mdev->mr_table.mpt_table) { in mthca_init_icm()
539 mthca_free_icm_table(mdev, mdev->mr_table.mpt_table); in mthca_init_icm()
542 mthca_free_icm_table(mdev, mdev->mr_table.mtt_table); in mthca_init_icm()
566 mthca_free_icm_table(mdev, mdev->mr_table.mpt_table); in mthca_free_icms()
567 mthca_free_icm_table(mdev, mdev->mr_table.mtt_table); in mthca_free_icms()
Dmthca_profile.c223 dev->mr_table.mpt_base = profile[i].start; in mthca_make_profile()
229 dev->mr_table.mtt_base = profile[i].start; in mthca_make_profile()
Dmthca_dev.h340 struct mthca_mr_table mr_table; member
/drivers/net/ethernet/mellanox/mlx4/
Dmr.c152 struct mlx4_mr_table *mr_table = &mlx4_priv(dev)->mr_table; in __mlx4_alloc_mtt_range() local
159 seg = mlx4_buddy_alloc(&mr_table->mtt_buddy, seg_order); in __mlx4_alloc_mtt_range()
165 if (mlx4_table_get_range(dev, &mr_table->mtt_table, offset, in __mlx4_alloc_mtt_range()
167 mlx4_buddy_free(&mr_table->mtt_buddy, seg, seg_order); in __mlx4_alloc_mtt_range()
221 struct mlx4_mr_table *mr_table = &mlx4_priv(dev)->mr_table; in __mlx4_free_mtt_range() local
226 mlx4_buddy_free(&mr_table->mtt_buddy, first_seg, seg_order); in __mlx4_free_mtt_range()
227 mlx4_table_put_range(dev, &mr_table->mtt_table, offset, in __mlx4_free_mtt_range()
314 &mlx4_priv(dev)->mr_table.dmpt_table, in mlx4_mr_hw_get_mpt()
443 return mlx4_bitmap_alloc(&priv->mr_table.mpt_bitmap); in __mlx4_mpt_reserve()
464 mlx4_bitmap_free(&priv->mr_table.mpt_bitmap, index, MLX4_NO_RR); in __mlx4_mpt_release()
[all …]
Dprofile.c230 priv->mr_table.mpt_base = profile[i].start; in mlx4_make_profile()
239 priv->mr_table.mtt_base = profile[i].start; in mlx4_make_profile()
Dmain.c1700 err = mlx4_init_icm_table(dev, &priv->mr_table.mtt_table, in mlx4_init_icm()
1710 err = mlx4_init_icm_table(dev, &priv->mr_table.dmpt_table, in mlx4_init_icm()
1823 mlx4_cleanup_icm_table(dev, &priv->mr_table.dmpt_table); in mlx4_init_icm()
1826 mlx4_cleanup_icm_table(dev, &priv->mr_table.mtt_table); in mlx4_init_icm()
1857 mlx4_cleanup_icm_table(dev, &priv->mr_table.dmpt_table); in mlx4_free_icms()
1858 mlx4_cleanup_icm_table(dev, &priv->mr_table.mtt_table); in mlx4_free_icms()
Dmlx4.h895 struct mlx4_mr_table mr_table; member
Dresource_tracker.c2896 &mlx4_priv(dev)->mr_table.dmpt_table, in mlx4_QUERY_MPT_wrapper()
/drivers/infiniband/hw/hns/
Dhns_roce_mr.c72 struct hns_roce_ida *mtpt_ida = &hr_dev->mr_table.mtpt_ida; in alloc_mr_key()
87 err = hns_roce_table_get(hr_dev, &hr_dev->mr_table.mtpt_table, in alloc_mr_key()
104 hns_roce_table_put(hr_dev, &hr_dev->mr_table.mtpt_table, obj); in free_mr_key()
105 ida_free(&hr_dev->mr_table.mtpt_ida.ida, (int)obj); in free_mr_key()
203 struct hns_roce_ida *mtpt_ida = &hr_dev->mr_table.mtpt_ida; in hns_roce_init_mr_table()
495 hns_roce_table_put(hr_dev, &hr_dev->mr_table.mtpt_table, in hns_roce_mw_free()
499 ida_free(&hr_dev->mr_table.mtpt_ida.ida, in hns_roce_mw_free()
506 struct hns_roce_mr_table *mr_table = &hr_dev->mr_table; in hns_roce_mw_enable() local
513 ret = hns_roce_table_get(hr_dev, &mr_table->mtpt_table, mtpt_idx); in hns_roce_mw_enable()
546 hns_roce_table_put(hr_dev, &mr_table->mtpt_table, mtpt_idx); in hns_roce_mw_enable()
[all …]
Dhns_roce_alloc.c184 ida_destroy(&hr_dev->mr_table.mtpt_ida.ida); in hns_roce_cleanup_bitmap()
Dhns_roce_main.c580 ret = hns_roce_init_hem_table(hr_dev, &hr_dev->mr_table.mtpt_table, in hns_roce_init_hem()
723 hns_roce_cleanup_hem_table(hr_dev, &hr_dev->mr_table.mtpt_table); in hns_roce_init_hem()
Dhns_roce_device.h980 struct hns_roce_mr_table mr_table; member
Dhns_roce_hem.c969 hns_roce_cleanup_hem_table(hr_dev, &hr_dev->mr_table.mtpt_table); in hns_roce_cleanup_hem()
Dhns_roce_hw_v1.c1201 ida_free(&hr_dev->mr_table.mtpt_ida.ida, (int)key_to_hw_index(mr->key)); in hns_roce_v1_dereg_mr()