]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Do not process workqueue upon instance delete
authorvivek <vivek@cumulusnetworks.com>
Thu, 9 Jun 2016 01:14:17 +0000 (18:14 -0700)
committervivek <vivek@cumulusnetworks.com>
Thu, 9 Jun 2016 01:14:17 +0000 (18:14 -0700)
During instance cleanup, an earlier patch walked the workqueue in order
to process queued routes of the instance. However, since the workqueue
is not per instance, the code walks and immediately processes all routes
across all instances.

This may not be ideal in the presence of VRFs, when multiple instances
will be a fact. Revert that part of the change from earlier patch. This
needs to be revisited later for a better solution.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Updates: bb86c6017eccd03ea1554c7bdef5949cf676f208

bgpd/bgpd.c

index eda43d2b600767158026e48c2d9a1079290fa4ec..c5587c26087bd106ac2fc95b5fff09b4918e08d8 100644 (file)
@@ -2035,9 +2035,6 @@ peer_delete (struct peer *peer)
       peer->domainname = NULL;
     }
   
-  if (CHECK_FLAG(bgp->flags, BGP_FLAG_DELETING))
-    bgp_peer_clear_node_queue_drain_immediate(peer);
-
   peer_unlock (peer); /* initial reference */
 
   return 0;
@@ -3100,15 +3097,6 @@ bgp_delete (struct bgp *bgp)
 
   /* TODO - Other memory may need to be freed - e.g., NHT */
 
-  /*
-   * Free pending deleted routes. Unfortunately, it also has to process
-   * all the pending activity for other instances of struct bgp.
-   *
-   * This call was added to achieve clean memory allocation at exit,
-   * for the sake of valgrind.
-   */
-  bgp_process_queues_drain_immediate();
-
   /* Remove visibility via the master list - there may however still be
    * routes to be processed still referencing the struct bgp.
    */