]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: zebra2proto() handle kernel/connect type 7788/head
authorDuncan Eastoe <duncan.eastoe@att.com>
Tue, 22 Dec 2020 21:23:43 +0000 (21:23 +0000)
committerDuncan Eastoe <duncan.eastoe@att.com>
Tue, 22 Dec 2020 21:27:52 +0000 (21:27 +0000)
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>
zebra/rt_netlink.c

index f59fbae3afebb6af2c5b4c4976bd5572c463c0f2..c034ea2fd2d7ef04aa63fe55d30761a03bcb295e 100644 (file)
@@ -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