Lines Matching refs:gid

157 bool rdma_is_zero_gid(const union ib_gid *gid)  in rdma_is_zero_gid()  argument
159 return !memcmp(gid, &zgid, sizeof(*gid)); in rdma_is_zero_gid()
202 return device->port_data[port].cache.gid; in rdma_gid_table()
244 port_num, entry->attr.index, entry->attr.gid.raw); in free_gid_entry_locked()
328 entry->attr.gid.raw); in store_gid_entry()
391 ix, table->data_vec[ix]->attr.gid.raw); in del_gid()
444 if (rdma_is_zero_gid(&attr->gid)) in add_modify_gid()
466 static int find_gid(struct ib_gid_table *table, const union ib_gid *gid, in find_gid() argument
520 memcmp(gid, &data->attr.gid, sizeof(*gid))) in find_gid()
540 static void make_default_gid(struct net_device *dev, union ib_gid *gid) in make_default_gid() argument
542 gid->global.subnet_prefix = cpu_to_be64(0xfe80000000000000LL); in make_default_gid()
543 addrconf_ifid_eui48(&gid->raw[8], dev); in make_default_gid()
547 union ib_gid *gid, struct ib_gid_attr *attr, in __ib_cache_gid_add() argument
559 if (rdma_is_zero_gid(gid)) in __ib_cache_gid_add()
566 ix = find_gid(table, gid, attr, default_gid, mask, &empty); in __ib_cache_gid_add()
577 attr->gid = *gid; in __ib_cache_gid_add()
586 __func__, gid->raw, ret); in __ib_cache_gid_add()
591 union ib_gid *gid, struct ib_gid_attr *attr) in ib_cache_gid_add() argument
597 return __ib_cache_gid_add(ib_dev, port, gid, attr, mask, false); in ib_cache_gid_add()
602 union ib_gid *gid, struct ib_gid_attr *attr, in _ib_cache_gid_del() argument
613 ix = find_gid(table, gid, attr, default_gid, mask, NULL); in _ib_cache_gid_del()
626 __func__, gid->raw, ret); in _ib_cache_gid_del()
631 union ib_gid *gid, struct ib_gid_attr *attr) in ib_cache_gid_del() argument
638 return _ib_cache_gid_del(ib_dev, port, gid, attr, mask, false); in ib_cache_gid_del()
684 const union ib_gid *gid, in rdma_find_gid_by_port() argument
705 local_index = find_gid(table, gid, &val, false, mask, NULL); in rdma_find_gid_by_port()
737 struct ib_device *ib_dev, const union ib_gid *gid, u32 port, in rdma_find_gid_by_filter() argument
738 bool (*filter)(const union ib_gid *gid, const struct ib_gid_attr *, in rdma_find_gid_by_filter() argument
759 if (memcmp(gid, &entry->attr.gid, sizeof(*gid))) in rdma_find_gid_by_filter()
762 if (filter(gid, &entry->attr, context)) { in rdma_find_gid_by_filter()
842 union ib_gid gid = { }; in ib_cache_gid_set_default_gid() local
860 make_default_gid(ndev, &gid); in ib_cache_gid_set_default_gid()
861 __ib_cache_gid_add(ib_dev, port, &gid, in ib_cache_gid_set_default_gid()
864 _ib_cache_gid_del(ib_dev, port, &gid, in ib_cache_gid_set_default_gid()
890 release_gid_table(ib_dev, ib_dev->port_data[p].cache.gid); in gid_table_release_one()
891 ib_dev->port_data[p].cache.gid = NULL; in gid_table_release_one()
907 ib_dev->port_data[rdma_port].cache.gid = table; in _gid_table_setup_one()
922 ib_dev->port_data[p].cache.gid); in gid_table_cleanup_one()
954 int index, union ib_gid *gid) in rdma_query_gid() argument
976 memcpy(gid, &table->data_vec[index]->attr.gid, sizeof(*gid)); in rdma_query_gid()
1016 const union ib_gid *gid, in rdma_find_gid() argument
1033 table = device->port_data[p].cache.gid; in rdma_find_gid()
1035 index = find_gid(table, gid, &gid_attr_val, false, mask, NULL); in rdma_find_gid()
1277 memcpy(&entries->gid, &gid_attr->gid, in rdma_query_gid_table()
1278 sizeof(gid_attr->gid)); in rdma_query_gid_table()
1453 ret = device->ops.query_gid(device, port, i, &gid_attr.gid); in config_non_roce_gid_cache()
1473 be64_to_cpu(gid_attr.gid.global.subnet_prefix); in config_non_roce_gid_cache()