bmp->options[APP_OPTIONS_FLAGS] =
APP_OPTIONS_FLAGS_ACCEPT_REDIRECT | APP_OPTIONS_FLAGS_ADD_SEGMENT;
bmp->options[APP_OPTIONS_PREALLOC_FIFO_PAIRS] = 16;
- bmp->options[SESSION_OPTIONS_RX_FIFO_SIZE] = fifo_size;
- bmp->options[SESSION_OPTIONS_TX_FIFO_SIZE] = fifo_size;
- bmp->options[SESSION_OPTIONS_ADD_SEGMENT_SIZE] = 128 << 20;
- bmp->options[SESSION_OPTIONS_SEGMENT_SIZE] = 256 << 20;
+ bmp->options[APP_OPTIONS_RX_FIFO_SIZE] = fifo_size;
+ bmp->options[APP_OPTIONS_TX_FIFO_SIZE] = fifo_size;
+ bmp->options[APP_OPTIONS_ADD_SEGMENT_SIZE] = 128 << 20;
+ bmp->options[APP_OPTIONS_SEGMENT_SIZE] = 256 << 20;
vl_msg_api_send_shmem (utm->vl_input_queue, (u8 *) & bmp);
}
return;
}
+ memset (a, 0, sizeof (*a));
a->segment_name = (char *) mp->segment_name;
a->segment_size = mp->segment_size;
svm_fifo_segment_create_args_t _a, *a = &_a;
int rv;
+ memset (a, 0, sizeof (*a));
a->segment_name = (char *) mp->segment_name;
a->segment_size = mp->segment_size;
/* Attach to the segment vpp created */
utm->state = STATE_FAILED;
return;
}
+ else
+ {
+ clib_warning ("connected with local ip %U port %d", format_ip46_address,
+ mp->lcl_ip, mp->is_ip4,
+ clib_net_to_host_u16 (mp->lcl_port));
+ }
utm->vpp_event_queue =
uword_to_pointer (mp->vpp_event_queue_address,
u32 bytes_to_snd;
u32 queue_max_chunk = 128 << 10, actual_write;
session_fifo_event_t evt;
- static int serial_number = 0;
int rv;
bytes_to_snd = (bytes == 0) ? vec_len (test_data) : bytes;
/* Fabricate TX event, send to vpp */
evt.fifo = tx_fifo;
evt.event_type = FIFO_EVENT_APP_TX;
- evt.event_id = serial_number++;
unix_shared_memory_queue_add (utm->vpp_event_queue,
(u8 *) & evt,
memset (rmp, 0, sizeof (*rmp));
rmp->_vl_msg_id = ntohs (VL_API_ACCEPT_SESSION_REPLY);
rmp->handle = mp->handle;
+ rmp->context = mp->context;
vl_msg_api_send_shmem (utm->vl_input_queue, (u8 *) & rmp);
session->bytes_received = 0;
/* Fabricate TX event, send to vpp */
evt.fifo = tx_fifo;
evt.event_type = FIFO_EVENT_APP_TX;
- evt.event_id = e->event_id;
q = utm->vpp_event_queue;
unix_shared_memory_queue_add (q, (u8 *) & evt,
void
server_handle_event_queue (uri_tcp_test_main_t * utm)
{
- session_fifo_event_t _e, *e = &_e;;
+ session_fifo_event_t _e, *e = &_e;
while (1)
{