• Home
  • Raw
  • Download

Lines Matching refs:ent

131 	struct id_map_entry *ent = container_of(delay, struct id_map_entry, timeout);  in id_map_ent_timeout()  local
133 struct mlx4_ib_dev *dev = ent->dev; in id_map_ent_timeout()
136 int pv_id = (int) ent->pv_cm_id; in id_map_ent_timeout()
142 found_ent = id_map_find_by_sl_id(&dev->ib_dev, ent->slave_id, ent->sl_cm_id); in id_map_ent_timeout()
143 if (found_ent && found_ent == ent) in id_map_ent_timeout()
148 list_del(&ent->list); in id_map_ent_timeout()
150 kfree(ent); in id_map_ent_timeout()
157 struct id_map_entry *ent, *found_ent; in id_map_find_del() local
160 ent = (struct id_map_entry *)idr_find(&sriov->pv_id_table, pv_cm_id); in id_map_find_del()
161 if (!ent) in id_map_find_del()
163 found_ent = id_map_find_by_sl_id(ibdev, ent->slave_id, ent->sl_cm_id); in id_map_find_del()
164 if (found_ent && found_ent == ent) in id_map_find_del()
175 struct id_map_entry *ent; in sl_id_map_add() local
179 ent = id_map_find_by_sl_id(ibdev, slave_id, sl_cm_id); in sl_id_map_add()
180 if (ent) { in sl_id_map_add()
184 rb_replace_node(&ent->node, &new->node, sl_id_map); in sl_id_map_add()
191 ent = rb_entry(parent, struct id_map_entry, node); in sl_id_map_add()
193 if (ent->sl_cm_id > sl_cm_id || (ent->sl_cm_id == sl_cm_id && ent->slave_id > slave_id)) in sl_id_map_add()
207 struct id_map_entry *ent; in id_map_alloc() local
210 ent = kmalloc(sizeof (struct id_map_entry), GFP_KERNEL); in id_map_alloc()
211 if (!ent) { in id_map_alloc()
216 ent->sl_cm_id = sl_cm_id; in id_map_alloc()
217 ent->slave_id = slave_id; in id_map_alloc()
218 ent->scheduled_delete = 0; in id_map_alloc()
219 ent->dev = to_mdev(ibdev); in id_map_alloc()
220 INIT_DELAYED_WORK(&ent->timeout, id_map_ent_timeout); in id_map_alloc()
225 ret = idr_alloc_cyclic(&sriov->pv_id_table, ent, 0, 0, GFP_NOWAIT); in id_map_alloc()
227 ent->pv_cm_id = (u32)ret; in id_map_alloc()
228 sl_id_map_add(ibdev, ent); in id_map_alloc()
229 list_add_tail(&ent->list, &sriov->cm_list); in id_map_alloc()
236 return ent; in id_map_alloc()
239 kfree(ent); in id_map_alloc()
247 struct id_map_entry *ent; in id_map_get() local
252 ent = id_map_find_by_sl_id(ibdev, sl_cm_id, slave_id); in id_map_get()
253 if (ent) in id_map_get()
254 *pv_cm_id = (int) ent->pv_cm_id; in id_map_get()
256 ent = (struct id_map_entry *)idr_find(&sriov->pv_id_table, *pv_cm_id); in id_map_get()
259 return ent; in id_map_get()
394 struct id_map_entry *ent = in mlx4_ib_cm_paravirt_clean() local
398 rb_erase(&ent->node, sl_id_map); in mlx4_ib_cm_paravirt_clean()
399 idr_remove(&sriov->pv_id_table, (int) ent->pv_cm_id); in mlx4_ib_cm_paravirt_clean()
406 struct id_map_entry *ent = in mlx4_ib_cm_paravirt_clean() local
409 if (ent->slave_id == slave) in mlx4_ib_cm_paravirt_clean()
410 list_move_tail(&ent->list, &lh); in mlx4_ib_cm_paravirt_clean()