]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Fix work-quanta to be a reasonable value
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 18 Jan 2016 17:44:52 +0000 (09:44 -0800)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 18 Jan 2016 17:44:52 +0000 (09:44 -0800)
The work-quanta that a user can specify is ~4billion.  If a user
specifies such a large value this translates into processing 4billion
outgoing packets before moving onto the next interface.  This makes
no sense.  Reduce the value of allowed work quanta's to be between
1 and 10000.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
bgpd/bgp_vty.c

index 62827dad289cdd506cf2371fb546089a3f51f3c0..db4d21533154830b97beb394684480f300d2fbee 100644 (file)
@@ -1294,7 +1294,7 @@ bgp_wpkt_quanta_config_vty (struct vty *vty, const char *num, char set)
 
   if (set)
     VTY_GET_INTEGER_RANGE ("write-quanta", bgp->wpkt_quanta, num,
-                          1, 4294967295);
+                          1, 10000);
   else
     bgp->wpkt_quanta = BGP_WRITE_PACKET_MAX;
 
@@ -1315,7 +1315,7 @@ bgp_config_write_wpkt_quanta (struct vty *vty, struct bgp *bgp)
 /* Update-delay configuration */
 DEFUN (bgp_wpkt_quanta,
        bgp_wpkt_quanta_cmd,
-       "write-quanta <1-4294967295>",
+       "write-quanta <1-10000>",
        "How many packets to write to peer socket per run\n"
        "Number of packets\n")
 {
@@ -1325,7 +1325,7 @@ DEFUN (bgp_wpkt_quanta,
 /* Update-delay deconfiguration */
 DEFUN (no_bgp_wpkt_quanta,
        no_bgp_wpkt_quanta_cmd,
-       "no write-quanta <1-4294967295>",
+       "no write-quanta <1-10000>",
        "How many packets to write to peer socket per run\n"
        "Number of packets\n")
 {