summaryrefslogtreecommitdiffstats
path: root/src/vnet/session-apps
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session-apps')
-rw-r--r--src/vnet/session-apps/echo_client.c13
-rw-r--r--src/vnet/session-apps/echo_server.c5
2 files changed, 14 insertions, 4 deletions
diff --git a/src/vnet/session-apps/echo_client.c b/src/vnet/session-apps/echo_client.c
index c38b5339453..27e253a9235 100644
--- a/src/vnet/session-apps/echo_client.c
+++ b/src/vnet/session-apps/echo_client.c
@@ -413,13 +413,21 @@ echo_clients_rx_callback (stream_session_t * s)
return 0;
}
+int
+echo_client_add_segment_callback (u32 client_index, const ssvm_private_t * sp)
+{
+ /* New heaps may be added */
+ return 0;
+}
+
/* *INDENT-OFF* */
static session_cb_vft_t echo_clients = {
.session_reset_callback = echo_clients_session_reset_callback,
.session_connected_callback = echo_clients_session_connected_callback,
.session_accept_callback = echo_clients_session_create_callback,
.session_disconnect_callback = echo_clients_session_disconnect_callback,
- .builtin_server_rx_callback = echo_clients_rx_callback
+ .builtin_server_rx_callback = echo_clients_rx_callback,
+ .add_segment_callback = echo_client_add_segment_callback
};
/* *INDENT-ON* */
@@ -445,6 +453,7 @@ echo_clients_attach (u8 * appns_id, u64 appns_flags, u64 appns_secret)
options[APP_OPTIONS_ACCEPT_COOKIE] = 0x12345678;
options[APP_OPTIONS_SEGMENT_SIZE] = segment_size;
+ options[APP_OPTIONS_ADD_SEGMENT_SIZE] = segment_size;
options[APP_OPTIONS_RX_FIFO_SIZE] = ecm->fifo_size;
options[APP_OPTIONS_TX_FIFO_SIZE] = ecm->fifo_size;
options[APP_OPTIONS_PRIVATE_SEGMENT_COUNT] = ecm->private_segment_count;
@@ -625,7 +634,7 @@ echo_clients_command_fn (vlib_main_t * vm,
else if (unformat (input, "test-bytes"))
ecm->test_bytes = 1;
else
- return clib_error_return (0, "unknown input `%U'",
+ return clib_error_return (0, "failed: unknown input `%U'",
format_unformat_error, input);
}
diff --git a/src/vnet/session-apps/echo_server.c b/src/vnet/session-apps/echo_server.c
index 37a51d507fc..024ffa66f96 100644
--- a/src/vnet/session-apps/echo_server.c
+++ b/src/vnet/session-apps/echo_server.c
@@ -96,8 +96,8 @@ echo_server_session_connected_callback (u32 app_index, u32 api_context,
int
echo_server_add_segment_callback (u32 client_index, const ssvm_private_t * sp)
{
- clib_warning ("called...");
- return -1;
+ /* New heaps may be added */
+ return 0;
}
int
@@ -290,6 +290,7 @@ echo_server_attach (u8 * appns_id, u64 appns_flags, u64 appns_secret)
a->session_cb_vft = &echo_server_session_cb_vft;
a->options = options;
a->options[APP_OPTIONS_SEGMENT_SIZE] = segment_size;
+ a->options[APP_OPTIONS_ADD_SEGMENT_SIZE] = segment_size;
a->options[APP_OPTIONS_RX_FIFO_SIZE] = esm->fifo_size;
a->options[APP_OPTIONS_TX_FIFO_SIZE] = esm->fifo_size;
a->options[APP_OPTIONS_PRIVATE_SEGMENT_COUNT] = esm->private_segment_count;