]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: drop NEWLINK event handling in the main thread 17180/head
authoranlan_cs <anlan_cs@126.com>
Sun, 20 Oct 2024 12:07:25 +0000 (20:07 +0800)
committeranlan_cs <anlan_cs@tom.com>
Tue, 22 Oct 2024 01:05:00 +0000 (09:05 +0800)
NEWLINK is only registered by the dplane thread, the main thread
doesn't care about it. So remove the real process of `netlink_link_change()`
for NEWLINK event in main thread.

And move NEWLINK/DELLINK event to the block where the dplane messages
are kept together.

Signed-off-by: anlan_cs <anlan_cs@126.com>
zebra/kernel_netlink.c

index 3547314f84526edb444854374904d73f8c23148f..2148d131ecbe49151d1223a26da601d5339394f4 100644 (file)
@@ -405,10 +405,6 @@ static int netlink_information_fetch(struct nlmsghdr *h, ns_id_t ns_id,
                return netlink_route_change(h, ns_id, startup);
        case RTM_DELROUTE:
                return netlink_route_change(h, ns_id, startup);
-       case RTM_NEWLINK:
-               return netlink_link_change(h, ns_id, startup);
-       case RTM_DELLINK:
-               return 0;
        case RTM_NEWNEIGH:
        case RTM_DELNEIGH:
        case RTM_GETNEIGH:
@@ -438,6 +434,8 @@ static int netlink_information_fetch(struct nlmsghdr *h, ns_id_t ns_id,
                return 0;
 
        /* Messages handled in the dplane thread */
+       case RTM_NEWLINK:
+       case RTM_DELLINK:
        case RTM_NEWADDR:
        case RTM_DELADDR:
        case RTM_NEWNETCONF: