aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-01-05 03:20:25 -0800
committerDave Barach <openvpp@barachs.net>2018-01-09 18:33:08 +0000
commite86a8edd3c14fb41ace2a12efd17bc7772bf623f (patch)
tree480219864cadd743fdb95c21379aeaf88a985e23 /src/vnet
parent4363ad6c96b5641fca1b16c5a6ec22e2364adcfd (diff)
api: refactor vlibmemory
- separate client/server code for both memory and socket apis - separate memory api code from generic vlib api code - move unix_shared_memory_fifo to svm and rename to svm_fifo_t - overall declutter Change-Id: I90cdd98ff74d0787d58825b914b0f1eafcfa4dc2 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/bfd/bfd_api.c8
-rw-r--r--src/vnet/bier/bier_api.c20
-rw-r--r--src/vnet/classify/classify_api.c18
-rw-r--r--src/vnet/devices/ssvm/node.c8
-rw-r--r--src/vnet/devices/ssvm/ssvm_eth.c22
-rw-r--r--src/vnet/devices/ssvm/ssvm_eth.h3
-rw-r--r--src/vnet/devices/tap/tapv2_api.c11
-rw-r--r--src/vnet/devices/virtio/vhost_user_api.c10
-rw-r--r--src/vnet/dhcp/dhcp_api.c6
-rw-r--r--src/vnet/dns/resolver_process.c4
-rw-r--r--src/vnet/flow/flow_api.c9
-rw-r--r--src/vnet/geneve/geneve_api.c4
-rw-r--r--src/vnet/gre/gre_api.c4
-rw-r--r--src/vnet/interface_api.c13
-rw-r--r--src/vnet/ip/ip_api.c48
-rw-r--r--src/vnet/ip/punt_api.c4
-rw-r--r--src/vnet/ipsec-gre/ipsec_gre_api.c4
-rw-r--r--src/vnet/ipsec/ipsec_api.c9
-rw-r--r--src/vnet/l2/l2_api.c13
-rw-r--r--src/vnet/l2/l2_fib.c2
-rw-r--r--src/vnet/l2tp/l2tp_api.c4
-rw-r--r--src/vnet/lisp-cp/lisp_api.c41
-rw-r--r--src/vnet/lisp-cp/one_api.c41
-rw-r--r--src/vnet/lisp-gpe/lisp_gpe_api.c2
-rw-r--r--src/vnet/map/map_api.c7
-rw-r--r--src/vnet/mfib/mfib_signal.c2
-rw-r--r--src/vnet/mfib/mfib_signal.h6
-rw-r--r--src/vnet/mpls/mpls_api.c8
-rw-r--r--src/vnet/policer/policer_api.c4
-rw-r--r--src/vnet/session/application.c2
-rw-r--r--src/vnet/session/application.h2
-rw-r--r--src/vnet/session/segment_manager.c16
-rw-r--r--src/vnet/session/segment_manager.h10
-rw-r--r--src/vnet/session/session.c12
-rw-r--r--src/vnet/session/session.h6
-rwxr-xr-xsrc/vnet/session/session_api.c27
-rw-r--r--src/vnet/session/session_node.c10
-rw-r--r--src/vnet/span/span_api.c2
-rw-r--r--src/vnet/srv6/sr_api.c4
-rw-r--r--src/vnet/tcp/builtin_client.c2
-rw-r--r--src/vnet/tcp/builtin_client.h5
-rw-r--r--src/vnet/tcp/builtin_http_server.c11
-rw-r--r--src/vnet/tcp/builtin_proxy.c6
-rw-r--r--src/vnet/tcp/builtin_proxy.h7
-rw-r--r--src/vnet/tcp/builtin_server.c13
-rw-r--r--src/vnet/udp/builtin_server.c5
-rw-r--r--src/vnet/udp/udp_api.c36
-rw-r--r--src/vnet/unix/tap_api.c13
-rw-r--r--src/vnet/vxlan-gpe/vxlan_gpe_api.c4
-rw-r--r--src/vnet/vxlan/vxlan_api.c4
50 files changed, 248 insertions, 284 deletions
diff --git a/src/vnet/bfd/bfd_api.c b/src/vnet/bfd/bfd_api.c
index 185c03cf86f..0d5d1239626 100644
--- a/src/vnet/bfd/bfd_api.c
+++ b/src/vnet/bfd/bfd_api.c
@@ -140,7 +140,7 @@ vl_api_bfd_udp_del_t_handler (vl_api_bfd_udp_del_t * mp)
}
void
-send_bfd_udp_session_details (unix_shared_memory_queue_t * q, u32 context,
+send_bfd_udp_session_details (svm_queue_t * q, u32 context,
bfd_session_t * bs)
{
if (bs->transport != BFD_TRANSPORT_UDP4 &&
@@ -199,7 +199,7 @@ bfd_event (bfd_main_t * bm, bfd_session_t * bs)
{
vpe_api_main_t *vam = &vpe_api_main;
vpe_client_registration_t *reg;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
/* *INDENT-OFF* */
pool_foreach (reg, vam->bfd_events_registrations, ({
q = vl_api_client_index_to_input_queue (reg->client_index);
@@ -220,7 +220,7 @@ bfd_event (bfd_main_t * bm, bfd_session_t * bs)
static void
vl_api_bfd_udp_session_dump_t_handler (vl_api_bfd_udp_session_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
q = vl_api_client_index_to_input_queue (mp->client_index);
@@ -274,7 +274,7 @@ vl_api_bfd_auth_del_key_t_handler (vl_api_bfd_auth_del_key_t * mp)
static void
vl_api_bfd_auth_keys_dump_t_handler (vl_api_bfd_auth_keys_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
q = vl_api_client_index_to_input_queue (mp->client_index);
diff --git a/src/vnet/bier/bier_api.c b/src/vnet/bier/bier_api.c
index 3da6c192f1f..f4d37321c53 100644
--- a/src/vnet/bier/bier_api.c
+++ b/src/vnet/bier/bier_api.c
@@ -106,7 +106,7 @@ vl_api_bier_table_add_del_t_handler (vl_api_bier_table_add_del_t * mp)
}
static void
-send_bier_table_details (unix_shared_memory_queue_t * q,
+send_bier_table_details (svm_queue_t * q,
u32 context,
const bier_table_t *bt)
{
@@ -130,7 +130,7 @@ send_bier_table_details (unix_shared_memory_queue_t * q,
static void
vl_api_bier_table_dump_t_handler (vl_api_bier_table_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
bier_table_t *bt;
q = vl_api_client_index_to_input_queue (mp->client_index);
@@ -252,7 +252,7 @@ done:
typedef struct bier_route_details_walk_t_
{
- unix_shared_memory_queue_t * q;
+ svm_queue_t * q;
u32 context;
} bier_route_details_walk_t;
@@ -302,7 +302,7 @@ send_bier_route_details (const bier_table_t *bt,
static void
vl_api_bier_route_dump_t_handler (vl_api_bier_route_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
q = vl_api_client_index_to_input_queue (mp->client_index);
if (q == 0)
@@ -371,7 +371,7 @@ vl_api_bier_imp_del_t_handler (vl_api_bier_imp_del_t * mp)
}
static void
-send_bier_imp_details (unix_shared_memory_queue_t * q,
+send_bier_imp_details (svm_queue_t * q,
u32 context,
const bier_imp_t *bi)
{
@@ -406,7 +406,7 @@ send_bier_imp_details (unix_shared_memory_queue_t * q,
static void
vl_api_bier_imp_dump_t_handler (vl_api_bier_imp_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
bier_imp_t *bi;
q = vl_api_client_index_to_input_queue (mp->client_index);
@@ -446,7 +446,7 @@ vl_api_bier_disp_table_add_del_t_handler (vl_api_bier_disp_table_add_del_t * mp)
}
static void
-send_bier_disp_table_details (unix_shared_memory_queue_t * q,
+send_bier_disp_table_details (svm_queue_t * q,
u32 context,
const bier_disp_table_t *bdt)
{
@@ -467,7 +467,7 @@ send_bier_disp_table_details (unix_shared_memory_queue_t * q,
static void
vl_api_bier_disp_table_dump_t_handler (vl_api_bier_disp_table_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
bier_disp_table_t *bdt;
q = vl_api_client_index_to_input_queue (mp->client_index);
@@ -603,7 +603,7 @@ done:
typedef struct bier_disp_entry_details_walk_t_
{
- unix_shared_memory_queue_t * q;
+ svm_queue_t * q;
u32 context;
} bier_disp_entry_details_walk_t;
@@ -661,7 +661,7 @@ send_bier_disp_entry_details (const bier_disp_table_t *bdt,
static void
vl_api_bier_disp_entry_dump_t_handler (vl_api_bier_disp_entry_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
q = vl_api_client_index_to_input_queue (mp->client_index);
if (q == 0)
diff --git a/src/vnet/classify/classify_api.c b/src/vnet/classify/classify_api.c
index d314ddeaafd..94340f8729a 100644
--- a/src/vnet/classify/classify_api.c
+++ b/src/vnet/classify/classify_api.c
@@ -182,8 +182,7 @@ static void
static void
send_policer_classify_details (u32 sw_if_index,
- u32 table_index,
- unix_shared_memory_queue_t * q, u32 context)
+ u32 table_index, svm_queue_t * q, u32 context)
{
vl_api_policer_classify_details_t *mp;
@@ -200,7 +199,7 @@ send_policer_classify_details (u32 sw_if_index,
static void
vl_api_policer_classify_dump_t_handler (vl_api_policer_classify_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
policer_classify_main_t *pcm = &policer_classify_main;
u32 *vec_tbl;
int i;
@@ -227,7 +226,7 @@ vl_api_policer_classify_dump_t_handler (vl_api_policer_classify_dump_t * mp)
static void
vl_api_classify_table_ids_t_handler (vl_api_classify_table_ids_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
q = vl_api_client_index_to_input_queue (mp->client_index);
if (q == 0)
@@ -312,7 +311,7 @@ static void
static void
vl_api_classify_table_info_t_handler (vl_api_classify_table_info_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
q = vl_api_client_index_to_input_queue (mp->client_index);
if (q == 0)
@@ -360,7 +359,7 @@ vl_api_classify_table_info_t_handler (vl_api_classify_table_info_t * mp)
}
static void
-send_classify_session_details (unix_shared_memory_queue_t * q,
+send_classify_session_details (svm_queue_t * q,
u32 table_id,
u32 match_length,
vnet_classify_entry_t * e, u32 context)
@@ -385,7 +384,7 @@ static void
vl_api_classify_session_dump_t_handler (vl_api_classify_session_dump_t * mp)
{
vnet_classify_main_t *cm = &vnet_classify_main;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
u32 table_id = ntohl (mp->table_id);
vnet_classify_table_t *t;
@@ -456,8 +455,7 @@ static void
static void
send_flow_classify_details (u32 sw_if_index,
- u32 table_index,
- unix_shared_memory_queue_t * q, u32 context)
+ u32 table_index, svm_queue_t * q, u32 context)
{
vl_api_flow_classify_details_t *mp;
@@ -474,7 +472,7 @@ send_flow_classify_details (u32 sw_if_index,
static void
vl_api_flow_classify_dump_t_handler (vl_api_flow_classify_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
flow_classify_main_t *pcm = &flow_classify_main;
u32 *vec_tbl;
int i;
diff --git a/src/vnet/devices/ssvm/node.c b/src/vnet/devices/ssvm/node.c
index b7a8db0528c..344b357662c 100644
--- a/src/vnet/devices/ssvm/node.c
+++ b/src/vnet/devices/ssvm/node.c
@@ -70,7 +70,7 @@ ssvm_eth_device_input (ssvm_eth_main_t * em,
{
ssvm_shared_header_t *sh = intfc->sh;
vlib_main_t *vm = em->vlib_main;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
ssvm_eth_queue_elt_t *elt, *elts;
u32 elt_index;
u32 my_pid = intfc->my_pid;
@@ -101,9 +101,9 @@ ssvm_eth_device_input (ssvm_eth_main_t * em,
return 0;
if (intfc->i_am_master)
- q = (unix_shared_memory_queue_t *) (sh->opaque[TO_MASTER_Q_INDEX]);
+ q = (svm_queue_t *) (sh->opaque[TO_MASTER_Q_INDEX]);
else
- q = (unix_shared_memory_queue_t *) (sh->opaque[TO_SLAVE_Q_INDEX]);
+ q = (svm_queue_t *) (sh->opaque[TO_SLAVE_Q_INDEX]);
/* Nothing to do? */
if (q->cursize == 0)
@@ -118,7 +118,7 @@ ssvm_eth_device_input (ssvm_eth_main_t * em,
;
while (q->cursize > 0)
{
- unix_shared_memory_queue_sub_raw (q, (u8 *) & elt_index);
+ svm_queue_sub_raw (q, (u8 *) & elt_index);
ASSERT (elt_index < 2048);
vec_add1 (intfc->rx_queue, elt_index);
}
diff --git a/src/vnet/devices/ssvm/ssvm_eth.c b/src/vnet/devices/ssvm/ssvm_eth.c
index db4fafa9a14..8a0cebe29d4 100644
--- a/src/vnet/devices/ssvm/ssvm_eth.c
+++ b/src/vnet/devices/ssvm/ssvm_eth.c
@@ -38,7 +38,7 @@ ssvm_eth_create (ssvm_eth_main_t * em, u8 * name, int is_master)
ssvm_private_t *intfc;
void *oldheap;
clib_error_t *e;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
ssvm_shared_header_t *sh;
ssvm_eth_queue_elt_t *elts;
u32 *elt_indices;
@@ -71,13 +71,13 @@ ssvm_eth_create (ssvm_eth_main_t * em, u8 * name, int is_master)
sh = intfc->sh;
oldheap = ssvm_push_heap (sh);
- q = unix_shared_memory_queue_init (em->queue_elts, sizeof (u32),
- 0 /* consumer pid not interesting */ ,
- 0 /* signal not sent */ );
+ q = svm_queue_init (em->queue_elts, sizeof (u32),
+ 0 /* consumer pid not interesting */ ,
+ 0 /* signal not sent */ );
sh->opaque[TO_MASTER_Q_INDEX] = (void *) q;
- q = unix_shared_memory_queue_init (em->queue_elts, sizeof (u32),
- 0 /* consumer pid not interesting */ ,
- 0 /* signal not sent */ );
+ q = svm_queue_init (em->queue_elts, sizeof (u32),
+ 0 /* consumer pid not interesting */ ,
+ 0 /* signal not sent */ );
sh->opaque[TO_SLAVE_Q_INDEX] = (void *) q;
/*
@@ -246,7 +246,7 @@ ssvm_eth_interface_tx (vlib_main_t * vm,
vnet_interface_output_runtime_t *rd = (void *) node->runtime_data;
ssvm_private_t *intfc = vec_elt_at_index (em->intfcs, rd->dev_instance);
ssvm_shared_header_t *sh = intfc->sh;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
u32 *from;
u32 n_left;
ssvm_eth_queue_elt_t *elts, *elt, *prev_elt;
@@ -265,9 +265,9 @@ ssvm_eth_interface_tx (vlib_main_t * vm,
u32 *elt_indices;
if (i_am_master)
- q = (unix_shared_memory_queue_t *) sh->opaque[TO_SLAVE_Q_INDEX];
+ q = (svm_queue_t *) sh->opaque[TO_SLAVE_Q_INDEX];
else
- q = (unix_shared_memory_queue_t *) sh->opaque[TO_MASTER_Q_INDEX];
+ q = (svm_queue_t *) sh->opaque[TO_MASTER_Q_INDEX];
queue_lock = (u32 *) q;
@@ -366,7 +366,7 @@ ssvm_eth_interface_tx (vlib_main_t * vm,
while (__sync_lock_test_and_set (queue_lock, 1))
;
- unix_shared_memory_queue_add_raw (q, (u8 *) & elt_index);
+ svm_queue_add_raw (q, (u8 *) & elt_index);
CLIB_MEMORY_BARRIER ();
*queue_lock = 0;
diff --git a/src/vnet/devices/ssvm/ssvm_eth.h b/src/vnet/devices/ssvm/ssvm_eth.h
index 7f9aaad3e82..a506b4b7312 100644
--- a/src/vnet/devices/ssvm/ssvm_eth.h
+++ b/src/vnet/devices/ssvm/ssvm_eth.h
@@ -28,9 +28,8 @@
#include <vnet/devices/devices.h>
#include <vnet/ip/ip.h>
#include <vnet/pg/pg.h>
-#include <vlibmemory/unix_shared_memory_queue.h>
-
#include <svm/ssvm.h>
+#include <svm/queue.h>
extern vnet_device_class_t ssvm_eth_device_class;
extern vlib_node_registration_t ssvm_eth_input_node;
diff --git a/src/vnet/devices/tap/tapv2_api.c b/src/vnet/devices/tap/tapv2_api.c
index 841d21e2d25..e161ed6c397 100644
--- a/src/vnet/devices/tap/tapv2_api.c
+++ b/src/vnet/devices/tap/tapv2_api.c
@@ -54,7 +54,7 @@ vl_api_tap_create_v2_t_handler (vl_api_tap_create_v2_t * mp)
{
vlib_main_t *vm = vlib_get_main ();
vl_api_tap_create_v2_reply_t *rmp;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
tap_create_if_args_t _a, *ap = &_a;
memset (ap, 0, sizeof (*ap));
@@ -113,8 +113,7 @@ vl_api_tap_create_v2_t_handler (vl_api_tap_create_v2_t * mp)
static void
tap_send_sw_interface_event_deleted (vpe_api_main_t * am,
- unix_shared_memory_queue_t * q,
- u32 sw_if_index)
+ svm_queue_t * q, u32 sw_if_index)
{
vl_api_sw_interface_event_t *mp;
@@ -136,7 +135,7 @@ vl_api_tap_delete_v2_t_handler (vl_api_tap_delete_v2_t * mp)
int rv;
vpe_api_main_t *vam = &vpe_api_main;
vl_api_tap_delete_v2_reply_t *rmp;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
u32 sw_if_index = ntohl (mp->sw_if_index);
rv = tap_delete_if (vm, sw_if_index);
@@ -158,7 +157,7 @@ vl_api_tap_delete_v2_t_handler (vl_api_tap_delete_v2_t * mp)
static void
tap_send_sw_interface_details (vpe_api_main_t * am,
- unix_shared_memory_queue_t * q,
+ svm_queue_t * q,
tap_interface_details_t * tap_if, u32 context)
{
vl_api_sw_interface_tap_v2_details_t *mp;
@@ -199,7 +198,7 @@ vl_api_sw_interface_tap_v2_dump_t_handler (vl_api_sw_interface_tap_v2_dump_t *
{
int rv;
vpe_api_main_t *am = &vpe_api_main;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
tap_interface_details_t *tapifs = NULL;
tap_interface_details_t *tap_if = NULL;
diff --git a/src/vnet/devices/virtio/vhost_user_api.c b/src/vnet/devices/virtio/vhost_user_api.c
index 78599241d3e..9ddd3387a72 100644
--- a/src/vnet/devices/virtio/vhost_user_api.c
+++ b/src/vnet/devices/virtio/vhost_user_api.c
@@ -53,8 +53,7 @@ _(SW_INTERFACE_VHOST_USER_DUMP, sw_interface_vhost_user_dump)
*/
static void
send_sw_interface_event_deleted (vpe_api_main_t * am,
- unix_shared_memory_queue_t * q,
- u32 sw_if_index)
+ svm_queue_t * q, u32 sw_if_index)
{
vl_api_sw_interface_event_t *mp;
@@ -137,8 +136,7 @@ vl_api_delete_vhost_user_if_t_handler (vl_api_delete_vhost_user_if_t * mp)
REPLY_MACRO (VL_API_DELETE_VHOST_USER_IF_REPLY);
if (!rv)
{
- unix_shared_memory_queue_t *q =
- vl_api_client_index_to_input_queue (mp->client_index);
+ svm_queue_t *q = vl_api_client_index_to_input_queue (mp->client_index);
if (!q)
return;
@@ -149,7 +147,7 @@ vl_api_delete_vhost_user_if_t_handler (vl_api_delete_vhost_user_if_t * mp)
static void
send_sw_interface_vhost_user_details (vpe_api_main_t * am,
- unix_shared_memory_queue_t * q,
+ svm_queue_t * q,
vhost_user_intf_details_t * vui,
u32 context)
{
@@ -184,7 +182,7 @@ static void
vlib_main_t *vm = vlib_get_main ();
vhost_user_intf_details_t *ifaces = NULL;
vhost_user_intf_details_t *vuid = NULL;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
q = vl_api_client_index_to_input_queue (mp->client_index);
if (q == 0)
diff --git a/src/vnet/dhcp/dhcp_api.c b/src/vnet/dhcp/dhcp_api.c
index ad96e027f57..24411af9b5c 100644
--- a/src/vnet/dhcp/dhcp_api.c
+++ b/src/vnet/dhcp/dhcp_api.c
@@ -110,7 +110,7 @@ static void vl_api_dhcp_proxy_config_t_handler
static void
vl_api_dhcp_proxy_dump_t_handler (vl_api_dhcp_proxy_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
q = vl_api_client_index_to_input_queue (mp->client_index);
if (q == 0)
@@ -125,7 +125,7 @@ dhcp_send_details (fib_protocol_t proto,
void *opaque, u32 context, dhcp_proxy_t * proxy)
{
vl_api_dhcp_proxy_details_t *mp;
- unix_shared_memory_queue_t *q = opaque;
+ svm_queue_t *q = opaque;
vl_api_dhcp_server_t *v_server;
dhcp_server_t *server;
fib_table_t *s_fib;
@@ -208,7 +208,7 @@ dhcp_compl_event_callback (u32 client_index, u32 pid, u8 * hostname,
u8 mask_width, u8 is_ipv6, u8 * host_address,
u8 * router_address, u8 * host_mac)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
vl_api_dhcp_compl_event_t *mp;
u32 len;
diff --git a/src/vnet/dns/resolver_process.c b/src/vnet/dns/resolver_process.c
index 23bbd3bd7bb..47d8a95ea16 100644
--- a/src/vnet/dns/resolver_process.c
+++ b/src/vnet/dns/resolver_process.c
@@ -124,7 +124,7 @@ resolve_event (dns_main_t * dm, f64 now, u8 * reply)
if (min_ttl != ~0)
ep->expiration_time = now + min_ttl;
rmp->retval = clib_host_to_net_u32 (rv);
- vl_msg_api_send (regp, (u8 *) rmp);
+ vl_api_send_msg (regp, (u8 *) rmp);
}
break;
@@ -145,7 +145,7 @@ resolve_event (dns_main_t * dm, f64 now, u8 * reply)
if (min_ttl != ~0)
ep->expiration_time = now + min_ttl;
rmp->retval = clib_host_to_net_u32 (rv);
- vl_msg_api_send (regp, (u8 *) rmp);
+ vl_api_send_msg (regp, (u8 *) rmp);
}
break;
diff --git a/src/vnet/flow/flow_api.c b/src/vnet/flow/flow_api.c
index 52a608ca6e7..4aa025314f7 100644
--- a/src/vnet/flow/flow_api.c
+++ b/src/vnet/flow/flow_api.c
@@ -148,7 +148,7 @@ static void
vl_api_ipfix_exporter_dump_t_handler (vl_api_ipfix_exporter_dump_t * mp)
{
flow_report_main_t *frm = &flow_report_main;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
vl_api_ipfix_exporter_details_t *rmp;
ip4_main_t *im = &ip4_main;
u32 vrf_id;
@@ -211,7 +211,7 @@ static void
(vl_api_ipfix_classify_stream_dump_t * mp)
{
flow_report_classify_main_t *fcm = &flow_report_classify_main;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
vl_api_ipfix_classify_stream_details_t *rmp;
q = vl_api_client_index_to_input_queue (mp->client_index);
@@ -308,8 +308,7 @@ out:
static void
send_ipfix_classify_table_details (u32 table_index,
- unix_shared_memory_queue_t * q,
- u32 context)
+ svm_queue_t * q, u32 context)
{
flow_report_classify_main_t *fcm = &flow_report_classify_main;
vl_api_ipfix_classify_table_details_t *mp;
@@ -332,7 +331,7 @@ static void
(vl_api_ipfix_classify_table_dump_t * mp)
{
flow_report_classify_main_t *fcm = &flow_report_classify_main;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
u32 i;
q = vl_api_client_index_to_input_queue (mp->client_index);
diff --git a/src/vnet/geneve/geneve_api.c b/src/vnet/geneve/geneve_api.c
index 1239bfc24c0..2708d15f99e 100644
--- a/src/vnet/geneve/geneve_api.c
+++ b/src/vnet/geneve/geneve_api.c
@@ -113,7 +113,7 @@ out:
}
static void send_geneve_tunnel_details
- (geneve_tunnel_t * t, unix_shared_memory_queue_t * q, u32 context)
+ (geneve_tunnel_t * t, svm_queue_t * q, u32 context)
{
vl_api_geneve_tunnel_details_t *rmp;
ip4_main_t *im4 = &ip4_main;
@@ -148,7 +148,7 @@ static void send_geneve_tunnel_details
static void vl_api_geneve_tunnel_dump_t_handler
(vl_api_geneve_tunnel_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
geneve_main_t *vxm = &geneve_main;
geneve_tunnel_t *t;
u32 sw_if_index;
diff --git a/src/vnet/gre/gre_api.c b/src/vnet/gre/gre_api.c
index bcf01e2153f..baccc5fa601 100644
--- a/src/vnet/gre/gre_api.c
+++ b/src/vnet/gre/gre_api.c
@@ -94,7 +94,7 @@ out:
}
static void send_gre_tunnel_details
- (gre_tunnel_t * t, unix_shared_memory_queue_t * q, u32 context)
+ (gre_tunnel_t * t, svm_queue_t * q, u32 context)
{
vl_api_gre_tunnel_details_t *rmp;
u8 is_ipv6 = t->tunnel_dst.fp_proto == FIB_PROTOCOL_IP6 ? 1 : 0;
@@ -128,7 +128,7 @@ static void send_gre_tunnel_details
static void
vl_api_gre_tunnel_dump_t_handler (vl_api_gre_tunnel_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
gre_main_t *gm = &gre_main;
gre_tunnel_t *t;
u32 sw_if_index;
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c
index 09f9b3fc178..d3f170ff94b 100644
--- a/src/vnet/interface_api.c
+++ b/src/vnet/interface_api.c
@@ -241,7 +241,7 @@ send_sw_interface_details (vpe_api_main_t * am,
if (tag)
strncpy ((char *) mp->tag, (char *) tag, ARRAY_LEN (mp->tag) - 1);
- vl_msg_api_send (rp, (u8 *) mp);
+ vl_api_send_msg (rp, (u8 *) mp);
}
static void
@@ -529,7 +529,7 @@ ip_table_bind (fib_protocol_t fproto,
}
static void
-send_sw_interface_get_table_reply (unix_shared_memory_queue_t * q,
+send_sw_interface_get_table_reply (svm_queue_t * q,
u32 context, int retval, u32 vrf_id)
{
vl_api_sw_interface_get_table_reply_t *mp;
@@ -547,7 +547,7 @@ send_sw_interface_get_table_reply (unix_shared_memory_queue_t * q,
static void
vl_api_sw_interface_get_table_t_handler (vl_api_sw_interface_get_table_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
fib_table_t *fib_table = 0;
u32 sw_if_index = ~0;
u32 fib_index = ~0;
@@ -724,8 +724,7 @@ event_data_cmp (void *a1, void *a2)
static void
send_sw_interface_event (vpe_api_main_t * am,
vpe_client_registration_t * reg,
- unix_shared_memory_queue_t * q,
- vnet_sw_interface_t * swif)
+ svm_queue_t * q, vnet_sw_interface_t * swif)
{
vl_api_sw_interface_event_t *mp;
vnet_main_t *vnm = am->vnet_main;
@@ -755,7 +754,7 @@ link_state_process (vlib_main_t * vm,
vpe_client_registration_t *reg;
int i;
u32 prev_sw_if_index;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
vam->link_state_process_up = 1;
@@ -949,7 +948,7 @@ vl_api_create_vlan_subif_t_handler (vl_api_create_vlan_subif_t * mp)
uword *p;
vnet_interface_main_t *im = &vnm->interface_main;
u64 sup_and_sub_key;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
clib_error_t *error;
VALIDATE_SW_IF_INDEX (mp);
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c
index 599a66b3672..d0982e94f9e 100644
--- a/src/vnet/ip/ip_api.c
+++ b/src/vnet/ip/ip_api.c
@@ -107,8 +107,7 @@ send_ip_neighbor_details (u32 sw_if_index,
u8 is_ipv6,
u8 is_static,
u8 * mac_address,
- u8 * ip_address,
- unix_shared_memory_queue_t * q, u32 context)
+ u8 * ip_address, svm_queue_t * q, u32 context)
{
vl_api_ip_neighbor_details_t *mp;
@@ -128,7 +127,7 @@ send_ip_neighbor_details (u32 sw_if_index,
static void
vl_api_ip_neighbor_dump_t_handler (vl_api_ip_neighbor_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
q = vl_api_client_index_to_input_queue (mp->client_index);
if (q == 0)
@@ -202,7 +201,7 @@ copy_fib_next_hop (fib_route_path_encode_t * api_rpath, void *fp_arg)
static void
send_ip_fib_details (vpe_api_main_t * am,
- unix_shared_memory_queue_t * q,
+ svm_queue_t * q,
const fib_table_t * table,
const fib_prefix_t * pfx,
fib_route_path_encode_t * api_rpaths, u32 context)
@@ -287,7 +286,7 @@ static void
vl_api_ip_fib_dump_t_handler (vl_api_ip_fib_dump_t * mp)
{
vpe_api_main_t *am = &vpe_api_main;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
ip4_main_t *im = &ip4_main;
fib_table_t *fib_table;
fib_node_index_t *lfeip;
@@ -330,7 +329,7 @@ vl_api_ip_fib_dump_t_handler (vl_api_ip_fib_dump_t * mp)
static void
send_ip6_fib_details (vpe_api_main_t * am,
- unix_shared_memory_queue_t * q,
+ svm_queue_t * q,
const fib_table_t * table,
const fib_prefix_t * pfx,
fib_route_path_encode_t * api_rpaths, u32 context)
@@ -414,7 +413,7 @@ api_ip6_fib_table_put_entries (clib_bihash_kv_24_8_t * kvp, void *arg)
}
static void
-api_ip6_fib_table_get_all (unix_shared_memory_queue_t * q,
+api_ip6_fib_table_get_all (svm_queue_t * q,
vl_api_ip6_fib_dump_t * mp,
fib_table_t * fib_table)
{
@@ -449,7 +448,7 @@ api_ip6_fib_table_get_all (unix_shared_memory_queue_t * q,
static void
vl_api_ip6_fib_dump_t_handler (vl_api_ip6_fib_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
ip6_main_t *im6 = &ip6_main;
fib_table_t *fib_table;
@@ -466,7 +465,7 @@ vl_api_ip6_fib_dump_t_handler (vl_api_ip6_fib_dump_t * mp)
}
static void
-send_ip_mfib_details (unix_shared_memory_queue_t * q,
+send_ip_mfib_details (svm_queue_t * q,
u32 context, u32 table_id, fib_node_index_t mfei)
{
fib_route_path_encode_t *api_rpath, *api_rpaths = NULL;
@@ -531,7 +530,7 @@ vl_api_ip_mfib_table_dump_walk (fib_node_index_t fei, void *arg)
static void
vl_api_ip_mfib_dump_t_handler (vl_api_ip_mfib_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
ip4_main_t *im = &ip4_main;
mfib_table_t *mfib_table;
fib_node_index_t *mfeip;
@@ -569,7 +568,7 @@ vl_api_ip_mfib_dump_t_handler (vl_api_ip_mfib_dump_t * mp)
static void
send_ip6_mfib_details (vpe_api_main_t * am,
- unix_shared_memory_queue_t * q,
+ svm_queue_t * q,
u32 table_id,
mfib_prefix_t * pfx,
fib_route_path_encode_t * api_rpaths, u32 context)
@@ -628,7 +627,7 @@ static void
vl_api_ip6_mfib_dump_t_handler (vl_api_ip6_mfib_dump_t * mp)
{
vpe_api_main_t *am = &vpe_api_main;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
ip6_main_t *im = &ip6_main;
mfib_table_t *mfib_table;
fib_node_index_t *mfeip;
@@ -1419,8 +1418,7 @@ vl_api_ip_mroute_add_del_t_handler (vl_api_ip_mroute_add_del_t * mp)
static void
send_ip_details (vpe_api_main_t * am,
- unix_shared_memory_queue_t * q, u32 sw_if_index,
- u8 is_ipv6, u32 context)
+ svm_queue_t * q, u32 sw_if_index, u8 is_ipv6, u32 context)
{
vl_api_ip_details_t *mp;
@@ -1437,7 +1435,7 @@ send_ip_details (vpe_api_main_t * am,
static void
send_ip_address_details (vpe_api_main_t * am,
- unix_shared_memory_queue_t * q,
+ svm_queue_t * q,
u8 * ip, u16 prefix_length,
u32 sw_if_index, u8 is_ipv6, u32 context)
{
@@ -1468,7 +1466,7 @@ static void
vl_api_ip_address_dump_t_handler (vl_api_ip_address_dump_t * mp)
{
vpe_api_main_t *am = &vpe_api_main;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
ip6_address_t *r6;
ip4_address_t *r4;
ip6_main_t *im6 = &ip6_main;
@@ -1523,7 +1521,7 @@ vl_api_ip_dump_t_handler (vl_api_ip_dump_t * mp)
vnet_main_t *vnm = vnet_get_main ();
vlib_main_t *vm = vlib_get_main ();
vnet_interface_main_t *im = &vnm->interface_main;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
vnet_sw_interface_t *si, *sorted_sis;
u32 sw_if_index = ~0;
@@ -1670,7 +1668,7 @@ static void
}
static void
-send_ip6nd_proxy_details (unix_shared_memory_queue_t * q,
+send_ip6nd_proxy_details (svm_queue_t * q,
u32 context,
const ip46_address_t * addr, u32 sw_if_index)
{
@@ -1714,7 +1712,7 @@ vl_api_ip6nd_proxy_dump_t_handler (vl_api_ip6nd_proxy_dump_t * mp)
};
fib_node_index_t *feip;
fib_prefix_t pfx;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
q = vl_api_client_index_to_input_queue (mp->client_index);
if (q == 0)
@@ -1829,7 +1827,7 @@ static void
}
void
-vl_mfib_signal_send_one (unix_shared_memory_queue_t * q,
+vl_mfib_signal_send_one (svm_queue_t * q,
u32 context, const mfib_signal_t * mfs)
{
vl_api_mfib_signal_details_t *mp;
@@ -1884,7 +1882,7 @@ vl_mfib_signal_send_one (unix_shared_memory_queue_t * q,
static void
vl_api_mfib_signal_dump_t_handler (vl_api_mfib_signal_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
q = vl_api_client_index_to_input_queue (mp->client_index);
if (q == 0)
@@ -2112,7 +2110,7 @@ handle_ip4_arp_event (u32 pool_index)
vlib_main_t *vm = vam->vlib_main;
vl_api_ip4_arp_event_t *event;
vl_api_ip4_arp_event_t *mp;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
/* Client can cancel, die, etc. */
if (pool_is_free_index (vam->arp_events, pool_index))
@@ -2161,7 +2159,7 @@ handle_ip6_nd_event (u32 pool_index)
vlib_main_t *vm = vam->vlib_main;
vl_api_ip6_nd_event_t *event;
vl_api_ip6_nd_event_t *mp;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
/* Client can cancel, die, etc. */
if (pool_is_free_index (vam->nd_events, pool_index))
@@ -2336,7 +2334,7 @@ wc_arp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
/* *INDENT-OFF* */
pool_foreach(reg, vpe_api_main.wc_ip4_arp_events_registrations,
({
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
q = vl_api_client_index_to_input_queue (reg->client_index);
if (q && q->cursize < q->maxsize)
{
@@ -2375,7 +2373,7 @@ wc_arp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
/* *INDENT-OFF* */
pool_foreach(reg, vpe_api_main.wc_ip6_nd_events_registrations,
({
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
q = vl_api_client_index_to_input_queue (reg->client_index);
if (q && q->cursize < q->maxsize)
{
diff --git a/src/vnet/ip/punt_api.c b/src/vnet/ip/punt_api.c
index 6e6dee2457e..33fc3f931a7 100644
--- a/src/vnet/ip/punt_api.c
+++ b/src/vnet/ip/punt_api.c
@@ -70,7 +70,7 @@ vl_api_punt_socket_register_t_handler (vl_api_punt_socket_register_t * mp)
vlib_main_t *vm = vlib_get_main ();
int rv = 0;
clib_error_t *error;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
error = vnet_punt_socket_add (vm, ntohl (mp->header_version),
mp->is_ip4, mp->l4_protocol,
@@ -102,7 +102,7 @@ vl_api_punt_socket_deregister_t_handler (vl_api_punt_socket_deregister_t * mp)
vlib_main_t *vm = vlib_get_main ();
int rv = 0;
clib_error_t *error;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
error = vnet_punt_socket_del (vm, mp->is_ip4, mp->l4_protocol,
ntohs (mp->l4_port));
diff --git a/src/vnet/ipsec-gre/ipsec_gre_api.c b/src/vnet/ipsec-gre/ipsec_gre_api.c
index a7ea1490bae..af3003004b9 100644
--- a/src/vnet/ipsec-gre/ipsec_gre_api.c
+++ b/src/vnet/ipsec-gre/ipsec_gre_api.c
@@ -83,7 +83,7 @@ out:
}
static void send_ipsec_gre_tunnel_details
- (ipsec_gre_tunnel_t * t, unix_shared_memory_queue_t * q, u32 context)
+ (ipsec_gre_tunnel_t * t, svm_queue_t * q, u32 context)
{
vl_api_ipsec_gre_tunnel_details_t *rmp;
@@ -103,7 +103,7 @@ static void send_ipsec_gre_tunnel_details
static void vl_api_ipsec_gre_tunnel_dump_t_handler
(vl_api_ipsec_gre_tunnel_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
ipsec_gre_main_t *igm = &ipsec_gre_main;
ipsec_gre_tunnel_t *t;
u32 sw_if_index;
diff --git a/src/vnet/ipsec/ipsec_api.c b/src/vnet/ipsec/ipsec_api.c
index 5fbf86bb7e3..361bddbc8d0 100644
--- a/src/vnet/ipsec/ipsec_api.c
+++ b/src/vnet/ipsec/ipsec_api.c
@@ -252,8 +252,7 @@ out:
}
static void
-send_ipsec_spd_details (ipsec_policy_t * p, unix_shared_memory_queue_t * q,
- u32 context)
+send_ipsec_spd_details (ipsec_policy_t * p, svm_queue_t * q, u32 context)
{
vl_api_ipsec_spd_details_t *mp;
@@ -296,7 +295,7 @@ send_ipsec_spd_details (ipsec_policy_t * p, unix_shared_memory_queue_t * q,
static void
vl_api_ipsec_spd_dump_t_handler (vl_api_ipsec_spd_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
ipsec_main_t *im = &ipsec_main;
ipsec_policy_t *policy;
ipsec_spd_t *spd;
@@ -400,7 +399,7 @@ vl_api_ipsec_tunnel_if_add_del_t_handler (vl_api_ipsec_tunnel_if_add_del_t *
}
static void
-send_ipsec_sa_details (ipsec_sa_t * sa, unix_shared_memory_queue_t * q,
+send_ipsec_sa_details (ipsec_sa_t * sa, svm_queue_t * q,
u32 context, u32 sw_if_index)
{
vl_api_ipsec_sa_details_t *mp;
@@ -463,7 +462,7 @@ send_ipsec_sa_details (ipsec_sa_t * sa, unix_shared_memory_queue_t * q,
static void
vl_api_ipsec_sa_dump_t_handler (vl_api_ipsec_sa_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
ipsec_main_t *im = &ipsec_main;
vnet_main_t *vnm = im->vnet_main;
ipsec_sa_t *sa;
diff --git a/src/vnet/l2/l2_api.c b/src/vnet/l2/l2_api.c
index f62bad14b00..206b41f142c 100644
--- a/src/vnet/l2/l2_api.c
+++ b/src/vnet/l2/l2_api.c
@@ -72,7 +72,7 @@ _(BRIDGE_DOMAIN_SET_MAC_AGE, bridge_domain_set_mac_age) \
_(SW_INTERFACE_SET_VPATH, sw_interface_set_vpath)
static void
-send_l2_xconnect_details (unix_shared_memory_queue_t * q, u32 context,
+send_l2_xconnect_details (svm_queue_t * q, u32 context,
u32 rx_sw_if_index, u32 tx_sw_if_index)
{
vl_api_l2_xconnect_details_t *mp;
@@ -90,7 +90,7 @@ send_l2_xconnect_details (unix_shared_memory_queue_t * q, u32 context,
static void
vl_api_l2_xconnect_dump_t_handler (vl_api_l2_xconnect_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
vnet_main_t *vnm = vnet_get_main ();
vnet_interface_main_t *im = &vnm->interface_main;
l2input_main_t *l2im = &l2input_main;
@@ -126,7 +126,7 @@ vl_api_l2_fib_clear_table_t_handler (vl_api_l2_fib_clear_table_t * mp)
static void
send_l2fib_table_entry (vpe_api_main_t * am,
- unix_shared_memory_queue_t * q,
+ svm_queue_t * q,
l2fib_entry_key_t * l2fe_key,
l2fib_entry_result_t * l2fe_res, u32 context)
{
@@ -158,7 +158,7 @@ vl_api_l2_fib_table_dump_t_handler (vl_api_l2_fib_table_dump_t * mp)
l2fib_entry_result_t *l2fe_res = NULL;
u32 ni, bd_id = ntohl (mp->bd_id);
u32 bd_index;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
uword *p;
q = vl_api_client_index_to_input_queue (mp->client_index);
@@ -439,7 +439,7 @@ vl_api_bridge_domain_add_del_t_handler (vl_api_bridge_domain_add_del_t * mp)
static void
send_bridge_domain_details (l2input_main_t * l2im,
- unix_shared_memory_queue_t * q,
+ svm_queue_t * q,
l2_bridge_domain_t * bd_config,
u32 n_sw_ifs, u32 context)
{
@@ -489,8 +489,7 @@ vl_api_bridge_domain_dump_t_handler (vl_api_bridge_domain_dump_t * mp)
bd_main_t *bdm = &bd_main;
l2input_main_t *l2im = &l2input_main;
- unix_shared_memory_queue_t *q =
- vl_api_client_index_to_input_queue (mp->client_index);
+ svm_queue_t *q = vl_api_client_index_to_input_queue (mp->client_index);
if (q == 0)
return;
diff --git a/src/vnet/l2/l2_fib.c b/src/vnet/l2/l2_fib.c
index 4a784470049..66bb8e3f3c7 100644
--- a/src/vnet/l2/l2_fib.c
+++ b/src/vnet/l2/l2_fib.c
@@ -962,7 +962,7 @@ l2fib_scan (vlib_main_t * vm, f64 start_time, u8 event_only)
u32 client = lm->client_pid;
u32 cl_idx = lm->client_index;
vl_api_l2_macs_event_t *mp = 0;
- unix_shared_memory_queue_t *q = 0;
+ svm_queue_t *q = 0;
if (client)
{
diff --git a/src/vnet/l2tp/l2tp_api.c b/src/vnet/l2tp/l2tp_api.c
index 88d758c9ff0..aaba2b04e19 100644
--- a/src/vnet/l2tp/l2tp_api.c
+++ b/src/vnet/l2tp/l2tp_api.c
@@ -51,7 +51,7 @@ _(SW_IF_L2TPV3_TUNNEL_DUMP, sw_if_l2tpv3_tunnel_dump)
static void
send_sw_if_l2tpv3_tunnel_details (vpe_api_main_t * am,
- unix_shared_memory_queue_t * q,
+ svm_queue_t * q,
l2t_session_t * s,
l2t_main_t * lm, u32 context)
{
@@ -91,7 +91,7 @@ vl_api_sw_if_l2tpv3_tunnel_dump_t_handler (vl_api_sw_if_l2tpv3_tunnel_dump_t *
{
vpe_api_main_t *am = &vpe_api_main;
l2t_main_t *lm = &l2t_main;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
l2t_session_t *session;
q = vl_api_client_index_to_input_queue (mp->client_index);
diff --git a/src/vnet/lisp-cp/lisp_api.c b/src/vnet/lisp-cp/lisp_api.c
index f1b68d477ae..9946f28f131 100644
--- a/src/vnet/lisp-cp/lisp_api.c
+++ b/src/vnet/lisp-cp/lisp_api.c
@@ -420,7 +420,7 @@ vl_api_lisp_use_petr_t_handler (vl_api_lisp_use_petr_t * mp)
static void
vl_api_show_lisp_use_petr_t_handler (vl_api_show_lisp_use_petr_t * mp)
{
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
vl_api_show_lisp_use_petr_reply_t *rmp = NULL;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
mapping_t *m;
@@ -583,8 +583,7 @@ send_reply:
static void
send_lisp_locator_details (lisp_cp_main_t * lcm,
- locator_t * loc,
- unix_shared_memory_queue_t * q, u32 context)
+ locator_t * loc, svm_queue_t * q, u32 context)
{
vl_api_lisp_locator_details_t *rmp;
@@ -613,7 +612,7 @@ static void
vl_api_lisp_locator_dump_t_handler (vl_api_lisp_locator_dump_t * mp)
{
u8 *ls_name = 0;
- unix_shared_memory_queue_t *q = 0;
+ svm_queue_t *q = 0;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
locator_set_t *lsit = 0;
locator_t *loc = 0;
@@ -657,8 +656,7 @@ out:
static void
send_lisp_locator_set_details (lisp_cp_main_t * lcm,
locator_set_t * lsit,
- unix_shared_memory_queue_t * q,
- u32 context, u32 ls_index)
+ svm_queue_t * q, u32 context, u32 ls_index)
{
vl_api_lisp_locator_set_details_t *rmp;
u8 *str = 0;
@@ -688,7 +686,7 @@ send_lisp_locator_set_details (lisp_cp_main_t * lcm,
static void
vl_api_lisp_locator_set_dump_t_handler (vl_api_lisp_locator_set_dump_t * mp)
{
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
locator_set_t *lsit = NULL;
u8 filter;
@@ -768,8 +766,7 @@ fid_type_to_api_type (fid_address_t * fid)
static void
send_lisp_eid_table_details (mapping_t * mapit,
- unix_shared_memory_queue_t * q,
- u32 context, u8 filter)
+ svm_queue_t * q, u32 context, u8 filter)
{
fid_address_t *fid;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
@@ -864,7 +861,7 @@ static void
vl_api_lisp_eid_table_dump_t_handler (vl_api_lisp_eid_table_dump_t * mp)
{
u32 mi;
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
mapping_t *mapit = NULL;
gid_address_t _eid, *eid = &_eid;
@@ -903,8 +900,7 @@ vl_api_lisp_eid_table_dump_t_handler (vl_api_lisp_eid_table_dump_t * mp)
}
static void
-send_lisp_map_server_details (ip_address_t * ip,
- unix_shared_memory_queue_t * q, u32 context)
+send_lisp_map_server_details (ip_address_t * ip, svm_queue_t * q, u32 context)
{
vl_api_lisp_map_server_details_t *rmp = NULL;
@@ -937,7 +933,7 @@ send_lisp_map_server_details (ip_address_t * ip,
static void
vl_api_lisp_map_server_dump_t_handler (vl_api_lisp_map_server_dump_t * mp)
{
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
lisp_msmr_t *mr;
@@ -955,7 +951,7 @@ vl_api_lisp_map_server_dump_t_handler (vl_api_lisp_map_server_dump_t * mp)
static void
send_lisp_map_resolver_details (ip_address_t * ip,
- unix_shared_memory_queue_t * q, u32 context)
+ svm_queue_t * q, u32 context)
{
vl_api_lisp_map_resolver_details_t *rmp = NULL;
@@ -988,7 +984,7 @@ send_lisp_map_resolver_details (ip_address_t * ip,
static void
vl_api_lisp_map_resolver_dump_t_handler (vl_api_lisp_map_resolver_dump_t * mp)
{
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
lisp_msmr_t *mr;
@@ -1005,8 +1001,7 @@ vl_api_lisp_map_resolver_dump_t_handler (vl_api_lisp_map_resolver_dump_t * mp)
}
static void
-send_eid_table_map_pair (hash_pair_t * p,
- unix_shared_memory_queue_t * q, u32 context)
+send_eid_table_map_pair (hash_pair_t * p, svm_queue_t * q, u32 context)
{
vl_api_lisp_eid_table_map_details_t *rmp = NULL;
@@ -1024,7 +1019,7 @@ static void
vl_api_lisp_eid_table_map_dump_t_handler (vl_api_lisp_eid_table_map_dump_t *
mp)
{
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
hash_pair_t *p;
uword *vni_table = 0;
@@ -1053,7 +1048,7 @@ vl_api_lisp_eid_table_map_dump_t_handler (vl_api_lisp_eid_table_map_dump_t *
}
static void
-send_eid_table_vni (u32 vni, unix_shared_memory_queue_t * q, u32 context)
+send_eid_table_vni (u32 vni, svm_queue_t * q, u32 context)
{
vl_api_lisp_eid_table_vni_details_t *rmp = 0;
@@ -1166,7 +1161,7 @@ vl_api_lisp_eid_table_vni_dump_t_handler (vl_api_lisp_eid_table_vni_dump_t *
{
hash_pair_t *p;
u32 *vnis = 0;
- unix_shared_memory_queue_t *q = 0;
+ svm_queue_t *q = 0;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
q = vl_api_client_index_to_input_queue (mp->client_index);
@@ -1198,7 +1193,7 @@ vl_api_lisp_eid_table_vni_dump_t_handler (vl_api_lisp_eid_table_vni_dump_t *
static void
vl_api_show_lisp_status_t_handler (vl_api_show_lisp_status_t * mp)
{
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
vl_api_show_lisp_status_reply_t *rmp = NULL;
int rv = 0;
@@ -1221,7 +1216,7 @@ static void
vl_api_lisp_get_map_request_itr_rlocs_t_handler
(vl_api_lisp_get_map_request_itr_rlocs_t * mp)
{
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
vl_api_lisp_get_map_request_itr_rlocs_reply_t *rmp = NULL;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
locator_set_t *loc_set = 0;
@@ -1259,7 +1254,7 @@ static void
static void
vl_api_show_lisp_pitr_t_handler (vl_api_show_lisp_pitr_t * mp)
{
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
vl_api_show_lisp_pitr_reply_t *rmp = NULL;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
mapping_t *m;
diff --git a/src/vnet/lisp-cp/one_api.c b/src/vnet/lisp-cp/one_api.c
index 0708bf033f9..7afbf7f9582 100644
--- a/src/vnet/lisp-cp/one_api.c
+++ b/src/vnet/lisp-cp/one_api.c
@@ -70,7 +70,7 @@
#define REPLY_DETAILS(t, body) \
do { \
- unix_shared_memory_queue_t * q; \
+ svm_queue_t * q; \
rv = vl_msg_api_pd_handler (mp, rv); \
q = vl_api_client_index_to_input_queue (mp->client_index); \
if (!q) \
@@ -537,7 +537,7 @@ vl_api_one_use_petr_t_handler (vl_api_one_use_petr_t * mp)
static void
vl_api_show_one_use_petr_t_handler (vl_api_show_one_use_petr_t * mp)
{
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
vl_api_show_one_use_petr_reply_t *rmp = NULL;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
mapping_t *m;
@@ -698,8 +698,7 @@ send_reply:
static void
send_one_locator_details (lisp_cp_main_t * lcm,
- locator_t * loc,
- unix_shared_memory_queue_t * q, u32 context)
+ locator_t * loc, svm_queue_t * q, u32 context)
{
vl_api_one_locator_details_t *rmp;
@@ -728,7 +727,7 @@ static void
vl_api_one_locator_dump_t_handler (vl_api_one_locator_dump_t * mp)
{
u8 *ls_name = 0;
- unix_shared_memory_queue_t *q = 0;
+ svm_queue_t *q = 0;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
locator_set_t *lsit = 0;
locator_t *loc = 0;
@@ -772,8 +771,7 @@ out:
static void
send_one_locator_set_details (lisp_cp_main_t * lcm,
locator_set_t * lsit,
- unix_shared_memory_queue_t * q,
- u32 context, u32 ls_index)
+ svm_queue_t * q, u32 context, u32 ls_index)
{
vl_api_one_locator_set_details_t *rmp;
u8 *str = 0;
@@ -803,7 +801,7 @@ send_one_locator_set_details (lisp_cp_main_t * lcm,
static void
vl_api_one_locator_set_dump_t_handler (vl_api_one_locator_set_dump_t * mp)
{
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
locator_set_t *lsit = NULL;
u8 filter;
@@ -883,8 +881,7 @@ fid_type_to_api_type (fid_address_t * fid)
static void
send_one_eid_table_details (mapping_t * mapit,
- unix_shared_memory_queue_t * q,
- u32 context, u8 filter)
+ svm_queue_t * q, u32 context, u8 filter)
{
fid_address_t *fid;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
@@ -985,7 +982,7 @@ static void
vl_api_one_eid_table_dump_t_handler (vl_api_one_eid_table_dump_t * mp)
{
u32 mi;
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
mapping_t *mapit = NULL;
gid_address_t _eid, *eid = &_eid;
@@ -1024,8 +1021,7 @@ vl_api_one_eid_table_dump_t_handler (vl_api_one_eid_table_dump_t * mp)
}
static void
-send_one_map_server_details (ip_address_t * ip,
- unix_shared_memory_queue_t * q, u32 context)
+send_one_map_server_details (ip_address_t * ip, svm_queue_t * q, u32 context)
{
vl_api_one_map_server_details_t *rmp = NULL;
@@ -1058,7 +1054,7 @@ send_one_map_server_details (ip_address_t * ip,
static void
vl_api_one_map_server_dump_t_handler (vl_api_one_map_server_dump_t * mp)
{
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
lisp_msmr_t *mr;
@@ -1076,7 +1072,7 @@ vl_api_one_map_server_dump_t_handler (vl_api_one_map_server_dump_t * mp)
static void
send_one_map_resolver_details (ip_address_t * ip,
- unix_shared_memory_queue_t * q, u32 context)
+ svm_queue_t * q, u32 context)
{
vl_api_one_map_resolver_details_t *rmp = NULL;
@@ -1109,7 +1105,7 @@ send_one_map_resolver_details (ip_address_t * ip,
static void
vl_api_one_map_resolver_dump_t_handler (vl_api_one_map_resolver_dump_t * mp)
{
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
lisp_msmr_t *mr;
@@ -1126,8 +1122,7 @@ vl_api_one_map_resolver_dump_t_handler (vl_api_one_map_resolver_dump_t * mp)
}
static void
-send_eid_table_map_pair (hash_pair_t * p,
- unix_shared_memory_queue_t * q, u32 context)
+send_eid_table_map_pair (hash_pair_t * p, svm_queue_t * q, u32 context)
{
vl_api_one_eid_table_map_details_t *rmp = NULL;
@@ -1144,7 +1139,7 @@ send_eid_table_map_pair (hash_pair_t * p,
static void
vl_api_one_eid_table_map_dump_t_handler (vl_api_one_eid_table_map_dump_t * mp)
{
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
hash_pair_t *p;
uword *vni_table = 0;
@@ -1173,7 +1168,7 @@ vl_api_one_eid_table_map_dump_t_handler (vl_api_one_eid_table_map_dump_t * mp)
}
static void
-send_eid_table_vni (u32 vni, unix_shared_memory_queue_t * q, u32 context)
+send_eid_table_vni (u32 vni, svm_queue_t * q, u32 context)
{
vl_api_one_eid_table_vni_details_t *rmp = 0;
@@ -1296,7 +1291,7 @@ vl_api_one_eid_table_vni_dump_t_handler (vl_api_one_eid_table_vni_dump_t * mp)
{
hash_pair_t *p;
u32 *vnis = 0;
- unix_shared_memory_queue_t *q = 0;
+ svm_queue_t *q = 0;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
q = vl_api_client_index_to_input_queue (mp->client_index);
@@ -1375,7 +1370,7 @@ static void
static void
vl_api_show_one_nsh_mapping_t_handler (vl_api_show_one_nsh_mapping_t * mp)
{
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
vl_api_show_one_nsh_mapping_reply_t *rmp = NULL;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
mapping_t *m;
@@ -1424,7 +1419,7 @@ vl_api_show_one_nsh_mapping_t_handler (vl_api_show_one_nsh_mapping_t * mp)
static void
vl_api_show_one_pitr_t_handler (vl_api_show_one_pitr_t * mp)
{
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
vl_api_show_one_pitr_reply_t *rmp = NULL;
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
mapping_t *m;
diff --git a/src/vnet/lisp-gpe/lisp_gpe_api.c b/src/vnet/lisp-gpe/lisp_gpe_api.c
index 4ed480c4fd8..86b2f6cbc69 100644
--- a/src/vnet/lisp-gpe/lisp_gpe_api.c
+++ b/src/vnet/lisp-gpe/lisp_gpe_api.c
@@ -154,7 +154,7 @@ static void
lisp_fwd_path_t *path;
vl_api_gpe_fwd_entry_path_details_t *rmp = NULL;
lisp_gpe_main_t *lgm = &lisp_gpe_main;
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
lisp_gpe_fwd_entry_t *lfe;
gpe_fwd_entry_path_dump_t_net_to_host (mp);
diff --git a/src/vnet/map/map_api.c b/src/vnet/map/map_api.c
index 35b82d42b16..8ff73ec71e2 100644
--- a/src/vnet/map/map_api.c
+++ b/src/vnet/map/map_api.c
@@ -110,7 +110,7 @@ vl_api_map_domain_dump_t_handler (vl_api_map_domain_dump_t * mp)
vl_api_map_domain_details_t *rmp;
map_main_t *mm = &map_main;
map_domain_t *d;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
if (pool_elts (mm->domains) == 0)
return;
@@ -149,7 +149,7 @@ vl_api_map_domain_dump_t_handler (vl_api_map_domain_dump_t * mp)
static void
vl_api_map_rule_dump_t_handler (vl_api_map_rule_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
u16 i;
ip6_address_t dst;
vl_api_map_rule_details_t *rmp;
@@ -199,8 +199,7 @@ vl_api_map_summary_stats_t_handler (vl_api_map_summary_stats_t * mp)
u64 total_pkts[VLIB_N_RX_TX];
u64 total_bytes[VLIB_N_RX_TX];
map_main_t *mm = &map_main;
- unix_shared_memory_queue_t *q =
- vl_api_client_index_to_input_queue (mp->client_index);
+ svm_queue_t *q = vl_api_client_index_to_input_queue (mp->client_index);
if (!q)
return;
diff --git a/src/vnet/mfib/mfib_signal.c b/src/vnet/mfib/mfib_signal.c
index cd486da32f8..38e4bbabb3c 100644
--- a/src/vnet/mfib/mfib_signal.c
+++ b/src/vnet/mfib/mfib_signal.c
@@ -91,7 +91,7 @@ mfib_signal_lock_release (void)
}
int
-mfib_signal_send_one (struct _unix_shared_memory_queue *q,
+mfib_signal_send_one (struct _svm_queue *q,
u32 context)
{
u32 li, si;
diff --git a/src/vnet/mfib/mfib_signal.h b/src/vnet/mfib/mfib_signal.h
index 732d8aff3e9..4dd60a6dace 100644
--- a/src/vnet/mfib/mfib_signal.h
+++ b/src/vnet/mfib/mfib_signal.h
@@ -47,12 +47,12 @@ extern void mfib_signal_remove_itf(const mfib_itf_t *mfi);
extern void mfib_signal_module_init(void);
-struct _unix_shared_memory_queue;
+struct _svm_queue;
-extern void vl_mfib_signal_send_one(struct _unix_shared_memory_queue *q,
+extern void vl_mfib_signal_send_one(struct _svm_queue *q,
u32 context,
const mfib_signal_t *mfs);
-extern int mfib_signal_send_one(struct _unix_shared_memory_queue *q,
+extern int mfib_signal_send_one(struct _svm_queue *q,
u32 context);
#endif
diff --git a/src/vnet/mpls/mpls_api.c b/src/vnet/mpls/mpls_api.c
index a772f7869ea..d9f40501526 100644
--- a/src/vnet/mpls/mpls_api.c
+++ b/src/vnet/mpls/mpls_api.c
@@ -376,7 +376,7 @@ static void
typedef struct mpls_tunnel_send_walk_ctx_t_
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
u32 index;
u32 context;
} mpls_tunnel_send_walk_ctx_t;
@@ -433,7 +433,7 @@ send_mpls_tunnel_entry (u32 mti, void *arg)
static void
vl_api_mpls_tunnel_dump_t_handler (vl_api_mpls_tunnel_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
q = vl_api_client_index_to_input_queue (mp->client_index);
if (q == 0)
@@ -449,7 +449,7 @@ vl_api_mpls_tunnel_dump_t_handler (vl_api_mpls_tunnel_dump_t * mp)
static void
send_mpls_fib_details (vpe_api_main_t * am,
- unix_shared_memory_queue_t * q,
+ svm_queue_t * q,
const fib_table_t * table,
u32 label, u32 eos,
fib_route_path_encode_t * api_rpaths, u32 context)
@@ -507,7 +507,7 @@ static void
vl_api_mpls_fib_dump_t_handler (vl_api_mpls_fib_dump_t * mp)
{
vpe_api_main_t *am = &vpe_api_main;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
mpls_main_t *mm = &mpls_main;
fib_table_t *fib_table;
mpls_fib_t *mpls_fib;
diff --git a/src/vnet/policer/policer_api.c b/src/vnet/policer/policer_api.c
index 686ed508a59..a658076685b 100644
--- a/src/vnet/policer/policer_api.c
+++ b/src/vnet/policer/policer_api.c
@@ -96,7 +96,7 @@ static void
send_policer_details (u8 * name,
sse2_qos_pol_cfg_params_st * config,
policer_read_response_type_st * templ,
- unix_shared_memory_queue_t * q, u32 context)
+ svm_queue_t * q, u32 context)
{
vl_api_policer_details_t *mp;
@@ -136,7 +136,7 @@ send_policer_details (u8 * name,
static void
vl_api_policer_dump_t_handler (vl_api_policer_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
vnet_policer_main_t *pm = &vnet_policer_main;
hash_pair_t *hp;
uword *p;
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index f6151b6b487..8090e75a6dc 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -76,7 +76,7 @@ application_local_session_table (application_t * app)
int
application_api_queue_is_full (application_t * app)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
/* builtin servers are always OK */
if (app->api_client_index == ~0)
diff --git a/src/vnet/session/application.h b/src/vnet/session/application.h
index 2892bc59f12..fd6454f21af 100644
--- a/src/vnet/session/application.h
+++ b/src/vnet/session/application.h
@@ -72,7 +72,7 @@ typedef struct _application
u32 ns_index;
/** Application listens for events on this svm queue */
- unix_shared_memory_queue_t *event_queue;
+ svm_queue_t *event_queue;
/*
* Callbacks: shoulder-taps for the server/client
diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c
index 9e6a1b55cbb..dc3e4c9e648 100644
--- a/src/vnet/session/segment_manager.c
+++ b/src/vnet/session/segment_manager.c
@@ -530,12 +530,12 @@ segment_manager_dealloc_fifos (u32 svm_segment_index, svm_fifo_t * rx_fifo,
/**
* Allocates shm queue in the first segment
*/
-unix_shared_memory_queue_t *
+svm_queue_t *
segment_manager_alloc_queue (segment_manager_t * sm, u32 queue_size)
{
ssvm_shared_header_t *sh;
svm_fifo_segment_private_t *segment;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
void *oldheap;
ASSERT (sm->segment_indices != 0);
@@ -544,10 +544,9 @@ segment_manager_alloc_queue (segment_manager_t * sm, u32 queue_size)
sh = segment->ssvm.sh;
oldheap = ssvm_push_heap (sh);
- q = unix_shared_memory_queue_init (queue_size,
- sizeof (session_fifo_event_t),
- 0 /* consumer pid */ ,
- 0 /* signal when queue non-empty */ );
+ q = svm_queue_init (queue_size,
+ sizeof (session_fifo_event_t), 0 /* consumer pid */ ,
+ 0 /* signal when queue non-empty */ );
ssvm_pop_heap (oldheap);
return q;
}
@@ -556,8 +555,7 @@ segment_manager_alloc_queue (segment_manager_t * sm, u32 queue_size)
* Frees shm queue allocated in the first segment
*/
void
-segment_manager_dealloc_queue (segment_manager_t * sm,
- unix_shared_memory_queue_t * q)
+segment_manager_dealloc_queue (segment_manager_t * sm, svm_queue_t * q)
{
ssvm_shared_header_t *sh;
svm_fifo_segment_private_t *segment;
@@ -569,7 +567,7 @@ segment_manager_dealloc_queue (segment_manager_t * sm,
sh = segment->ssvm.sh;
oldheap = ssvm_push_heap (sh);
- unix_shared_memory_queue_free (q);
+ svm_queue_free (q);
ssvm_pop_heap (oldheap);
}
diff --git a/src/vnet/session/segment_manager.h b/src/vnet/session/segment_manager.h
index 9d2d141e7b4..41e2308928f 100644
--- a/src/vnet/session/segment_manager.h
+++ b/src/vnet/session/segment_manager.h
@@ -17,8 +17,7 @@
#include <vnet/vnet.h>
#include <svm/svm_fifo_segment.h>
-
-#include <vlibmemory/unix_shared_memory_queue.h>
+#include <svm/queue.h>
#include <vlibmemory/api.h>
#include <vppinfra/lock.h>
@@ -113,10 +112,9 @@ segment_manager_alloc_session_fifos (segment_manager_t * sm,
void
segment_manager_dealloc_fifos (u32 svm_segment_index, svm_fifo_t * rx_fifo,
svm_fifo_t * tx_fifo);
-unix_shared_memory_queue_t *segment_manager_alloc_queue (segment_manager_t *
- sm, u32 queue_size);
-void segment_manager_dealloc_queue (segment_manager_t * sm,
- unix_shared_memory_queue_t * q);
+svm_queue_t *segment_manager_alloc_queue (segment_manager_t *
+ sm, u32 queue_size);
+void segment_manager_dealloc_queue (segment_manager_t * sm, svm_queue_t * q);
void segment_manager_app_detach (segment_manager_t * sm);
segment_manager_properties_t *segment_manager_properties_alloc (void);
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 408a1f5caf0..adcbb2924d8 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -33,7 +33,7 @@ session_send_evt_to_thread (u64 session_handle, fifo_event_type_t evt_type,
{
u32 tries = 0;
session_fifo_event_t evt = { {0}, };
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
evt.event_type = evt_type;
if (evt_type == FIFO_EVENT_RPC)
@@ -45,7 +45,7 @@ session_send_evt_to_thread (u64 session_handle, fifo_event_type_t evt_type,
evt.session_handle = session_handle;
q = session_manager_get_vpp_event_queue (thread_index);
- while (unix_shared_memory_queue_add (q, (u8 *) & evt, 1))
+ while (svm_queue_add (q, (u8 *) & evt, 1))
{
if (tries++ == 3)
{
@@ -443,7 +443,7 @@ session_enqueue_notify (stream_session_t * s, u8 block)
{
application_t *app;
session_fifo_event_t evt;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
if (PREDICT_FALSE (s->session_state == SESSION_STATE_CLOSED))
{
@@ -479,8 +479,8 @@ session_enqueue_notify (stream_session_t * s, u8 block)
/* Based on request block (or not) for lack of space */
if (block || PREDICT_TRUE (q->cursize < q->maxsize))
- unix_shared_memory_queue_add (app->event_queue, (u8 *) & evt,
- 0 /* do wait for mutex */ );
+ svm_queue_add (app->event_queue, (u8 *) & evt,
+ 0 /* do wait for mutex */ );
else
{
clib_warning ("fifo full");
@@ -980,7 +980,7 @@ session_vpp_event_queue_allocate (session_manager_main_t * smm,
event_queue_length = smm->configured_event_queue_length;
smm->vpp_event_queues[thread_index] =
- unix_shared_memory_queue_init
+ svm_queue_init
(event_queue_length,
sizeof (session_fifo_event_t), 0 /* consumer pid */ ,
0 /* (do not) send signal when queue non-empty */ );
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h
index b76e56de50b..5e017c6c852 100644
--- a/src/vnet/session/session.h
+++ b/src/vnet/session/session.h
@@ -18,9 +18,9 @@
#include <vnet/session/stream_session.h>
#include <vnet/session/session_lookup.h>
#include <vnet/session/transport_interface.h>
-#include <vlibmemory/unix_shared_memory_queue.h>
#include <vnet/session/session_debug.h>
#include <vnet/session/segment_manager.h>
+#include <svm/queue.h>
#define HALF_OPEN_LOOKUP_INVALID_VALUE ((u64)~0)
#define INVALID_INDEX ((u32)~0)
@@ -147,7 +147,7 @@ struct _session_manager_main
session_fifo_event_t **pending_disconnects;
/** vpp fifo event queue */
- unix_shared_memory_queue_t **vpp_event_queues;
+ svm_queue_t **vpp_event_queues;
/** Unique segment name counter */
u32 unique_segment_name_counter;
@@ -455,7 +455,7 @@ void session_register_transport (transport_proto_t transport_proto,
clib_error_t *vnet_session_enable_disable (vlib_main_t * vm, u8 is_en);
-always_inline unix_shared_memory_queue_t *
+always_inline svm_queue_t *
session_manager_get_vpp_event_queue (u32 thread_index)
{
return session_manager_main.vpp_event_queues[thread_index];
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 804fc23539a..75bdedfe9ce 100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -62,7 +62,7 @@ send_add_segment_callback (u32 api_client_index, const u8 * segment_name,
u32 segment_size)
{
vl_api_map_another_segment_t *mp;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
q = vl_api_client_index_to_input_queue (api_client_index);
@@ -85,7 +85,7 @@ static int
send_session_accept_callback (stream_session_t * s)
{
vl_api_accept_session_t *mp;
- unix_shared_memory_queue_t *q, *vpp_queue;
+ svm_queue_t *q, *vpp_queue;
application_t *server = application_get (s->app_index);
transport_connection_t *tc;
transport_proto_vft_t *tp_vft;
@@ -132,7 +132,7 @@ static void
send_session_disconnect_callback (stream_session_t * s)
{
vl_api_disconnect_session_t *mp;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
application_t *app = application_get (s->app_index);
q = vl_api_client_index_to_input_queue (app->api_client_index);
@@ -151,7 +151,7 @@ static void
send_session_reset_callback (stream_session_t * s)
{
vl_api_reset_session_t *mp;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
application_t *app = application_get (s->app_index);
q = vl_api_client_index_to_input_queue (app->api_client_index);
@@ -171,9 +171,9 @@ send_session_connected_callback (u32 app_index, u32 api_context,
stream_session_t * s, u8 is_fail)
{
vl_api_connect_session_reply_t *mp;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
application_t *app;
- unix_shared_memory_queue_t *vpp_queue;
+ svm_queue_t *vpp_queue;
transport_connection_t *tc;
app = application_get (app_index);
@@ -221,7 +221,7 @@ static int
redirect_connect_callback (u32 server_api_client_index, void *mp_arg)
{
vl_api_connect_sock_t *mp = mp_arg;
- unix_shared_memory_queue_t *server_q, *client_q;
+ svm_queue_t *server_q, *client_q;
segment_manager_properties_t *props;
vlib_main_t *vm = vlib_get_main ();
f64 timeout = vlib_time_now (vm) + 0.5;
@@ -263,8 +263,7 @@ redirect_connect_callback (u32 server_api_client_index, void *mp_arg)
while (vlib_time_now (vm) < timeout)
{
- rv =
- unix_shared_memory_queue_add (server_q, (u8 *) & mp, 1 /*nowait */ );
+ rv = svm_queue_add (server_q, (u8 *) & mp, 1 /*nowait */ );
switch (rv)
{
/* correctly enqueued */
@@ -736,7 +735,7 @@ vl_api_connect_sock_t_handler (vl_api_connect_sock_t * mp)
app = application_lookup (mp->client_index);
if (app)
{
- unix_shared_memory_queue_t *client_q;
+ svm_queue_t *client_q;
ip46_address_t *ip46 = (ip46_address_t *) mp->ip;
client_q = vl_api_client_index_to_input_queue (mp->client_index);
@@ -871,7 +870,7 @@ vl_api_session_rule_add_del_t_handler (vl_api_session_rule_add_del_t * mp)
static void
send_session_rule_details4 (mma_rule_16_t * rule, u8 is_local,
u8 transport_proto, u32 appns_index, u8 * tag,
- unix_shared_memory_queue_t * q, u32 context)
+ svm_queue_t * q, u32 context)
{
vl_api_session_rules_details_t *rmp = 0;
session_mask_or_match_4_t *match =
@@ -908,7 +907,7 @@ send_session_rule_details4 (mma_rule_16_t * rule, u8 is_local,
static void
send_session_rule_details6 (mma_rule_40_t * rule, u8 is_local,
u8 transport_proto, u32 appns_index, u8 * tag,
- unix_shared_memory_queue_t * q, u32 context)
+ svm_queue_t * q, u32 context)
{
vl_api_session_rules_details_t *rmp = 0;
session_mask_or_match_6_t *match =
@@ -945,7 +944,7 @@ send_session_rule_details6 (mma_rule_40_t * rule, u8 is_local,
static void
send_session_rules_table_details (session_rules_table_t * srt, u8 fib_proto,
u8 tp, u8 is_local, u32 appns_index,
- unix_shared_memory_queue_t * q, u32 context)
+ svm_queue_t * q, u32 context)
{
mma_rule_16_t *rule16;
mma_rule_40_t *rule40;
@@ -984,7 +983,7 @@ send_session_rules_table_details (session_rules_table_t * srt, u8 fib_proto,
static void
vl_api_session_rules_dump_t_handler (vl_api_one_map_server_dump_t * mp)
{
- unix_shared_memory_queue_t *q = NULL;
+ svm_queue_t *q = NULL;
session_table_t *st;
u8 tp;
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index e9cfc7be8aa..a1608f4a412 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -20,7 +20,7 @@
#include <vnet/session/transport.h>
#include <vnet/session/application.h>
#include <vnet/session/session_debug.h>
-#include <vlibmemory/unix_shared_memory_queue.h>
+#include <svm/queue.h>
vlib_node_registration_t session_queue_node;
@@ -406,7 +406,7 @@ dump_thread_0_event_queue (void)
int i, index;
i8 *headp;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
q = smm->vpp_event_queues[my_thread_index];
index = q->head;
@@ -486,7 +486,7 @@ u8
session_node_lookup_fifo_event (svm_fifo_t * f, session_fifo_event_t * e)
{
session_manager_main_t *smm = vnet_get_session_manager_main ();
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
session_fifo_event_t *pending_event_vector, *evt;
int i, index, found = 0;
i8 *headp;
@@ -533,7 +533,7 @@ session_queue_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
session_fifo_event_t *my_pending_event_vector, *pending_disconnects, *e;
session_fifo_event_t *my_fifo_events;
u32 n_to_dequeue, n_events;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
application_t *app;
int n_tx_packets = 0;
u32 my_thread_index = vm->thread_index;
@@ -586,7 +586,7 @@ session_queue_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
for (i = 0; i < n_to_dequeue; i++)
{
vec_add2 (my_fifo_events, e, 1);
- unix_shared_memory_queue_sub_raw (q, (u8 *) e);
+ svm_queue_sub_raw (q, (u8 *) e);
}
/* The other side of the connection is not polling */
diff --git a/src/vnet/span/span_api.c b/src/vnet/span/span_api.c
index 64a71a2ed69..40dc4f35137 100644
--- a/src/vnet/span/span_api.c
+++ b/src/vnet/span/span_api.c
@@ -66,7 +66,7 @@ static void
vl_api_sw_interface_span_dump_t_handler (vl_api_sw_interface_span_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
span_interface_t *si;
vl_api_sw_interface_span_details_t *rmp;
span_main_t *sm = &span_main;
diff --git a/src/vnet/srv6/sr_api.c b/src/vnet/srv6/sr_api.c
index 789bb27386c..8f5f4f90e5d 100644
--- a/src/vnet/srv6/sr_api.c
+++ b/src/vnet/srv6/sr_api.c
@@ -191,7 +191,7 @@ static void vl_api_sr_steering_add_del_t_handler
}
static void send_sr_localsid_details
- (ip6_sr_localsid_t * t, unix_shared_memory_queue_t * q, u32 context)
+ (ip6_sr_localsid_t * t, svm_queue_t * q, u32 context)
{
vl_api_sr_localsids_details_t *rmp;
@@ -212,7 +212,7 @@ static void send_sr_localsid_details
static void vl_api_sr_localsids_dump_t_handler
(vl_api_sr_localsids_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
ip6_sr_main_t *sm = &sr_main;
ip6_sr_localsid_t *t;
diff --git a/src/vnet/tcp/builtin_client.c b/src/vnet/tcp/builtin_client.c
index 319b70f2008..b073459c52e 100644
--- a/src/vnet/tcp/builtin_client.c
+++ b/src/vnet/tcp/builtin_client.c
@@ -100,7 +100,7 @@ send_test_chunk (tclient_main_t * tm, session_t * s)
evt.fifo = txf;
evt.event_type = FIFO_EVENT_APP_TX;
- if (unix_shared_memory_queue_add
+ if (svm_queue_add
(tm->vpp_event_queue[txf->master_thread_index], (u8 *) & evt,
0 /* do wait for mutex */ ))
clib_warning ("could not enqueue event");
diff --git a/src/vnet/tcp/builtin_client.h b/src/vnet/tcp/builtin_client.h
index a214ae1e1b1..be8ea002639 100644
--- a/src/vnet/tcp/builtin_client.h
+++ b/src/vnet/tcp/builtin_client.h
@@ -24,7 +24,6 @@
#include <vppinfra/hash.h>
#include <vppinfra/error.h>
-#include <vlibmemory/unix_shared_memory_queue.h>
#include <svm/svm_fifo_segment.h>
#include <vnet/session/session.h>
#include <vnet/session/application_interface.h>
@@ -47,8 +46,8 @@ typedef struct
/*
* Application setup parameters
*/
- unix_shared_memory_queue_t *vl_input_queue; /**< vpe input queue */
- unix_shared_memory_queue_t **vpp_event_queue;
+ svm_queue_t *vl_input_queue; /**< vpe input queue */
+ svm_queue_t **vpp_event_queue;
u32 cli_node_index; /**< cli process node index */
u32 my_client_index; /**< loopback API client handle */
diff --git a/src/vnet/tcp/builtin_http_server.c b/src/vnet/tcp/builtin_http_server.c
index 6e1cd8e770e..356cfd86b91 100644
--- 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;
- unix_shared_memory_queue_t **vpp_queue;
+ svm_queue_t **vpp_queue;
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 */
- unix_shared_memory_queue_t *vl_input_queue;
+ svm_queue_t *vl_input_queue;
/* 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;
- 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;
}
@@ -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;
- unix_shared_memory_queue_add
+ svm_queue_add
(session_manager_get_vpp_event_queue (0 /* main thread */ ),
(u8 *) & evt, 0 /* do wait for mutex */ );
}
diff --git a/src/vnet/tcp/builtin_proxy.c b/src/vnet/tcp/builtin_proxy.c
index 7f70df39069..974830ea756 100644
--- a/src/vnet/tcp/builtin_proxy.c
+++ b/src/vnet/tcp/builtin_proxy.c
@@ -185,7 +185,7 @@ server_rx_callback (stream_session_t * s)
{
evt.fifo = active_open_tx_fifo;
evt.event_type = FIFO_EVENT_APP_TX;
- if (unix_shared_memory_queue_add
+ if (svm_queue_add
(bpm->active_open_event_queue[thread_index], (u8 *) & evt,
0 /* do wait for mutex */ ))
clib_warning ("failed to enqueue tx evt");
@@ -299,7 +299,7 @@ active_open_connected_callback (u32 app_index, u32 opaque,
{
evt.fifo = s->server_tx_fifo;
evt.event_type = FIFO_EVENT_APP_TX;
- if (unix_shared_memory_queue_add
+ if (svm_queue_add
(bpm->active_open_event_queue[thread_index], (u8 *) & evt,
0 /* do wait for mutex */ ))
clib_warning ("failed to enqueue tx evt");
@@ -343,7 +343,7 @@ active_open_rx_callback (stream_session_t * s)
{
evt.fifo = server_rx_fifo;
evt.event_type = FIFO_EVENT_APP_TX;
- if (unix_shared_memory_queue_add
+ if (svm_queue_add
(bpm->server_event_queue[thread_index], (u8 *) & evt,
0 /* do wait for mutex */ ))
clib_warning ("failed to enqueue server rx evt");
diff --git a/src/vnet/tcp/builtin_proxy.h b/src/vnet/tcp/builtin_proxy.h
index c8cde5f70e6..780f8b65b90 100644
--- a/src/vnet/tcp/builtin_proxy.h
+++ b/src/vnet/tcp/builtin_proxy.h
@@ -24,7 +24,6 @@
#include <vppinfra/hash.h>
#include <vppinfra/error.h>
-#include <vlibmemory/unix_shared_memory_queue.h>
#include <svm/svm_fifo_segment.h>
#include <vnet/session/session.h>
#include <vnet/session/application_interface.h>
@@ -40,10 +39,10 @@ typedef struct
typedef struct
{
- unix_shared_memory_queue_t *vl_input_queue; /**< vpe input queue */
+ svm_queue_t *vl_input_queue; /**< vpe input queue */
/** per-thread vectors */
- unix_shared_memory_queue_t **server_event_queue;
- unix_shared_memory_queue_t **active_open_event_queue;
+ svm_queue_t **server_event_queue;
+ svm_queue_t **active_open_event_queue;
u8 **rx_buf; /**< intermediate rx buffers */
u32 cli_node_index; /**< cli process node index */
diff --git a/src/vnet/tcp/builtin_server.c b/src/vnet/tcp/builtin_server.c
index 26cbfe77727..eafef8227e2 100644
--- a/src/vnet/tcp/builtin_server.c
+++ b/src/vnet/tcp/builtin_server.c
@@ -23,8 +23,8 @@ typedef struct
/*
* Server app parameters
*/
- unix_shared_memory_queue_t **vpp_queue;
- unix_shared_memory_queue_t *vl_input_queue; /**< Sever's event queue */
+ svm_queue_t **vpp_queue;
+ svm_queue_t *vl_input_queue; /**< Sever's event queue */
u32 app_index; /**< Server app index */
u32 my_client_index; /**< API client handle */
@@ -186,14 +186,14 @@ builtin_server_rx_callback (stream_session_t * s)
/* Program self-tap to retry */
if (svm_fifo_set_event (rx_fifo))
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
evt.fifo = rx_fifo;
evt.event_type = FIFO_EVENT_BUILTIN_RX;
q = bsm->vpp_queue[thread_index];
if (PREDICT_FALSE (q->cursize == q->maxsize))
clib_warning ("out of event queue space");
- else if (unix_shared_memory_queue_add (q, (u8 *) & evt, 0))
+ else if (svm_queue_add (q, (u8 *) & evt, 0))
clib_warning ("failed to enqueue self-tap");
if (bsm->rx_retries[thread_index][s->session_index] == 500000)
@@ -231,9 +231,8 @@ builtin_server_rx_callback (stream_session_t * s)
evt.fifo = tx_fifo;
evt.event_type = FIFO_EVENT_APP_TX;
- if (unix_shared_memory_queue_add (bsm->vpp_queue[s->thread_index],
- (u8 *) & evt,
- 0 /* do wait for mutex */ ))
+ if (svm_queue_add (bsm->vpp_queue[s->thread_index],
+ (u8 *) & evt, 0 /* do wait for mutex */ ))
clib_warning ("failed to enqueue tx evt");
}
diff --git a/src/vnet/udp/builtin_server.c b/src/vnet/udp/builtin_server.c
index 05a47031dc2..73914cbc143 100644
--- 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;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
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);
- 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;
diff --git a/src/vnet/udp/udp_api.c b/src/vnet/udp/udp_api.c
index e65235a5396..dddc6f9470d 100644
--- a/src/vnet/udp/udp_api.c
+++ b/src/vnet/udp/udp_api.c
@@ -43,8 +43,7 @@
_(UDP_ENCAP_DUMP, udp_encap_dump)
static void
-send_udp_encap_details (const udp_encap_t * ue,
- unix_shared_memory_queue_t * q, u32 context)
+send_udp_encap_details (const udp_encap_t * ue, svm_queue_t * q, u32 context)
{
vl_api_udp_encap_details_t *mp;
fib_table_t *fib_table;
@@ -82,7 +81,7 @@ static void
vl_api_udp_encap_dump_t_handler (vl_api_udp_encap_dump_t * mp,
vlib_main_t * vm)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
udp_encap_t *ue;
q = vl_api_client_index_to_input_queue (mp->client_index);
@@ -94,12 +93,12 @@ vl_api_udp_encap_dump_t_handler (vl_api_udp_encap_dump_t * mp,
({
send_udp_encap_details(ue, q, mp->context);
}));
- /* *INDENT-OFF* */
+ /* *INDENT-ON* */
}
static void
vl_api_udp_encap_add_del_t_handler (vl_api_udp_encap_add_del_t * mp,
- vlib_main_t * vm)
+ vlib_main_t * vm)
{
vl_api_udp_encap_add_del_reply_t *rmp;
ip46_address_t src_ip, dst_ip;
@@ -107,11 +106,11 @@ vl_api_udp_encap_add_del_t_handler (vl_api_udp_encap_add_del_t * mp,
fib_protocol_t fproto;
int rv = 0;
- ue_id = ntohl(mp->id);
- table_id = ntohl(mp->table_id);
+ ue_id = ntohl (mp->id);
+ table_id = ntohl (mp->table_id);
fproto = (mp->is_ip6 ? FIB_PROTOCOL_IP6 : FIB_PROTOCOL_IP4);
- fib_index = fib_table_find(fproto, table_id);
+ fib_index = fib_table_find (fproto, table_id);
if (~0 == fib_index)
{
@@ -121,29 +120,28 @@ vl_api_udp_encap_add_del_t_handler (vl_api_udp_encap_add_del_t * mp,
if (FIB_PROTOCOL_IP4 == fproto)
{
- clib_memcpy(&src_ip.ip4, mp->src_ip, 4);
- clib_memcpy(&dst_ip.ip4, mp->dst_ip, 4);
+ clib_memcpy (&src_ip.ip4, mp->src_ip, 4);
+ clib_memcpy (&dst_ip.ip4, mp->dst_ip, 4);
}
else
{
- clib_memcpy(&src_ip.ip6, mp->src_ip, 16);
- clib_memcpy(&dst_ip.ip6, mp->dst_ip, 16);
+ clib_memcpy (&src_ip.ip6, mp->src_ip, 16);
+ clib_memcpy (&dst_ip.ip6, mp->dst_ip, 16);
}
if (mp->is_add)
{
- udp_encap_add_and_lock(ue_id, fproto, fib_index,
- &src_ip, &dst_ip,
- ntohs(mp->src_port),
- ntohs(mp->dst_port),
- UDP_ENCAP_FIXUP_NONE);
+ udp_encap_add_and_lock (ue_id, fproto, fib_index,
+ &src_ip, &dst_ip,
+ ntohs (mp->src_port),
+ ntohs (mp->dst_port), UDP_ENCAP_FIXUP_NONE);
}
else
{
- udp_encap_unlock(ue_id);
+ udp_encap_unlock (ue_id);
}
- done:
+done:
REPLY_MACRO (VL_API_UDP_ENCAP_ADD_DEL_REPLY);
}
diff --git a/src/vnet/unix/tap_api.c b/src/vnet/unix/tap_api.c
index 3a64e1009cf..23755722678 100644
--- a/src/vnet/unix/tap_api.c
+++ b/src/vnet/unix/tap_api.c
@@ -60,8 +60,7 @@ _(SW_INTERFACE_TAP_DUMP, sw_interface_tap_dump)
*/
static void
send_sw_interface_event_deleted (vpe_api_main_t * am,
- unix_shared_memory_queue_t * q,
- u32 sw_if_index)
+ svm_queue_t * q, u32 sw_if_index)
{
vl_api_sw_interface_event_t *mp;
@@ -83,7 +82,7 @@ vl_api_tap_connect_t_handler (vl_api_tap_connect_t * mp)
int rv;
vl_api_tap_connect_reply_t *rmp;
vnet_main_t *vnm = vnet_get_main ();
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
u32 sw_if_index = (u32) ~ 0;
u8 *tag;
vnet_tap_connect_args_t _a, *ap = &_a;
@@ -137,7 +136,7 @@ vl_api_tap_modify_t_handler (vl_api_tap_modify_t * mp)
{
int rv;
vl_api_tap_modify_reply_t *rmp;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
u32 sw_if_index = (u32) ~ 0;
vlib_main_t *vm = vlib_get_main ();
vnet_tap_connect_args_t _a, *ap = &_a;
@@ -174,7 +173,7 @@ vl_api_tap_delete_t_handler (vl_api_tap_delete_t * mp)
int rv;
vpe_api_main_t *vam = &vpe_api_main;
vl_api_tap_delete_reply_t *rmp;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
u32 sw_if_index = ntohl (mp->sw_if_index);
rv = vnet_tap_delete (vm, sw_if_index);
@@ -201,7 +200,7 @@ vl_api_tap_delete_t_handler (vl_api_tap_delete_t * mp)
static void
send_sw_interface_tap_details (vpe_api_main_t * am,
- unix_shared_memory_queue_t * q,
+ svm_queue_t * q,
tapcli_interface_details_t * tap_if,
u32 context)
{
@@ -222,7 +221,7 @@ vl_api_sw_interface_tap_dump_t_handler (vl_api_sw_interface_tap_dump_t * mp)
{
int rv = 0;
vpe_api_main_t *am = &vpe_api_main;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
tapcli_interface_details_t *tapifs = NULL;
tapcli_interface_details_t *tap_if = NULL;
diff --git a/src/vnet/vxlan-gpe/vxlan_gpe_api.c b/src/vnet/vxlan-gpe/vxlan_gpe_api.c
index 8e2684187a7..b3e300ecc55 100644
--- a/src/vnet/vxlan-gpe/vxlan_gpe_api.c
+++ b/src/vnet/vxlan-gpe/vxlan_gpe_api.c
@@ -144,7 +144,7 @@ out:
}
static void send_vxlan_gpe_tunnel_details
- (vxlan_gpe_tunnel_t * t, unix_shared_memory_queue_t * q, u32 context)
+ (vxlan_gpe_tunnel_t * t, svm_queue_t * q, u32 context)
{
vl_api_vxlan_gpe_tunnel_details_t *rmp;
ip4_main_t *im4 = &ip4_main;
@@ -181,7 +181,7 @@ static void send_vxlan_gpe_tunnel_details
static void vl_api_vxlan_gpe_tunnel_dump_t_handler
(vl_api_vxlan_gpe_tunnel_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
vxlan_gpe_main_t *vgm = &vxlan_gpe_main;
vxlan_gpe_tunnel_t *t;
u32 sw_if_index;
diff --git a/src/vnet/vxlan/vxlan_api.c b/src/vnet/vxlan/vxlan_api.c
index a2d412322fb..20034f74f0e 100644
--- a/src/vnet/vxlan/vxlan_api.c
+++ b/src/vnet/vxlan/vxlan_api.c
@@ -116,7 +116,7 @@ out:
}
static void send_vxlan_tunnel_details
- (vxlan_tunnel_t * t, unix_shared_memory_queue_t * q, u32 context)
+ (vxlan_tunnel_t * t, svm_queue_t * q, u32 context)
{
vl_api_vxlan_tunnel_details_t *rmp;
ip4_main_t *im4 = &ip4_main;
@@ -151,7 +151,7 @@ static void send_vxlan_tunnel_details
static void vl_api_vxlan_tunnel_dump_t_handler
(vl_api_vxlan_tunnel_dump_t * mp)
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
vxlan_main_t *vxm = &vxlan_main;
vxlan_tunnel_t *t;
u32 sw_if_index;