]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: restart the ka timer after the sa adv timer
authoranuradhak <anuradhak@cumulusnetworks.com>
Thu, 1 Dec 2016 23:46:36 +0000 (15:46 -0800)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:17 +0000 (20:26 -0500)
To avoid unnecessary ka activity in the network. When the SA
advertisment timer fires we build SA TLVs and send them to peers. As a
part of this tx we were also restarting the ka timer to avoid
unnecessary ka generation in the next 60 seconds. However because the
adv timer was restarted after tx (i.e. after ka restart) ka timer would
always endup firing just before the adv timer.

pimd/pim_msdp.c
pimd/pim_msdp_packet.c

index 3562a0e3484bce2db2a74650a2f216c66c4f9e91..d327984132f6aed7aae668fc14140e3baff396fb 100644 (file)
@@ -73,8 +73,8 @@ pim_msdp_sa_adv_timer_cb(struct thread *t)
     zlog_debug("MSDP SA advertisment timer expired");
   }
 
-  pim_msdp_pkt_sa_tx();
   pim_msdp_sa_adv_timer_setup(true /* start */);
+  pim_msdp_pkt_sa_tx();
   return 0;
 }
 static void
@@ -974,6 +974,9 @@ pim_msdp_peer_pkt_txed(struct pim_msdp_peer *mp)
 {
   if (mp->state == PIM_MSDP_ESTABLISHED) {
     pim_msdp_peer_ka_timer_setup(mp, true /* start */);
+    if (PIM_DEBUG_MSDP_INTERNAL) {
+      zlog_debug("MSDP ka timer restart on pkt tx to %s", mp->key_str);
+    }
   }
 }
 
index 8ee45813ca3624a008c7c6fb951f9d134e65c289..3f3f9d1de0b40e656e5fd4f5ae1d8650ff512a26 100644 (file)
@@ -194,7 +194,7 @@ pim_msdp_write(struct thread *thread)
   enum pim_msdp_tlv type;
   int len;
   int work_cnt = 0;
-  int work_max_cnt = 1;
+  int work_max_cnt = 12;
 
   mp = THREAD_ARG(thread);
   mp->t_write = NULL;