Lines Matching full:ent
180 struct id_map_entry *ent = container_of(delay, struct id_map_entry, timeout); in id_map_ent_timeout() local
182 struct mlx4_ib_dev *dev = ent->dev; in id_map_ent_timeout()
187 if (!xa_erase(&sriov->pv_id_table, ent->pv_cm_id)) in id_map_ent_timeout()
189 found_ent = id_map_find_by_sl_id(&dev->ib_dev, ent->slave_id, ent->sl_cm_id); in id_map_ent_timeout()
190 if (found_ent && found_ent == ent) in id_map_ent_timeout()
194 list_del(&ent->list); in id_map_ent_timeout()
196 kfree(ent); in id_map_ent_timeout()
203 struct id_map_entry *ent; in sl_id_map_add() local
207 ent = id_map_find_by_sl_id(ibdev, slave_id, sl_cm_id); in sl_id_map_add()
208 if (ent) { in sl_id_map_add()
212 rb_replace_node(&ent->node, &new->node, sl_id_map); in sl_id_map_add()
219 ent = rb_entry(parent, struct id_map_entry, node); in sl_id_map_add()
221 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()
235 struct id_map_entry *ent; in id_map_alloc() local
238 ent = kmalloc(sizeof (struct id_map_entry), GFP_KERNEL); in id_map_alloc()
239 if (!ent) in id_map_alloc()
242 ent->sl_cm_id = sl_cm_id; in id_map_alloc()
243 ent->slave_id = slave_id; in id_map_alloc()
244 ent->scheduled_delete = 0; in id_map_alloc()
245 ent->dev = to_mdev(ibdev); in id_map_alloc()
246 INIT_DELAYED_WORK(&ent->timeout, id_map_ent_timeout); in id_map_alloc()
248 ret = xa_alloc_cyclic(&sriov->pv_id_table, &ent->pv_cm_id, ent, in id_map_alloc()
252 sl_id_map_add(ibdev, ent); in id_map_alloc()
253 list_add_tail(&ent->list, &sriov->cm_list); in id_map_alloc()
255 return ent; in id_map_alloc()
259 kfree(ent); in id_map_alloc()
267 struct id_map_entry *ent; in id_map_get() local
272 ent = id_map_find_by_sl_id(ibdev, slave_id, sl_cm_id); in id_map_get()
273 if (ent) in id_map_get()
274 *pv_cm_id = (int) ent->pv_cm_id; in id_map_get()
276 ent = xa_load(&sriov->pv_id_table, *pv_cm_id); in id_map_get()
279 return ent; in id_map_get()
550 struct id_map_entry *ent = in mlx4_ib_cm_paravirt_clean() local
554 rb_erase(&ent->node, sl_id_map); in mlx4_ib_cm_paravirt_clean()
555 xa_erase(&sriov->pv_id_table, ent->pv_cm_id); in mlx4_ib_cm_paravirt_clean()
562 struct id_map_entry *ent = in mlx4_ib_cm_paravirt_clean() local
565 if (ent->slave_id == slave) in mlx4_ib_cm_paravirt_clean()
566 list_move_tail(&ent->list, &lh); in mlx4_ib_cm_paravirt_clean()