| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
| |
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
|
|
| |
<netlink/cache-api.h> alreay requires <netlink/cache.h> anyway.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support to iter over all supported families
during cache fill and resync.
The motivation for this was previously introduced at
http://lists.infradead.org/pipermail/libnl/2012-November/000734.html
In short, this patch allows caches to request dump on all supported
families instead of only AF_UNSPEC as done today.
With feedback from thomas this patch makes the iter over all families
conditional on per cache flag NL_CACHE_AF_ITER
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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, ...);
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
|
|
|
|
| |
This patch adds support for per cache flags
and adds a flag NL_CACHE_AF_ITER to iter over all
supported families when filling the cache.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
|
|
|
| |
Use of a custom stylesheet breaks with almost every release of doxygen
and is thus completely unuseable.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
| |
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
|
|
|
| |
- multicast and anycast address only supported with IPv6
- brodcast address only supported with IPv4
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
| |
Sigend-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
| |
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
|
|
|
| |
The reference counter of the linked object must be dec'ed
before freeing the node or the reference is leaked.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
| |
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
|
|
| |
Do not pollute public namespace with unprefixed functions.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
|
|
|
|
|
|
| |
This patch adds keygen function to route object
Signed-off-by: Shrijeet Mukherjee <shm@cumulusnetworks.com>
Signed-off-by: Nolan Leake <nolan@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Reviewed-by: Wilson Kok <wkok@cumulusnetworks.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
|
|
|
|
|
|
| |
This patch adds keygen function to the neigh object
Signed-off-by: Shrijeet Mukherjee <shm@cumulusnetworks.com>
Signed-off-by: Nolan Leake <nolan@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Reviewed-by: Wilson Kok <wkok@cumulusnetworks.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
|
|
|
|
|
|
| |
This patch adds keygen function to link cache
Signed-off-by: Shrijeet Mukherjee <shm@cumulusnetworks.com>
Signed-off-by: Nolan Leake <nolan@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Reviewed-by: Wilson Kok <wkok@cumulusnetworks.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support to create, delete modify hash table for a cache
Signed-off-by: Shrijeet Mukherjee <shm@cumulusnetworks.com>
Signed-off-by: Nolan Leake <nolan@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Reviewed-by: Wilson Kok <wkok@cumulusnetworks.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds the required structures and access functions to create
and manage hashtables for netlink cache objects
Signed-off-by: Shrijeet Mukherjee <shm@cumulusnetworks.com>
Signed-off-by: Nolan Leake <nolan@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Reviewed-by: Wilson Kok <wkok@cumulusnetworks.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a hash function for hashing libnl objects.
This hash function is from:
http://ccodearchive.net/info/hash.html
The original code was modified to remove unwanted dependencies,
unwanted code and fixes to header file locations
One requirement with this hash function is, hashing over multiple fields of an
un-packed struct requires that the struct be zeroed, otherwise random padding
bytes will change the hash.
Signed-off-by: Shrijeet Mukherjee <shm@cumulusnetworks.com>
Signed-off-by: Nolan Leake <nolan@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Reviewed-by: Wilson Kok <wkok@cumulusnetworks.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
|
|
|
| |
Signed-off-by: Thomas Graf <tgraf@redhat.com>
|
|
|
|
| |
Signed-off-by: Thomas Graf <tgraf@redhat.com>
|
|
|
|
|
|
|
|
| |
Up to now only calls to nl_send_auto() could be overwritten with
nl_cb_overwrite_send(). This patch extends the capability to
nl_send()
Signed-off-by: Thomas Graf <tgraf@redhat.com>
|
|
|
|
| |
Signed-off-by: Thomas Graf <tgraf@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
Make nl_sendto() return NLE_INVAL if provided buffer is NULL
and make it return NLE_BAD_SOCK if the socket is not connected.
Add note in docs about lack of NL_CB_MSG_OUT invokation
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
iov.iov_base is either NULL or invalid
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support to update a cache object during cache_include instead
of the current approach of deleting the original object and adding a new one.
This operation is conditional on the object implementing the operation. If
the update is not successful, cache_include falls back to the existing cache
inclusion process of deleting and adding the object.
It adds a new object operation called oo_update. oo_update takes two objects
as arguments, first being the existing cache object that needs update, the
second argument being the new object. Currently it is left to the implementor
to use the msg type to decide wether to delete or add the new object attributes
to the old one. But the operation type or msg type can be easily made part of the
object arguments.
The motivation for this change is explained below in the context of including
support for AF_BRIDGE objects into the link cache.
libnl today deletes an object before it includes an identical object.
But for some objects like the AF_BRIDGE objects this does not work well.
link cache uses the ifindex as its key in object searches.
If link cache were to support AF_BRIDGE family objects, todays implementation,
- will replace the original link object with the bridge port link object
for add notifications
- And a bridge port delete notification from kernel would delete the
link object from the cache leaving the cache without the link object
until the kernel sends another notification for that link
The bridge port link notification contains some base link object attributes
plus bridge specific protocol info attributes. In such cases we think an
operation to update the existing object in place in cache might be useful.
This can be made to work for AF_INET6 link objects too.
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current oo_id_attrs nl_object op allows a fixed
id attribute list for an cache. But a cache with multiple families
may need to specify different id attributes for different families.
An example for this is the bridge fdb entries in the neigh cache:
neigh entries belonging to the AF_UNSPEC family use
(NEIGH_ATTR_IFINDEX | NEIGH_ATTR_DST | NEIGH_ATTR_FAMILY) as id attributes.
AF_BRIDGE fdb entries which also support the same msg type, will need to use
(NEIGH_ATTR_LLADDR | NEIGH_ATTR_FAMILY) as id attributes.
Today you cannot specify different set of attributes to two families belonging
to the same cache.
This patch adds a new object function oo_id_attrs_get to get the attributes.
An example implementation of oo_id_attrs_get for the neigh cache will
look like:
static uint32_t neigh_id_attrs_get(struct nl_object *obj)
{
struct rtnl_neigh *neigh = (struct rtnl_neigh *)obj;
if (neigh->n_family == AF_BRIDGE)
return (NEIGH_ATTR_LLADDR | NEIGH_ATTR_FAMILY);
else
return (NEIGH_ATTR_IFINDEX | NEIGH_ATTR_DST | NEIGH_ATTR_FAMILY);
}
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>
|
|
|
|
|
| |
Make sure we leave neightbl_msg_parser() by setting the proper err variable and
freeing ntbl
|
|
|
|
| |
Add missing va_end() calls on all error paths
|
|
|
|
| |
This code gets never called anyway
|
| |
|
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|