]> granicus.if.org Git - libnl/commit
Add AF_BRIDGE support to link cache
authorroopa <roopa@cumulusnetworks.com>
Wed, 14 Nov 2012 14:06:41 +0000 (06:06 -0800)
committerThomas Graf <tgraf@suug.ch>
Wed, 14 Nov 2012 14:18:08 +0000 (15:18 +0100)
commit125119aff05e16f150ad881dc9479686495cb5bd
tree002f6529fbb82de2bdc084c06eb3f17f43d17620
parentea79a762886a6b723e70686c5db0ec4d8bf707a6
Add AF_BRIDGE support to link cache

This patch was previously submitted as the first approach in
RFC http://lists.infradead.org/pipermail/libnl/2012-November/000730.html

It adds support for AF_BRIDGE family in link cache.
And the key for link object lookups will now be ifindex and family.

This allows for AF_UNSPEC rtnl link objects to co-exist with the AF_BRIDGE
link objects in the same cache.

I have changed some of the rtnl_link api's to explicitly check for
AF_UNSPEC to not break existing apps. I will submit a new patch to
introduce equivalent rtnl_bridge_link_* api's.

We had also discussed updating the existing link objects with
AF_BRIDGE attributes, but realized that the updates to link objects will
be both AF_UNSPEC and AF_BRIDGE. And that would change link cache to always
update existing objects, resulting in comparing and updating close to
thirty attributes at cache_include time which seems like a overkill.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Reviewed-by: Nolan Leake <nolan@cumulusnetworks.com>
Reviewed-by: Shrijeet Mukherjee <shm@cumulusnetworks.com>
Reviewed-by: Wilson Kok <wkok@cumulusnetworks.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
lib/route/link.c