aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-07-11 12:24:19 +0200
committerDamjan Marion <dmarion@me.com>2018-07-11 13:23:03 +0000
commit20728d40d91b89fe9f9d8d8c3f4ec16d51412c8b (patch)
tree10ef911c370376d627dc43775de47b4dee48f056
parent9a02c54e4f3c53cbaceee4cbb30835113f0641ce (diff)
memif: fix max number of rings
Change-Id: Ie7621a38a44e7c692e23e58c43d27d8d2aab43e6 Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--extras/libmemif/src/socket.c2
-rw-r--r--src/plugins/memif/private.h6
-rw-r--r--src/plugins/memif/socket.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/extras/libmemif/src/socket.c b/extras/libmemif/src/socket.c
index fd4005645e1..3982c96ba90 100644
--- a/extras/libmemif/src/socket.c
+++ b/extras/libmemif/src/socket.c
@@ -107,7 +107,7 @@ memif_msg_send_hello (int fd)
msg.type = MEMIF_MSG_TYPE_HELLO;
h->min_version = MEMIF_VERSION;
h->max_version = MEMIF_VERSION;
- h->max_s2m_ring = MEMIF_MAX_M2S_RING;
+ h->max_s2m_ring = MEMIF_MAX_S2M_RING;
h->max_m2s_ring = MEMIF_MAX_M2S_RING;
h->max_region = MEMIF_MAX_REGION;
h->max_log2_ring_size = MEMIF_MAX_LOG2_RING_SIZE;
diff --git a/src/plugins/memif/private.h b/src/plugins/memif/private.h
index c7fec67f9e4..82056a1ecfb 100644
--- a/src/plugins/memif/private.h
+++ b/src/plugins/memif/private.h
@@ -24,9 +24,9 @@
#define MEMIF_DEFAULT_TX_QUEUES 1
#define MEMIF_DEFAULT_BUFFER_SIZE 2048
-#define MEMIF_MAX_M2S_RING (vec_len (vlib_mains) - 1)
-#define MEMIF_MAX_S2M_RING (vec_len (vlib_mains) - 1)
-#define MEMIF_MAX_REGION 255
+#define MEMIF_MAX_M2S_RING (vec_len (vlib_mains))
+#define MEMIF_MAX_S2M_RING 256
+#define MEMIF_MAX_REGION 256
#define MEMIF_MAX_LOG2_RING_SIZE 14
diff --git a/src/plugins/memif/socket.c b/src/plugins/memif/socket.c
index cefbb863c7a..82e865d2a0b 100644
--- a/src/plugins/memif/socket.c
+++ b/src/plugins/memif/socket.c
@@ -87,7 +87,7 @@ memif_msg_enq_hello (clib_socket_t * sock)
h->min_version = MEMIF_VERSION;
h->max_version = MEMIF_VERSION;
h->max_m2s_ring = MEMIF_MAX_M2S_RING;
- h->max_s2m_ring = MEMIF_MAX_M2S_RING;
+ h->max_s2m_ring = MEMIF_MAX_S2M_RING;
h->max_region = MEMIF_MAX_REGION;
h->max_log2_ring_size = MEMIF_MAX_LOG2_RING_SIZE;
s = format (0, "VPP %s%c", VPP_BUILD_VER, 0);