Lines Matching refs:cache

55 	struct mesh_tx_cache *cache;  in mesh_fast_tx_deinit()  local
57 cache = &sdata->u.mesh.tx_cache; in mesh_fast_tx_deinit()
58 rhashtable_free_and_destroy(&cache->rht, in mesh_fast_tx_deinit()
64 struct mesh_tx_cache *cache; in mesh_fast_tx_init() local
66 cache = &sdata->u.mesh.tx_cache; in mesh_fast_tx_init()
67 rhashtable_init(&cache->rht, &fast_tx_rht_params); in mesh_fast_tx_init()
68 INIT_HLIST_HEAD(&cache->walk_head); in mesh_fast_tx_init()
69 spin_lock_init(&cache->walk_lock); in mesh_fast_tx_init()
425 static void mesh_fast_tx_entry_free(struct mesh_tx_cache *cache, in mesh_fast_tx_entry_free() argument
429 rhashtable_remove_fast(&cache->rht, &entry->rhash, fast_tx_rht_params); in mesh_fast_tx_entry_free()
438 struct mesh_tx_cache *cache; in mesh_fast_tx_get() local
440 cache = &sdata->u.mesh.tx_cache; in mesh_fast_tx_get()
441 entry = rhashtable_lookup(&cache->rht, key, fast_tx_rht_params); in mesh_fast_tx_get()
447 spin_lock_bh(&cache->walk_lock); in mesh_fast_tx_get()
448 entry = rhashtable_lookup(&cache->rht, key, fast_tx_rht_params); in mesh_fast_tx_get()
450 mesh_fast_tx_entry_free(cache, entry); in mesh_fast_tx_get()
451 spin_unlock_bh(&cache->walk_lock); in mesh_fast_tx_get()
471 struct mesh_tx_cache *cache; in mesh_fast_tx_cache() local
485 cache = &sdata->u.mesh.tx_cache; in mesh_fast_tx_cache()
486 if (atomic_read(&cache->rht.nelems) >= MESH_FAST_TX_CACHE_MAX_SIZE) in mesh_fast_tx_cache()
579 spin_lock(&cache->walk_lock); in mesh_fast_tx_cache()
580 prev = rhashtable_lookup_get_insert_fast(&cache->rht, in mesh_fast_tx_cache()
593 rhashtable_replace_fast(&cache->rht, &prev->rhash, in mesh_fast_tx_cache()
599 hlist_add_head(&entry->walk_list, &cache->walk_head); in mesh_fast_tx_cache()
602 spin_unlock(&cache->walk_lock); in mesh_fast_tx_cache()
610 struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache; in mesh_fast_tx_gc() local
614 if (atomic_read(&cache->rht.nelems) < MESH_FAST_TX_CACHE_THRESHOLD_SIZE) in mesh_fast_tx_gc()
617 spin_lock_bh(&cache->walk_lock); in mesh_fast_tx_gc()
618 hlist_for_each_entry_safe(entry, n, &cache->walk_head, walk_list) in mesh_fast_tx_gc()
620 mesh_fast_tx_entry_free(cache, entry); in mesh_fast_tx_gc()
621 spin_unlock_bh(&cache->walk_lock); in mesh_fast_tx_gc()
627 struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache; in mesh_fast_tx_flush_mpath() local
631 spin_lock_bh(&cache->walk_lock); in mesh_fast_tx_flush_mpath()
632 hlist_for_each_entry_safe(entry, n, &cache->walk_head, walk_list) in mesh_fast_tx_flush_mpath()
634 mesh_fast_tx_entry_free(cache, entry); in mesh_fast_tx_flush_mpath()
635 spin_unlock_bh(&cache->walk_lock); in mesh_fast_tx_flush_mpath()
641 struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache; in mesh_fast_tx_flush_sta() local
645 spin_lock_bh(&cache->walk_lock); in mesh_fast_tx_flush_sta()
646 hlist_for_each_entry_safe(entry, n, &cache->walk_head, walk_list) in mesh_fast_tx_flush_sta()
648 mesh_fast_tx_entry_free(cache, entry); in mesh_fast_tx_flush_sta()
649 spin_unlock_bh(&cache->walk_lock); in mesh_fast_tx_flush_sta()
655 struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache; in mesh_fast_tx_flush_addr() local
661 spin_lock_bh(&cache->walk_lock); in mesh_fast_tx_flush_addr()
664 entry = rhashtable_lookup_fast(&cache->rht, &key, fast_tx_rht_params); in mesh_fast_tx_flush_addr()
666 mesh_fast_tx_entry_free(cache, entry); in mesh_fast_tx_flush_addr()
668 spin_unlock_bh(&cache->walk_lock); in mesh_fast_tx_flush_addr()