Lines Matching defs:cache

54 	struct mesh_tx_cache *cache;
56 cache = &sdata->u.mesh.tx_cache;
57 rhashtable_free_and_destroy(&cache->rht,
63 struct mesh_tx_cache *cache;
65 cache = &sdata->u.mesh.tx_cache;
66 rhashtable_init(&cache->rht, &fast_tx_rht_params);
67 INIT_HLIST_HEAD(&cache->walk_head);
68 spin_lock_init(&cache->walk_lock);
420 static void mesh_fast_tx_entry_free(struct mesh_tx_cache *cache,
424 rhashtable_remove_fast(&cache->rht, &entry->rhash, fast_tx_rht_params);
432 struct mesh_tx_cache *cache;
434 cache = &sdata->u.mesh.tx_cache;
435 entry = rhashtable_lookup(&cache->rht, addr, fast_tx_rht_params);
441 spin_lock_bh(&cache->walk_lock);
442 entry = rhashtable_lookup(&cache->rht, addr, fast_tx_rht_params);
444 mesh_fast_tx_entry_free(cache, entry);
445 spin_unlock_bh(&cache->walk_lock);
465 struct mesh_tx_cache *cache;
479 cache = &sdata->u.mesh.tx_cache;
480 if (atomic_read(&cache->rht.nelems) >= MESH_FAST_TX_CACHE_MAX_SIZE)
567 spin_lock(&cache->walk_lock);
568 prev = rhashtable_lookup_get_insert_fast(&cache->rht,
581 rhashtable_replace_fast(&cache->rht, &prev->rhash,
587 hlist_add_head(&entry->walk_list, &cache->walk_head);
590 spin_unlock(&cache->walk_lock);
598 struct mesh_tx_cache *cache;
602 cache = &sdata->u.mesh.tx_cache;
603 if (atomic_read(&cache->rht.nelems) < MESH_FAST_TX_CACHE_THRESHOLD_SIZE)
606 spin_lock_bh(&cache->walk_lock);
607 hlist_for_each_entry_safe(entry, n, &cache->walk_head, walk_list)
609 mesh_fast_tx_entry_free(cache, entry);
610 spin_unlock_bh(&cache->walk_lock);
616 struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache;
620 cache = &sdata->u.mesh.tx_cache;
621 spin_lock_bh(&cache->walk_lock);
622 hlist_for_each_entry_safe(entry, n, &cache->walk_head, walk_list)
624 mesh_fast_tx_entry_free(cache, entry);
625 spin_unlock_bh(&cache->walk_lock);
631 struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache;
635 cache = &sdata->u.mesh.tx_cache;
636 spin_lock_bh(&cache->walk_lock);
637 hlist_for_each_entry_safe(entry, n, &cache->walk_head, walk_list)
639 mesh_fast_tx_entry_free(cache, entry);
640 spin_unlock_bh(&cache->walk_lock);
646 struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache;
649 cache = &sdata->u.mesh.tx_cache;
650 spin_lock_bh(&cache->walk_lock);
651 entry = rhashtable_lookup_fast(&cache->rht, addr, fast_tx_rht_params);
653 mesh_fast_tx_entry_free(cache, entry);
654 spin_unlock_bh(&cache->walk_lock);