[PATCH 2/3] New cache manager add cache api

Thomas Graf tgraf at suug.ch
Mon Nov 12 04:40:22 EST 2012


On 11/11/12 at 05:08pm, roopa at cumulusnetworks.com wrote:
> From: roopa <roopa at cumulusnetworks.com>
> 
> This patch is an attempt to add a new nl_cache_mngr_add_cache api
> to allow adding an existing cache to cache manager.
> 
> Since the new api is similar to nl_cache_mngr_add
> except for allocating the cache, the patch moves most of the
> nl_cache_mngr_add code to nl_cache_mngr_add_cache and changes
> nl_cache_mngr_add to call nl_cache_mngr_add_cache.
> 
> One use case for this api as pointed out by thomas would be to set cache
> flags before associating the cache with a cache manager.
> 
> nl_cache_alloc_name("route/link", &cache);
> nl_cache_set_flags(cache, NL_CACHE_AF_ITER);
> nl_cache_mngr_add_cache(mngr, cache, ...);

Looks good



More information about the libnl mailing list