Lines Matching refs:port_gid_table

259 	struct mlx4_port_gid_table   *port_gid_table;  in mlx4_ib_add_gid()  local
280 port_gid_table = &iboe->gids[attr->port_num - 1]; in mlx4_ib_add_gid()
283 if (!memcmp(&port_gid_table->gids[i].gid, in mlx4_ib_add_gid()
285 port_gid_table->gids[i].gid_type == attr->gid_type && in mlx4_ib_add_gid()
286 port_gid_table->gids[i].vlan_id == vlan_id) { in mlx4_ib_add_gid()
290 if (free < 0 && rdma_is_zero_gid(&port_gid_table->gids[i].gid)) in mlx4_ib_add_gid()
298 port_gid_table->gids[free].ctx = kmalloc(sizeof(*port_gid_table->gids[free].ctx), GFP_ATOMIC); in mlx4_ib_add_gid()
299 if (!port_gid_table->gids[free].ctx) { in mlx4_ib_add_gid()
302 *context = port_gid_table->gids[free].ctx; in mlx4_ib_add_gid()
303 port_gid_table->gids[free].gid = attr->gid; in mlx4_ib_add_gid()
304 port_gid_table->gids[free].gid_type = attr->gid_type; in mlx4_ib_add_gid()
305 port_gid_table->gids[free].vlan_id = vlan_id; in mlx4_ib_add_gid()
306 port_gid_table->gids[free].ctx->real_index = free; in mlx4_ib_add_gid()
307 port_gid_table->gids[free].ctx->refcount = 1; in mlx4_ib_add_gid()
312 struct gid_cache_context *ctx = port_gid_table->gids[found].ctx; in mlx4_ib_add_gid()
322 free_gid_entry(&port_gid_table->gids[free]); in mlx4_ib_add_gid()
325 memcpy(&gids[i].gid, &port_gid_table->gids[i].gid, sizeof(union ib_gid)); in mlx4_ib_add_gid()
326 gids[i].gid_type = port_gid_table->gids[i].gid_type; in mlx4_ib_add_gid()
337 free_gid_entry(&port_gid_table->gids[free]); in mlx4_ib_add_gid()
351 struct mlx4_port_gid_table *port_gid_table; in mlx4_ib_del_gid() local
362 port_gid_table = &iboe->gids[attr->port_num - 1]; in mlx4_ib_del_gid()
369 free_gid_entry(&port_gid_table->gids[real_index]); in mlx4_ib_del_gid()
383 &port_gid_table->gids[i].gid, in mlx4_ib_del_gid()
386 port_gid_table->gids[i].gid_type; in mlx4_ib_del_gid()
404 struct mlx4_port_gid_table *port_gid_table; in mlx4_ib_gid_index_to_real_index() local
420 port_gid_table = &iboe->gids[port_num - 1]; in mlx4_ib_gid_index_to_real_index()
423 if (!memcmp(&port_gid_table->gids[i].gid, in mlx4_ib_gid_index_to_real_index()
425 attr->gid_type == port_gid_table->gids[i].gid_type) { in mlx4_ib_gid_index_to_real_index()
426 ctx = port_gid_table->gids[i].ctx; in mlx4_ib_gid_index_to_real_index()