Lines Matching refs:cache

250 	struct ib_gid_table **ports_table = ib_dev->cache.gid_cache;  in ib_cache_gid_add()
301 struct ib_gid_table **ports_table = ib_dev->cache.gid_cache; in ib_cache_gid_del()
326 struct ib_gid_table **ports_table = ib_dev->cache.gid_cache; in ib_cache_gid_del_all_netdev_gids()
345 struct ib_gid_table **ports_table = ib_dev->cache.gid_cache; in __ib_cache_gid_get()
377 struct ib_gid_table **ports_table = ib_dev->cache.gid_cache; in _ib_cache_gid_table_find()
418 struct ib_gid_table **ports_table = ib_dev->cache.gid_cache; in ib_find_cached_gid_by_port()
472 struct ib_gid_table **ports_table = ib_dev->cache.gid_cache; in ib_cache_gid_find_by_filter()
573 struct ib_gid_table **ports_table = ib_dev->cache.gid_cache; in ib_cache_gid_set_default_gid()
664 ib_dev->cache.gid_cache = table; in _gid_table_setup_one()
680 struct ib_gid_table **table = ib_dev->cache.gid_cache; in gid_table_release_one()
690 ib_dev->cache.gid_cache = NULL; in gid_table_release_one()
695 struct ib_gid_table **table = ib_dev->cache.gid_cache; in gid_table_cleanup_one()
771 struct ib_pkey_cache *cache; in ib_get_cached_pkey() local
778 read_lock_irqsave(&device->cache.lock, flags); in ib_get_cached_pkey()
780 cache = device->cache.pkey_cache[port_num - rdma_start_port(device)]; in ib_get_cached_pkey()
782 if (index < 0 || index >= cache->table_len) in ib_get_cached_pkey()
785 *pkey = cache->table[index]; in ib_get_cached_pkey()
787 read_unlock_irqrestore(&device->cache.lock, flags); in ib_get_cached_pkey()
798 struct ib_pkey_cache *cache; in ib_find_cached_pkey() local
807 read_lock_irqsave(&device->cache.lock, flags); in ib_find_cached_pkey()
809 cache = device->cache.pkey_cache[port_num - rdma_start_port(device)]; in ib_find_cached_pkey()
813 for (i = 0; i < cache->table_len; ++i) in ib_find_cached_pkey()
814 if ((cache->table[i] & 0x7fff) == (pkey & 0x7fff)) { in ib_find_cached_pkey()
815 if (cache->table[i] & 0x8000) { in ib_find_cached_pkey()
828 read_unlock_irqrestore(&device->cache.lock, flags); in ib_find_cached_pkey()
839 struct ib_pkey_cache *cache; in ib_find_exact_cached_pkey() local
847 read_lock_irqsave(&device->cache.lock, flags); in ib_find_exact_cached_pkey()
849 cache = device->cache.pkey_cache[port_num - rdma_start_port(device)]; in ib_find_exact_cached_pkey()
853 for (i = 0; i < cache->table_len; ++i) in ib_find_exact_cached_pkey()
854 if (cache->table[i] == pkey) { in ib_find_exact_cached_pkey()
860 read_unlock_irqrestore(&device->cache.lock, flags); in ib_find_exact_cached_pkey()
876 read_lock_irqsave(&device->cache.lock, flags); in ib_get_cached_lmc()
877 *lmc = device->cache.lmc_cache[port_num - rdma_start_port(device)]; in ib_get_cached_lmc()
878 read_unlock_irqrestore(&device->cache.lock, flags); in ib_get_cached_lmc()
896 struct ib_gid_table **ports_table = device->cache.gid_cache; in ib_cache_update()
953 write_lock_irq(&device->cache.lock); in ib_cache_update()
955 old_pkey_cache = device->cache.pkey_cache[port - rdma_start_port(device)]; in ib_cache_update()
957 device->cache.pkey_cache[port - rdma_start_port(device)] = pkey_cache; in ib_cache_update()
965 device->cache.lmc_cache[port - rdma_start_port(device)] = tprops->lmc; in ib_cache_update()
967 write_unlock_irq(&device->cache.lock); in ib_cache_update()
1016 rwlock_init(&device->cache.lock); in ib_cache_setup_one()
1018 device->cache.pkey_cache = in ib_cache_setup_one()
1019 kzalloc(sizeof *device->cache.pkey_cache * in ib_cache_setup_one()
1021 device->cache.lmc_cache = kmalloc(sizeof *device->cache.lmc_cache * in ib_cache_setup_one()
1025 if (!device->cache.pkey_cache || in ib_cache_setup_one()
1026 !device->cache.lmc_cache) { in ib_cache_setup_one()
1040 INIT_IB_EVENT_HANDLER(&device->cache.event_handler, in ib_cache_setup_one()
1042 err = ib_register_event_handler(&device->cache.event_handler); in ib_cache_setup_one()
1063 if (device->cache.pkey_cache) in ib_cache_release_one()
1066 kfree(device->cache.pkey_cache[p]); in ib_cache_release_one()
1069 kfree(device->cache.pkey_cache); in ib_cache_release_one()
1070 kfree(device->cache.lmc_cache); in ib_cache_release_one()
1082 ib_unregister_event_handler(&device->cache.event_handler); in ib_cache_cleanup_one()