Lines Matching full:cache

2  * lib/cache_mngt.c	Cache Management
24 * #include <netlink/cache.h>
30 #include <netlink/cache.h>
37 * @name Cache Operations Sets
54 * @arg ops Cache operations
63 * @arg ops Cache operations
71 * Lookup cache operations by name
72 * @arg name name of the cache type
77 * @return The cache operations or NULL if not found.
91 * Lookup cache operations by name
92 * @arg name name of the cache type
94 * @note The reference counter of the returned cache operation is incremented
97 * @return The cache operations or NULL if not found.
129 * Associate protocol and message type to cache operations
138 * @return The cache operations or NULL if no match found.
152 * Associate protocol and message type to cache operations
156 * Searches the registered cache operations for a matching protocol
159 * @note The reference counter of the returned cache operation is incremented
162 * @return The cache operations or NULL if no no match was found.
177 * Lookup message type cache association
178 * @arg ops cache operations
182 * cache operations.
185 * to the lifetime of the underlying cache operations.
214 * Call a function for each registered cache operation
230 * @arg ops Cache ops
233 * The cache operation flags will be derived to all caches allocates
234 * based on this set of cache operations.
244 * Register a set of cache operations
245 * @arg ops cache operations
248 * a certain cache type.
268 NL_DBG(1, "Registered cache operations %s\n", ops->co_name); in nl_cache_mngt_register()
274 * Unregister a set of cache operations
275 * @arg ops cache operations
278 * cache operations is no longer available. The
279 * specified cache operations must have been registered
305 NL_DBG(1, "Unregistered cache operations %s\n", ops->co_name); in nl_cache_mngt_unregister()
317 * @name Global Cache Provisioning/Requiring
322 * Provide a cache for global use
323 * @arg cache cache to provide
325 * Offers the specified cache to be used by other modules.
326 * Only one cache per type may be shared at a time,
329 void nl_cache_mngt_provide(struct nl_cache *cache) in nl_cache_mngt_provide() argument
335 ops = cache_ops_lookup_for_obj(cache->c_ops->co_obj_ops); in nl_cache_mngt_provide()
339 nl_cache_get(cache); in nl_cache_mngt_provide()
342 * Hold a reference to the cache operations to ensure the in nl_cache_mngt_provide()
343 * ops don't go away while we use it to store the cache pointer. in nl_cache_mngt_provide()
348 ops->co_major_cache = cache; in nl_cache_mngt_provide()
355 * Unprovide a cache for global use
356 * @arg cache cache to unprovide
358 * Cancels the offer to use a cache globally. The
359 * cache will no longer be returned via lookups but
362 void nl_cache_mngt_unprovide(struct nl_cache *cache) in nl_cache_mngt_unprovide() argument
368 ops = cache_ops_lookup_for_obj(cache->c_ops->co_obj_ops); in nl_cache_mngt_unprovide()
371 else if (ops->co_major_cache == cache) { in nl_cache_mngt_unprovide()
383 struct nl_cache *cache = NULL; in __nl_cache_mngt_require() local
387 cache = ops->co_major_cache; in __nl_cache_mngt_require()
391 return cache; in __nl_cache_mngt_require()
395 * Return cache previously provided via nl_cache_mngt_provide()
396 * @arg name Name of cache to lookup
403 * @return Pointer to cache or NULL if none registered
407 struct nl_cache *cache; in nl_cache_mngt_require() local
409 if (!(cache = __nl_cache_mngt_require(name))) in nl_cache_mngt_require()
412 "%s cache to be used for internal lookups.\nSee the " in nl_cache_mngt_require()
415 return cache; in nl_cache_mngt_require()
419 * Return cache previously provided via nl_cache_mngt_provide()
420 * @arg name Name of cache to lookup
422 * @note The reference counter of the returned cache is incremented
425 * @return Pointer to cache or NULL if none registered
429 struct nl_cache *cache; in nl_cache_mngt_require_safe() local
431 if ((cache = nl_cache_mngt_require(name))) in nl_cache_mngt_require_safe()
432 nl_cache_get(cache); in nl_cache_mngt_require_safe()
434 return cache; in nl_cache_mngt_require_safe()