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
/
tcp
/
builtin_http_server.c
diff --git
a/src/vnet/tcp/builtin_http_server.c
b/src/vnet/tcp/builtin_http_server.c
index
6e1cd8e
..
5510f8a
100644
(file)
--- a/
src/vnet/tcp/builtin_http_server.c
+++ b/
src/vnet/tcp/builtin_http_server.c
@@
-32,7
+32,7
@@
typedef struct
typedef struct
{
u8 **rx_buf;
typedef struct
{
u8 **rx_buf;
-
unix_shared_memory
_queue_t **vpp_queue;
+
svm
_queue_t **vpp_queue;
u64 byte_index;
uword *handler_by_get_request;
u64 byte_index;
uword *handler_by_get_request;
@@
-40,7
+40,7
@@
typedef struct
u32 *free_http_cli_process_node_indices;
/* Sever's event queue */
u32 *free_http_cli_process_node_indices;
/* Sever's event queue */
-
unix_shared_memory
_queue_t *vl_input_queue;
+
svm
_queue_t *vl_input_queue;
/* API client handle */
u32 my_client_index;
/* API client handle */
u32 my_client_index;
@@
-175,9
+175,8
@@
send_data (stream_session_t * s, u8 * data)
evt.fifo = s->server_tx_fifo;
evt.event_type = FIFO_EVENT_APP_TX;
evt.fifo = s->server_tx_fifo;
evt.event_type = FIFO_EVENT_APP_TX;
- unix_shared_memory_queue_add (hsm->vpp_queue[s->thread_index],
- (u8 *) & evt,
- 0 /* do wait for mutex */ );
+ svm_queue_add (hsm->vpp_queue[s->thread_index],
+ (u8 *) & evt, 0 /* do wait for mutex */ );
}
delay = 10e-3;
}
}
delay = 10e-3;
}
@@
-377,7
+376,7
@@
http_server_rx_callback (stream_session_t * s)
evt.rpc_args.fp = alloc_http_process_callback;
evt.rpc_args.arg = args;
evt.event_type = FIFO_EVENT_RPC;
evt.rpc_args.fp = alloc_http_process_callback;
evt.rpc_args.arg = args;
evt.event_type = FIFO_EVENT_RPC;
-
unix_shared_memory
_queue_add
+
svm
_queue_add
(session_manager_get_vpp_event_queue (0 /* main thread */ ),
(u8 *) & evt, 0 /* do wait for mutex */ );
}
(session_manager_get_vpp_event_queue (0 /* main thread */ ),
(u8 *) & evt, 0 /* do wait for mutex */ );
}
@@
-467,8
+466,7
@@
builtin_session_connected_callback (u32 app_index, u32 api_context,
}
static int
}
static int
-builtin_add_segment_callback (u32 client_index,
- const u8 * seg_name, u32 seg_size)
+builtin_add_segment_callback (u32 client_index, const ssvm_private_t * sp)
{
clib_warning ("called...");
return -1;
{
clib_warning ("called...");
return -1;
@@
-510,7
+508,6
@@
static int
server_attach ()
{
http_server_main_t *hsm = &http_server_main;
server_attach ()
{
http_server_main_t *hsm = &http_server_main;
- u8 segment_name[128];
u64 options[APP_OPTIONS_N_OPTIONS];
vnet_app_attach_args_t _a, *a = &_a;
u32 segment_size = 128 << 20;
u64 options[APP_OPTIONS_N_OPTIONS];
vnet_app_attach_args_t _a, *a = &_a;
u32 segment_size = 128 << 20;
@@
-531,8
+528,6
@@
server_attach ()
hsm->fifo_size ? hsm->fifo_size : 32 << 10;
a->options[APP_OPTIONS_FLAGS] = APP_OPTIONS_FLAGS_IS_BUILTIN;
a->options[APP_OPTIONS_PREALLOC_FIFO_PAIRS] = hsm->prealloc_fifos;
hsm->fifo_size ? hsm->fifo_size : 32 << 10;
a->options[APP_OPTIONS_FLAGS] = APP_OPTIONS_FLAGS_IS_BUILTIN;
a->options[APP_OPTIONS_PREALLOC_FIFO_PAIRS] = hsm->prealloc_fifos;
- a->segment_name = segment_name;
- a->segment_name_length = ARRAY_LEN (segment_name);
if (vnet_application_attach (a))
{
if (vnet_application_attach (a))
{