]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib, doc: increase maximum cli tokens 1171/head
authorQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 13 Sep 2017 14:39:13 +0000 (10:39 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 13 Sep 2017 14:39:22 +0000 (10:39 -0400)
When matching user input against a CLI graph, we keep a stack of tokens
matched. Stack size was limited to 64, making the effective number of
tokens that could be entered on a line 64. This is too limiting in some
circumstances, so bump it to 256 (and document it).

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
doc/cli.md
lib/command_match.c

index ef867362c393226fab97bc61b056ab93ac76ee40..253617e9b5271ebb1dc2652e27553829f15166c6 100644 (file)
@@ -75,6 +75,9 @@ Some general notes:
   configuration items should be defined in separate commands. Clarity is
   preferred over LOC (within reason).
 
+* The maximum number of space-separated tokens that can be entered is presently
+  limited to 256. Please keep this limit in mind when implementing new CLI.
+
 Variable Names
 --------------
 The parser tries to fill the "varname" field on each token.  This can happen
index ad3ec2492e6e96b574da01244478d4b25018f330..62e7c63068ddb33e26581affa016f553566e1a41 100644 (file)
@@ -28,7 +28,7 @@
 
 DEFINE_MTYPE_STATIC(LIB, CMD_MATCHSTACK, "Command Match Stack")
 
-#define MAXDEPTH 64
+#define MAXDEPTH 256
 
 #ifdef TRACE_MATCHER
 #define TM 1