]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Remove peer->sync array
authorDonald Sharp <sharpd@nvidia.com>
Fri, 21 Jul 2023 16:41:35 +0000 (12:41 -0400)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Fri, 21 Jul 2023 20:15:18 +0000 (20:15 +0000)
It is never used.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit c81d6d4d5fbd551888d9297038fa19eb27ef9d50)

bgpd/bgp_advertise.c
bgpd/bgp_advertise.h
bgpd/bgpd.c
bgpd/bgpd.h
bgpd/rfapi/rfapi.c
bgpd/rfapi/vnc_zebra.c

index 9686b08a983ee883eee1f11be1012ea6bda318e8..da7b496d65f29f502aabd6857c32a5c1c34bfe0d 100644 (file)
@@ -219,29 +219,3 @@ bool bgp_adj_in_unset(struct bgp_dest *dest, struct peer *peer,
 
        return true;
 }
-
-void bgp_sync_init(struct peer *peer)
-{
-       afi_t afi;
-       safi_t safi;
-       struct bgp_synchronize *sync;
-
-       FOREACH_AFI_SAFI (afi, safi) {
-               sync = XCALLOC(MTYPE_BGP_SYNCHRONISE,
-                              sizeof(struct bgp_synchronize));
-               bgp_adv_fifo_init(&sync->update);
-               bgp_adv_fifo_init(&sync->withdraw);
-               bgp_adv_fifo_init(&sync->withdraw_low);
-               peer->sync[afi][safi] = sync;
-       }
-}
-
-void bgp_sync_delete(struct peer *peer)
-{
-       afi_t afi;
-       safi_t safi;
-
-       FOREACH_AFI_SAFI (afi, safi) {
-               XFREE(MTYPE_BGP_SYNCHRONISE, peer->sync[afi][safi]);
-       }
-}
index c5e2a5f216f1bb1c13f815d2d9d68429ed0b2d7f..c461f231b4529891e200e543b05f37b450db1462 100644 (file)
@@ -135,8 +135,6 @@ extern bool bgp_adj_in_unset(struct bgp_dest *dest, struct peer *peer,
                             uint32_t addpath_id);
 extern void bgp_adj_in_remove(struct bgp_dest *dest, struct bgp_adj_in *bai);
 
-extern void bgp_sync_init(struct peer *peer);
-extern void bgp_sync_delete(struct peer *peer);
 extern unsigned int bgp_advertise_attr_hash_key(const void *p);
 extern bool bgp_advertise_attr_hash_cmp(const void *p1, const void *p2);
 extern void bgp_advertise_add(struct bgp_advertise_attr *baa,
index 14d231f313212eaf9fc1cf781dbdc62e356a77d3..86bded14bbfc8f6ab9678f9ece692588f7fa9fd4 100644 (file)
@@ -1172,8 +1172,6 @@ static void peer_free(struct peer *peer)
        if (peer->clear_node_queue)
                work_queue_free_and_null(&peer->clear_node_queue);
 
-       bgp_sync_delete(peer);
-
        XFREE(MTYPE_PEER_CONF_IF, peer->conf_if);
 
        XFREE(MTYPE_BGP_SOFT_VERSION, peer->soft_version);
@@ -1418,8 +1416,6 @@ struct peer *peer_new(struct bgp *bgp)
        peer->ibuf_work =
                ringbuf_new(BGP_MAX_PACKET_SIZE * BGP_READ_PACKET_MAX);
 
-       bgp_sync_init(peer);
-
        /* Get service port number.  */
        sp = getservbyname("bgp", "tcp");
        peer->port = (sp == NULL) ? BGP_PORT_DEFAULT : ntohs(sp->s_port);
index 637f991c86113d9731b298a1aa806d213eef5284..c3b806c6dc5921aa278ba66b75ca8d495a17850d 100644 (file)
@@ -1595,8 +1595,6 @@ struct peer {
        uint8_t update_delay_over; /* When this is set, BGP is no more waiting
                                     for EOR */
 
-       /* Syncronization list and time.  */
-       struct bgp_synchronize *sync[AFI_MAX][SAFI_MAX];
        time_t synctime;
        /* timestamp when the last UPDATE msg was written */
        _Atomic time_t last_write;
index e5e3261f086803ad22d66337fcbf132fbf22901a..985094d3232fa9d551342654f4d151fd10b98680 100644 (file)
@@ -1237,7 +1237,6 @@ static int rfapi_open_inner(struct rfapi_descriptor *rfd, struct bgp *bgp,
         */
        rfd->peer = peer_new(bgp);
        rfd->peer->status = Established; /* keep bgp core happy */
-       bgp_sync_delete(rfd->peer);      /* don't need these */
 
        /*
         * since this peer is not on the I/O thread, this lock is not strictly
index f7de651c11c58c0dc46d71b9c36d1ee0ab1f8ac8..284982d659bfb4524dd2f2721baf29ebef31442e 100644 (file)
@@ -173,7 +173,6 @@ static void vnc_redistribute_add(struct prefix *p, uint32_t metric,
                        vncHD1VR.peer = peer_new(bgp);
                        vncHD1VR.peer->status =
                                Established; /* keep bgp core happy */
-                       bgp_sync_delete(vncHD1VR.peer); /* don't need these */
 
                        /*
                         * since this peer is not on the I/O thread, this lock