Lines Matching refs:ent

179 	struct id_map_entry *ent = container_of(delay, struct id_map_entry, timeout);  in id_map_ent_timeout()  local
181 struct mlx4_ib_dev *dev = ent->dev; in id_map_ent_timeout()
186 if (!xa_erase(&sriov->pv_id_table, ent->pv_cm_id)) in id_map_ent_timeout()
188 found_ent = id_map_find_by_sl_id(&dev->ib_dev, ent->slave_id, ent->sl_cm_id); in id_map_ent_timeout()
189 if (found_ent && found_ent == ent) in id_map_ent_timeout()
193 list_del(&ent->list); in id_map_ent_timeout()
195 kfree(ent); in id_map_ent_timeout()
202 struct id_map_entry *ent; in sl_id_map_add() local
206 ent = id_map_find_by_sl_id(ibdev, slave_id, sl_cm_id); in sl_id_map_add()
207 if (ent) { in sl_id_map_add()
211 rb_replace_node(&ent->node, &new->node, sl_id_map); in sl_id_map_add()
218 ent = rb_entry(parent, struct id_map_entry, node); in sl_id_map_add()
220 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()
234 struct id_map_entry *ent; in id_map_alloc() local
237 ent = kmalloc(sizeof (struct id_map_entry), GFP_KERNEL); in id_map_alloc()
238 if (!ent) in id_map_alloc()
241 ent->sl_cm_id = sl_cm_id; in id_map_alloc()
242 ent->slave_id = slave_id; in id_map_alloc()
243 ent->scheduled_delete = 0; in id_map_alloc()
244 ent->dev = to_mdev(ibdev); in id_map_alloc()
245 INIT_DELAYED_WORK(&ent->timeout, id_map_ent_timeout); in id_map_alloc()
247 ret = xa_alloc_cyclic(&sriov->pv_id_table, &ent->pv_cm_id, ent, in id_map_alloc()
251 sl_id_map_add(ibdev, ent); in id_map_alloc()
252 list_add_tail(&ent->list, &sriov->cm_list); in id_map_alloc()
254 return ent; in id_map_alloc()
258 kfree(ent); in id_map_alloc()
266 struct id_map_entry *ent; in id_map_get() local
271 ent = id_map_find_by_sl_id(ibdev, slave_id, sl_cm_id); in id_map_get()
272 if (ent) in id_map_get()
273 *pv_cm_id = (int) ent->pv_cm_id; in id_map_get()
275 ent = xa_load(&sriov->pv_id_table, *pv_cm_id); in id_map_get()
278 return ent; in id_map_get()
549 struct id_map_entry *ent = in mlx4_ib_cm_paravirt_clean() local
553 rb_erase(&ent->node, sl_id_map); in mlx4_ib_cm_paravirt_clean()
554 xa_erase(&sriov->pv_id_table, ent->pv_cm_id); in mlx4_ib_cm_paravirt_clean()
561 struct id_map_entry *ent = in mlx4_ib_cm_paravirt_clean() local
564 if (ent->slave_id == slave) in mlx4_ib_cm_paravirt_clean()
565 list_move_tail(&ent->list, &lh); in mlx4_ib_cm_paravirt_clean()