Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
session: add support for memfd segments
[vpp.git]
/
src
/
vnet
/
udp
/
builtin_server.c
diff --git
a/src/vnet/udp/builtin_server.c
b/src/vnet/udp/builtin_server.c
index
29c33be
..
4c9573e
100644
(file)
--- a/
src/vnet/udp/builtin_server.c
+++ b/
src/vnet/udp/builtin_server.c
@@
-62,7
+62,7
@@
builtin_server_rx_callback (stream_session_t * s)
int actual_transfer;
u8 *my_copy_buffer;
session_fifo_event_t evt;
int actual_transfer;
u8 *my_copy_buffer;
session_fifo_event_t evt;
-
unix_shared_memory
_queue_t *q;
+
svm
_queue_t *q;
my_copy_buffer = copy_buffers[s->thread_index];
rx_fifo = s->server_rx_fifo;
my_copy_buffer = copy_buffers[s->thread_index];
rx_fifo = s->server_rx_fifo;
@@
-90,8
+90,7
@@
builtin_server_rx_callback (stream_session_t * s)
evt.fifo = tx_fifo;
evt.event_type = FIFO_EVENT_APP_TX;
q = session_manager_get_vpp_event_queue (s->thread_index);
evt.fifo = tx_fifo;
evt.event_type = FIFO_EVENT_APP_TX;
q = session_manager_get_vpp_event_queue (s->thread_index);
- unix_shared_memory_queue_add (q, (u8 *) & evt,
- 0 /* do wait for mutex */ );
+ svm_queue_add (q, (u8 *) & evt, 0 /* do wait for mutex */ );
}
return 0;
}
return 0;
@@
-111,22
+110,16
@@
static int
attach_builtin_uri_server ()
{
vnet_app_attach_args_t _a, *a = &_a;
attach_builtin_uri_server ()
{
vnet_app_attach_args_t _a, *a = &_a;
- u8 segment_name[128];
- u32 segment_name_length;
u64 options[16];
u64 options[16];
- segment_name_length = ARRAY_LEN (segment_name);
-
memset (a, 0, sizeof (*a));
memset (options, 0, sizeof (options));
a->api_client_index = ~0;
memset (a, 0, sizeof (*a));
memset (options, 0, sizeof (options));
a->api_client_index = ~0;
- a->segment_name = segment_name;
- a->segment_name_length = segment_name_length;
a->session_cb_vft = &builtin_server;
a->session_cb_vft = &builtin_server;
- options[
SESSION
_OPTIONS_ACCEPT_COOKIE] = 0x12345678;
- options[
SESSION_OPTIONS_SEGMENT_SIZE] = (2 << 30);
/*$$$$ config / arg */
+ options[
APP
_OPTIONS_ACCEPT_COOKIE] = 0x12345678;
+ options[
APP_OPTIONS_SEGMENT_SIZE] = (2 << 30);
/*$$$$ config / arg */
options[APP_OPTIONS_FLAGS] = APP_OPTIONS_FLAGS_IS_BUILTIN;
options[APP_OPTIONS_PREALLOC_FIFO_PAIRS] = 1024;
options[APP_OPTIONS_FLAGS] = APP_OPTIONS_FLAGS_IS_BUILTIN;
options[APP_OPTIONS_PREALLOC_FIFO_PAIRS] = 1024;