diff options
author | Duncan Eastoe <duncan.eastoe@att.com> | 2020-12-22 22:23:43 +0100 |
---|---|---|
committer | Duncan Eastoe <duncan.eastoe@att.com> | 2020-12-22 22:27:52 +0100 |
commit | 911d4d48042472c7839000b70d95ffe483a5c8ed (patch) | |
tree | e597835b74d405352a4e1ae0f2d3c2639d181a0f /zebra/rt_netlink.c | |
parent | Merge pull request #7767 from mjstapp/fix_dplane_extra_info (diff) | |
download | frr-911d4d48042472c7839000b70d95ffe483a5c8ed.tar.xz frr-911d4d48042472c7839000b70d95ffe483a5c8ed.zip |
zebra: zebra2proto() handle kernel/connect type
When dplane_fpm_nl is used the "Please add this protocol(n) to proper
rt_netlink.c handling" debug message is emitted for any route of type
kernel or connected.
This severely reduces performance of dplane_fpm_nl when large numbers
of these routes are present in the RIB.
The messages are not observed when using the original fpm module since
this uses a custom function, netlink_proto_from_route_type().
zebra2proto() now returns RTPROT_KERNEL for ZEBRA_ROUTE_CONNECT and
ZEBRA_ROUTE_KERNEL. This should only impact dplane_fpm_nl's use of
the common netlink routines since these routes generally ignored via
checking of RSYSTEM_ROUTE().
Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r-- | zebra/rt_netlink.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index f59fbae3a..c034ea2fd 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -266,6 +266,10 @@ static inline int zebra2proto(int proto) case ZEBRA_ROUTE_NHG: proto = RTPROT_ZEBRA; break; + case ZEBRA_ROUTE_CONNECT: + case ZEBRA_ROUTE_KERNEL: + proto = RTPROT_KERNEL; + break; default: /* * When a user adds a new protocol this will show up |