summaryrefslogtreecommitdiff
path: root/pimd/pim_msdp_packet.h
diff options
context:
space:
mode:
authoranuradhak <anuradhak@cumulusnetworks.com>2016-11-30 16:14:20 -0800
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-12-21 20:26:17 -0500
commitc024cfacea98cefd48cf50e1191c164359c19ebe (patch)
tree377eac12fb8cd47501ecbc2f84fa7c2c442c6e15 /pimd/pim_msdp_packet.h
parentd52ff9b703bf4084a6a8fcd6c2e465c6f61d65b4 (diff)
pimd: Fix the number of SAs pushed into one MSDP SA-TLV
The entry_cnt in a SA TLV is one byte. I was trying to push 765 SAs into each TLV resulting in strange problems in a scale setup. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_msdp_packet.h')
-rw-r--r--pimd/pim_msdp_packet.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/pimd/pim_msdp_packet.h b/pimd/pim_msdp_packet.h
index a362ff11d5..f6fcfee6bb 100644
--- a/pimd/pim_msdp_packet.h
+++ b/pimd/pim_msdp_packet.h
@@ -55,7 +55,9 @@
PIM_MSDP_SA_Y_SIZE(entry_cnt))
/* SA TLV has to have atleast only one entry in it so x=8 + y=12 */
#define PIM_MSDP_SA_TLV_MIN_SIZE PIM_MSDP_SA_ENTRY_CNT2SIZE(1)
-#define PIM_MSDP_SA_MAX_ENTRY_CNT ((PIM_MSDP_SA_TLV_MAX_SIZE - PIM_MSDP_SA_X_SIZE)/PIM_MSDP_SA_ONE_ENTRY_SIZE)
+/* XXX: theoretically we can fix a max of 255 but that may result in packet
+ * fragmentation */
+#define PIM_MSDP_SA_MAX_ENTRY_CNT 120
#define PIM_MSDP_MAX_PACKET_SIZE max(PIM_MSDP_SA_TLV_MAX_SIZE, PIM_MSDP_KA_TLV_MAX_SIZE)