[PATCH 1/3] Add support for per cache flags

Thomas Graf tgraf at suug.ch
Mon Nov 12 10:14:48 EST 2012


On 11/12/12 at 06:41am, Roopa Prabhu wrote:
> On 11/12/12 6:30 AM, Thomas Graf wrote:
> >On 11/12/12 at 06:15am, Roopa Prabhu wrote:
> >>>Use Case 2: (Change setting of an individual cache)
> >>>         struct nl_cache *link_cache;
> >>>
> >>>         link_cache = rtnl_link_alloc_cache([...]);
> >>Am guessing you meant nl_alloc_cache here
> >
> >rtnl_link_alloc_cache() is just a shortcut for nl_alloc_cache()
> >of type route/link followed by a refill. By allowing to modify
> >the ops and then derive the cache flags from it we add support
> >for AF_ITER to the existing API functions.
> >
> 
> ok yes it can be used that way. But my only concern there was that it
> results in refill twice. Once in rtnl_link_alloc_cache and the other
> in nl_cache_mngr_add_cache.

I think we can live with that. It can be avoided by allocating the
cache via nl_cache_alloc() as you suggested.



More information about the libnl mailing list