]> git.proxmox.com Git - mirror_frr.git/commit - lib/mpls.h
Implement generic label manager
authorßingen <bingen@voltanet.io>
Mon, 20 Mar 2017 14:34:49 +0000 (15:34 +0100)
committerßingen <bingen@voltanet.io>
Mon, 20 Mar 2017 16:10:41 +0000 (17:10 +0100)
commitfea12efb86407248c6baea2df49e4f03d564dad8
treeffa410618f4629af446b28743c944750a6302df6
parent138f894409bb5d0a766b4b0f95578235ff67976c
Implement generic label manager

Label Manager allows to share MPLS label space among different
daemons. Each daemon can request a chunk of consecutive labels and
release it if it doesn't need them anymore. Label Manager stores the
daemon protocol and instance to identify the owner client. It uses them
to perform garbage collection, releasing all label chunks from a client
when it gets disconnected or reconnected.

Additionally, every client can request that the chunk is never garbage
collected. In that case client has the responsibility to release
non-used labels.

Zebra can host the label manager itself (if no -l param is provided) or
connect to an external one using zserv/zclient (providing its address
with -l param).

Client code is in lib/zclient.c, but currently only LDP is using it.

TODO: Allow for custom ranges requests, i.e., specify the start label
besides the chunk.
TODO: Release labels from LDP.

Signed-off-by: Bingen Eguzkitza <bingen@voltanet.io>
15 files changed:
ldpd/lde.c
ldpd/lde.h
ldpd/ldpd.c
ldpd/ldpd.h
lib/log.c
lib/mpls.h
lib/zclient.c
lib/zclient.h
tests/test_lblmgr.c [new file with mode: 0644]
zebra/Makefile.am
zebra/label_manager.c [new file with mode: 0644]
zebra/label_manager.h [new file with mode: 0644]
zebra/main.c
zebra/zserv.c
zebra/zserv.h