summaryrefslogtreecommitdiffstats
path: root/src/plugins/memif/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/memif/cli.c')
-rw-r--r--src/plugins/memif/cli.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/memif/cli.c b/src/plugins/memif/cli.c
index deca27af2ef..3d38550c1ba 100644
--- a/src/plugins/memif/cli.c
+++ b/src/plugins/memif/cli.c
@@ -76,6 +76,9 @@ memif_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
if (!is_pow2 (ring_size))
return clib_error_return (0, "ring size must be power of 2");
+ if (ring_size > 32768)
+ return clib_error_return (0, "maximum ring size is 32768");
+
args.log2_ring_size = min_log2 (ring_size);
if (rx_queues > 255 || rx_queues < 1)