if (peer->t_routeadv)
return;
+ /*
+ * Since the following is a do while loop
+ * let's stop adding to the outq if we are
+ * already at the limit.
+ */
+ if (peer->obuf->count >= bm->outq_limit) {
+ bgp_write_proceed_actions(peer);
+ return;
+ }
+
do {
enum bgp_af_index index;
bgp_packet_add(peer, s);
bpacket_queue_advance_peer(paf);
}
- } while (s && (++generated < wpq));
+ } while (s && (++generated < wpq) &&
+ (peer->obuf->count <= bm->outq_limit));
if (generated)
bgp_writes_on(peer);
vty_out(vty, "bgp session-dscp %u\n", bm->tcp_dscp >> 2);
/* BGP InQ limit */
- if (bm->inq_limit != BM_DEFAULT_INQ_LIMIT)
+ if (bm->inq_limit != BM_DEFAULT_Q_LIMIT)
vty_out(vty, "bgp input-queue-limit %u\n", bm->inq_limit);
+ if (bm->outq_limit != BM_DEFAULT_Q_LIMIT)
+ vty_out(vty, "bgp output-queue-limit %u\n", bm->outq_limit);
+
/* BGP configuration. */
for (ALL_LIST_ELEMENTS(bm->bgp, mnode, mnnode, bgp)) {
"Set the BGP Input Queue limit for all peers when message parsing\n"
"Input-Queue limit\n")
{
- bm->inq_limit = BM_DEFAULT_INQ_LIMIT;
+ bm->inq_limit = BM_DEFAULT_Q_LIMIT;
+
+ return CMD_SUCCESS;
+}
+
+DEFPY (bgp_outq_limit,
+ bgp_outq_limit_cmd,
+ "bgp output-queue-limit (1-4294967295)$limit",
+ BGP_STR
+ "Set the BGP Output Queue limit for all peers when message parsing\n"
+ "Output-Queue limit\n")
+{
+ bm->outq_limit = limit;
return CMD_SUCCESS;
}
+DEFPY (no_bgp_outq_limit,
+ no_bgp_outq_limit_cmd,
+ "no bgp output-queue-limit [(1-4294967295)$limit]",
+ NO_STR
+ BGP_STR
+ "Set the BGP Output Queue limit for all peers when message parsing\n"
+ "Output-Queue limit\n")
+{
+ bm->outq_limit = BM_DEFAULT_Q_LIMIT;
+
+ return CMD_SUCCESS;
+}
+
+
/* Initialization of BGP interface. */
static void bgp_vty_if_init(void)
{
/* "global bgp inq-limit command */
install_element(CONFIG_NODE, &bgp_inq_limit_cmd);
install_element(CONFIG_NODE, &no_bgp_inq_limit_cmd);
+ install_element(CONFIG_NODE, &bgp_outq_limit_cmd);
+ install_element(CONFIG_NODE, &no_bgp_outq_limit_cmd);
/* "bgp local-mac" hidden commands. */
install_element(CONFIG_NODE, &bgp_local_mac_cmd);
Set the BGP Input Queue limit for all peers when messaging parsing. Increase
this only if you have the memory to handle large queues of messages at once.
+.. clicmd:: bgp output-queue-limit (1-4294967295)
+
+ Set the BGP Output Queue limit for all peers when messaging parsing. Increase
+ this only if you have the memory to handle large queues of messages at once.
+
.. _bgp-displaying-bgp-information:
Displaying BGP Information