u32 n_packets = 0;
u32 n_bytes = 0;
u32 n_trace = vlib_get_trace_count (vm, node);
- vlib_buffer_t *b_last, b_dummy;
+ vlib_buffer_t *b_last, b_placeholder;
ASSERT (start_descriptor_index + n_descriptors <= dq->n_descriptors);
d = &dq->descriptors[start_descriptor_index];
- b_last = bi_last != ~0 ? vlib_get_buffer (vm, bi_last) : &b_dummy;
+ b_last = bi_last != ~0 ? vlib_get_buffer (vm, bi_last) : &b_placeholder;
next_index = dq->rx.next_index;
if (n_trace > 0)
crypto_native_per_thread_data_t *ptd =
vec_elt_at_index (cm->per_thread_data, vm->thread_index);
int rounds = AES_KEY_ROUNDS (ks);
- u8 dummy[8192];
+ u8 placeholder[8192];
u32 i, j, count, n_left = n_ops;
- u32xN dummy_mask = { };
+ u32xN placeholder_mask = { };
u32xN len = { };
vnet_crypto_key_index_t key_index[N];
u8 *src[N] = { };
{
if (n_left == 0)
{
- /* no more work to enqueue, so we are enqueueing dummy buffer */
- src[i] = dst[i] = dummy;
- len[i] = sizeof (dummy);
- dummy_mask[i] = 0;
+ /* no more work to enqueue, so we are enqueueing placeholder buffer */
+ src[i] = dst[i] = placeholder;
+ len[i] = sizeof (placeholder);
+ placeholder_mask[i] = 0;
}
else
{
src[i] = ops[0]->src;
dst[i] = ops[0]->dst;
len[i] = ops[0]->len;
- dummy_mask[i] = ~0;
+ placeholder_mask[i] = ~0;
if (key_index[i] != ops[0]->key_index)
{
aes_cbc_key_data_t *kd;
if (n_left > 0)
goto more;
- if (!u32xN_is_all_zero (len & dummy_mask))
+ if (!u32xN_is_all_zero (len & placeholder_mask))
goto more;
return n_ops;
u32 prealloc_fifo_pairs;
u64 rx_buf_size;
u64 tx_buf_size;
- data_source_t data_source; /* Use no/dummy/mirrored data */
+ data_source_t data_source; /* Use no/placeholder/mirrored data */
u8 send_stream_disconnects; /* actively send disconnect */
u8 output_json; /* Output stats as JSON */
volatile u8 wait_for_gdb; /* Wait for gdb to attach */
/* construct vip list */
pool_foreach(vip, lbm->vips, {
- /* Hide dummy VIP */
+ /* Hide placeholder VIP */
if (vip != lbm->vips) {
msg_size = sizeof (*rmp);
rmp = vl_msg_api_alloc (msg_size);
lb_as_t *as;
pool_foreach(as_index, vip->as_indexes, {
- /* Hide dummy As for specific VIP */
+ /* Hide placeholder As for specific VIP */
if (*as_index != 0) {
as = &lbm->ass[*as_index];
msg_size = sizeof (*rmp);
if (unformat(&line_input, "verbose"))
verbose = 1;
- /* Hide dummy VIP */
+ /* Hide placeholder VIP */
pool_foreach(vip, lbm->vips, {
if (vip != lbm->vips) {
vlib_cli_output(vm, "%U\n", verbose?format_lb_vip_detailed:format_lb_vip, vip);
* be 100% reliable (write can fail). It also needs to recycle
* old entries in a lazy way.
*
- * This hash table is the most dummy hash table you can do.
+ * This hash table is the most trivial hash table you can do.
* Fixed total size, fixed bucket size.
* Advantage is that it could be very efficient (maybe).
*
if (per_port_vip)
{
- /* For per-port-vip case, ip lookup stores dummy index */
+ /* For per-port-vip case, ip lookup stores placeholder index */
key.vip_prefix_index = *vip_idx;
}
.error_strings = lb_error_strings,
.n_next_nodes = LB_N_NEXT,
.next_nodes =
- { [LB_NEXT_DROP] = "error-drop" },
+ { [LB_NEXT_DROP] = "error-drop" },
};
VLIB_REGISTER_NODE (lb4_gre4_node) =
[LB_NAT6_IN2OUT_NEXT_LOOKUP] = "ip6-lookup",
},
};
-
&value0))
{
/* or is static mappings */
- ip4_address_t dummy_addr;
- u16 dummy_port;
- u32 dummy_fib_index;
+ ip4_address_t placeholder_addr;
+ u16 placeholder_port;
+ u32 placeholder_fib_index;
if (!snat_static_mapping_match
(sm, ip0->dst_address, udp0->dst_port, sm->outside_fib_index,
- proto0, &dummy_addr, &dummy_port, &dummy_fib_index, 1, 0, 0, 0, 0,
- 0))
+ proto0, &placeholder_addr, &placeholder_port,
+ &placeholder_fib_index, 1, 0, 0, 0, 0, 0))
return 0;
}
else
if (clib_bihash_search_16_8 (&sm->out2in_ed, &kv, &value))
{
/* or is static mappings */
- ip4_address_t dummy_addr;
- u16 dummy_port;
- u32 dummy_fib_index;
+ ip4_address_t placeholder_addr;
+ u16 placeholder_port;
+ u32 placeholder_fib_index;
if (!snat_static_mapping_match
(sm, ip->dst_address, udp->dst_port, sm->outside_fib_index, proto,
- &dummy_addr, &dummy_port, &dummy_fib_index, 1, 0, 0, 0, 0, 0))
+ &placeholder_addr, &placeholder_port, &placeholder_fib_index, 1, 0,
+ 0, 0, 0, 0))
return 0;
}
else
u8 * trace (u8 * s,
nsh_tlv_header_t * opt));
-typedef struct _nsh_main_dummy
+typedef struct _nsh_main_placeholder
{
u8 output_feature_arc_index;
-} nsh_main_dummy_t;
+} nsh_main_placeholder_t;
int
nsh_add_del_map (nsh_add_del_map_args_t * a, u32 * map_indexp);
uword *p0, *p1;
nsh_proxy_session_t *proxy0, *proxy1;
u32 sw_if_index0 = 0, sw_if_index1 = 0;
- ethernet_header_t dummy_eth0, dummy_eth1;
+ ethernet_header_t placeholder_eth0, placeholder_eth1;
/* Prefetch next iteration. */
{
}
else if (node_type == NSH_AWARE_VNF_PROXY_TYPE)
{
- /* Push dummy Eth header */
- char dummy_dst_address[6] =
+ /* Push placeholder Eth header */
+ char placeholder_dst_address[6] =
{ 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
- char dummy_src_address[6] =
+ char placeholder_src_address[6] =
{ 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc };
- clib_memcpy_fast (dummy_eth0.dst_address, dummy_dst_address, 6);
- clib_memcpy_fast (dummy_eth0.src_address, dummy_src_address, 6);
- dummy_eth0.type = 0x0800;
+ clib_memcpy_fast (placeholder_eth0.dst_address,
+ placeholder_dst_address, 6);
+ clib_memcpy_fast (placeholder_eth0.src_address,
+ placeholder_src_address, 6);
+ placeholder_eth0.type = 0x0800;
vlib_buffer_advance (b0, -(word) sizeof (ethernet_header_t));
hdr0 = vlib_buffer_get_current (b0);
- clib_memcpy_fast (hdr0, &dummy_eth0,
+ clib_memcpy_fast (hdr0, &placeholder_eth0,
(word) sizeof (ethernet_header_t));
sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_TX];
}
else if (node_type == NSH_AWARE_VNF_PROXY_TYPE)
{
- /* Push dummy Eth header */
- char dummy_dst_address[6] =
+ /* Push placeholder Eth header */
+ char placeholder_dst_address[6] =
{ 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
- char dummy_src_address[6] =
+ char placeholder_src_address[6] =
{ 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc };
- clib_memcpy_fast (dummy_eth1.dst_address, dummy_dst_address, 6);
- clib_memcpy_fast (dummy_eth1.src_address, dummy_src_address, 6);
- dummy_eth1.type = 0x0800;
+ clib_memcpy_fast (placeholder_eth1.dst_address,
+ placeholder_dst_address, 6);
+ clib_memcpy_fast (placeholder_eth1.src_address,
+ placeholder_src_address, 6);
+ placeholder_eth1.type = 0x0800;
vlib_buffer_advance (b1, -(word) sizeof (ethernet_header_t));
hdr1 = vlib_buffer_get_current (b1);
- clib_memcpy_fast (hdr1, &dummy_eth1,
+ clib_memcpy_fast (hdr1, &placeholder_eth1,
(word) sizeof (ethernet_header_t));
sw_if_index1 = vnet_buffer (b1)->sw_if_index[VLIB_TX];
uword *p0;
nsh_proxy_session_t *proxy0 = 0;
u32 sw_if_index0 = 0;
- ethernet_header_t dummy_eth0;
+ ethernet_header_t placeholder_eth0;
bi0 = from[0];
to_next[0] = bi0;
}
else if (node_type == NSH_AWARE_VNF_PROXY_TYPE)
{
- /* Push dummy Eth header */
- char dummy_dst_address[6] =
+ /* Push placeholder Eth header */
+ char placeholder_dst_address[6] =
{ 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
- char dummy_src_address[6] =
+ char placeholder_src_address[6] =
{ 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc };
- clib_memcpy_fast (dummy_eth0.dst_address, dummy_dst_address, 6);
- clib_memcpy_fast (dummy_eth0.src_address, dummy_src_address, 6);
- dummy_eth0.type = 0x0800;
+ clib_memcpy_fast (placeholder_eth0.dst_address,
+ placeholder_dst_address, 6);
+ clib_memcpy_fast (placeholder_eth0.src_address,
+ placeholder_src_address, 6);
+ placeholder_eth0.type = 0x0800;
vlib_buffer_advance (b0, -(word) sizeof (ethernet_header_t));
hdr0 = vlib_buffer_get_current (b0);
- clib_memcpy_fast (hdr0, &dummy_eth0,
+ clib_memcpy_fast (hdr0, &placeholder_eth0,
(word) sizeof (ethernet_header_t));
sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_TX];
return format (s, "test-eth%d", dev_instance);
}
-static uword dummy_interface_tx (vlib_main_t * vm,
+static uword placeholder_interface_tx (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
VNET_DEVICE_CLASS (test_interface_device_class,static) = {
.name = "Test interface",
.format_device_name = format_test_interface_name,
- .tx_function = dummy_interface_tx,
+ .tx_function = placeholder_interface_tx,
};
static u8 *hw_address;
return format (s, "test-eth%d", dev_instance);
}
-static uword dummy_interface_tx (vlib_main_t * vm,
+static uword placeholder_interface_tx (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
VNET_DEVICE_CLASS (test_interface_device_class,static) = {
.name = "Test interface",
.format_device_name = format_test_interface_name,
- .tx_function = dummy_interface_tx,
+ .tx_function = placeholder_interface_tx,
.admin_up_down_function = test_interface_admin_up_down,
};
"bucket %d stacks on %U",
bucket,
format_dpo_type, dpo->dpoi_type);
-
+
mld = mpls_label_dpo_get(dpo->dpoi_index);
hdr = clib_net_to_host_u32(mld->mld_hdr[0].label_exp_s_ttl);
l1600,
FIB_ROUTE_PATH_FLAG_NONE);
- FIB_TEST(!fib_test_validate_entry(fei,
+ FIB_TEST(!fib_test_validate_entry(fei,
FIB_FORW_CHAIN_TYPE_UNICAST_IP4,
1,
&l1600_eos_o_1_1_1_1),
return format (s, "test-eth%d", dev_instance);
}
-static uword dummy_interface_tx (vlib_main_t * vm,
+static uword placeholder_interface_tx (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
VNET_DEVICE_CLASS (test_interface_device_class,static) = {
.name = "Test interface",
.format_device_name = format_test_interface_name,
- .tx_function = dummy_interface_tx,
+ .tx_function = placeholder_interface_tx,
.admin_up_down_function = test_interface_admin_up_down,
};
MFIB_TEST_NS(!mfib_test_entry_no_itf(mfei, tm->hw[3]->sw_if_index));
/*
- * remove
+ * remove
*/
/* mfib_table_entry_path_remove(fib_index, */
/* pfx_s_g, */
/* MFIB_TEST_NS(!mfib_test_entry_no_itf(mfei, tm->hw[3]->sw_if_index)); */
/*
- * remove the last path and the accpeting only interface,
+ * remove the last path and the accpeting only interface,
* the entry still has flags so it remains
*/
vec_reset_length(two_paths);
#define SEGMENT_MANAGER_GET_INDEX_FROM_HANDLE(x) (x >> 32)
-/* dummy callback functions */
+/* placeholder callback functions */
static void
-dummy_session_reset_callback (session_t * s)
+placeholder_session_reset_callback (session_t * s)
{
clib_warning ("called...");
}
static int
-dummy_session_connected_callback (u32 app_index, u32 api_context,
- session_t * s, session_error_t err)
+placeholder_session_connected_callback (u32 app_index, u32 api_context,
+ session_t * s, session_error_t err)
{
clib_warning ("called...");
return 0;
}
static int
-dummy_add_segment_callback (u32 client_index, u64 segment_handle)
+placeholder_add_segment_callback (u32 client_index, u64 segment_handle)
{
clib_warning ("called...");
return 0;
}
static int
-dummy_del_segment_callback (u32 client_index, u64 segment_handle)
+placeholder_del_segment_callback (u32 client_index, u64 segment_handle)
{
clib_warning ("called...");
return 0;
}
static void
-dummy_session_disconnect_callback (session_t * s)
+placeholder_session_disconnect_callback (session_t * s)
{
clib_warning ("called...");
}
static int
-dummy_session_accept_callback (session_t * s)
+placeholder_session_accept_callback (session_t * s)
{
clib_warning ("called...");
return 0;
}
static int
-dummy_server_rx_callback (session_t * s)
+placeholder_server_rx_callback (session_t * s)
{
clib_warning ("called...");
return -1;
}
/* *INDENT-OFF* */
-static session_cb_vft_t dummy_session_cbs = {
- .session_reset_callback = dummy_session_reset_callback,
- .session_connected_callback = dummy_session_connected_callback,
- .session_accept_callback = dummy_session_accept_callback,
- .session_disconnect_callback = dummy_session_disconnect_callback,
- .builtin_app_rx_callback = dummy_server_rx_callback,
- .add_segment_callback = dummy_add_segment_callback,
- .del_segment_callback = dummy_del_segment_callback,
+static session_cb_vft_t placeholder_session_cbs = {
+ .session_reset_callback = placeholder_session_reset_callback,
+ .session_connected_callback = placeholder_session_connected_callback,
+ .session_accept_callback = placeholder_session_accept_callback,
+ .session_disconnect_callback = placeholder_session_disconnect_callback,
+ .builtin_app_rx_callback = placeholder_server_rx_callback,
+ .add_segment_callback = placeholder_add_segment_callback,
+ .del_segment_callback = placeholder_del_segment_callback,
};
/* *INDENT-ON* */
.api_client_index = ~0,
.options = options,
.namespace_id = 0,
- .session_cb_vft = &dummy_session_cbs,
+ .session_cb_vft = &placeholder_session_cbs,
.name = format (0, "segment_manager_test_pressure_1"),
};
.api_client_index = ~0,
.options = options,
.namespace_id = 0,
- .session_cb_vft = &dummy_session_cbs,
+ .session_cb_vft = &placeholder_session_cbs,
.name = format (0, "segment_manager_test_pressure_1"),
};
.api_client_index = ~0,
.options = options,
.namespace_id = 0,
- .session_cb_vft = &dummy_session_cbs,
+ .session_cb_vft = &placeholder_session_cbs,
.name = format (0, "segment_manager_test_pressure_1"),
};
.api_client_index = ~0,
.options = options,
.namespace_id = 0,
- .session_cb_vft = &dummy_session_cbs,
+ .session_cb_vft = &placeholder_session_cbs,
.name = format (0, "segment_manager_test_pressure_1"),
};
.api_client_index = ~0,
.options = options,
.namespace_id = 0,
- .session_cb_vft = &dummy_session_cbs,
+ .session_cb_vft = &placeholder_session_cbs,
.name = format (0, "segment_manager_prealloc_hdrs"),
};
* eval: (c-set-style "gnu")
* End:
*/
-
fformat(stderr, _comment "\n", ##_args); \
void
-dummy_session_reset_callback (session_t * s)
+placeholder_session_reset_callback (session_t * s)
{
clib_warning ("called...");
}
volatile u32 connected_session_index = ~0;
volatile u32 connected_session_thread = ~0;
int
-dummy_session_connected_callback (u32 app_index, u32 api_context,
- session_t * s, session_error_t err)
+placeholder_session_connected_callback (u32 app_index, u32 api_context,
+ session_t * s, session_error_t err)
{
if (s)
{
return 0;
}
-static u32 dummy_segment_count;
+static u32 placeholder_segment_count;
int
-dummy_add_segment_callback (u32 client_index, u64 segment_handle)
+placeholder_add_segment_callback (u32 client_index, u64 segment_handle)
{
- dummy_segment_count = 1;
+ placeholder_segment_count = 1;
return 0;
}
int
-dummy_del_segment_callback (u32 client_index, u64 segment_handle)
+placeholder_del_segment_callback (u32 client_index, u64 segment_handle)
{
- dummy_segment_count = 0;
+ placeholder_segment_count = 0;
return 0;
}
void
-dummy_session_disconnect_callback (session_t * s)
+placeholder_session_disconnect_callback (session_t * s)
{
clib_warning ("called...");
}
-static u32 dummy_accept;
+static u32 placeholder_accept;
volatile u32 accepted_session_index;
volatile u32 accepted_session_thread;
int
-dummy_session_accept_callback (session_t * s)
+placeholder_session_accept_callback (session_t * s)
{
- dummy_accept = 1;
+ placeholder_accept = 1;
accepted_session_index = s->session_index;
accepted_session_thread = s->thread_index;
s->session_state = SESSION_STATE_READY;
}
int
-dummy_server_rx_callback (session_t * s)
+placeholder_server_rx_callback (session_t * s)
{
clib_warning ("called...");
return -1;
}
/* *INDENT-OFF* */
-static session_cb_vft_t dummy_session_cbs = {
- .session_reset_callback = dummy_session_reset_callback,
- .session_connected_callback = dummy_session_connected_callback,
- .session_accept_callback = dummy_session_accept_callback,
- .session_disconnect_callback = dummy_session_disconnect_callback,
- .builtin_app_rx_callback = dummy_server_rx_callback,
- .add_segment_callback = dummy_add_segment_callback,
- .del_segment_callback = dummy_del_segment_callback,
+static session_cb_vft_t placeholder_session_cbs = {
+ .session_reset_callback = placeholder_session_reset_callback,
+ .session_connected_callback = placeholder_session_connected_callback,
+ .session_accept_callback = placeholder_session_accept_callback,
+ .session_disconnect_callback = placeholder_session_disconnect_callback,
+ .builtin_app_rx_callback = placeholder_server_rx_callback,
+ .add_segment_callback = placeholder_add_segment_callback,
+ .del_segment_callback = placeholder_del_segment_callback,
};
/* *INDENT-ON* */
.api_client_index = ~0,
.options = options,
.namespace_id = 0,
- .session_cb_vft = &dummy_session_cbs,
+ .session_cb_vft = &placeholder_session_cbs,
.name = format (0, "session_test"),
};
{
session_endpoint_cfg_t client_sep = SESSION_ENDPOINT_CFG_NULL;
u32 server_index, client_index, sw_if_index[2], tries = 0;
- u64 options[APP_OPTIONS_N_OPTIONS], dummy_secret = 1234;
- u16 dummy_server_port = 1234, dummy_client_port = 5678;
+ u64 options[APP_OPTIONS_N_OPTIONS], placeholder_secret = 1234;
+ u16 placeholder_server_port = 1234, placeholder_client_port = 5678;
session_endpoint_cfg_t server_sep = SESSION_ENDPOINT_CFG_NULL;
ip4_address_t intf_addr[3];
transport_connection_t *tc;
appns_id = format (0, "appns1");
vnet_app_namespace_add_del_args_t ns_args = {
.ns_id = appns_id,
- .secret = dummy_secret,
+ .secret = placeholder_secret,
.sw_if_index = sw_if_index[1],
.ip4_fib_id = 0,
.is_add = 1
.api_client_index = ~0,
.options = options,
.namespace_id = 0,
- .session_cb_vft = &dummy_session_cbs,
+ .session_cb_vft = &placeholder_session_cbs,
.name = format (0, "session_test_client"),
};
attach_args.name = format (0, "session_test_server");
attach_args.namespace_id = appns_id;
- attach_args.options[APP_OPTIONS_NAMESPACE_SECRET] = dummy_secret;
+ attach_args.options[APP_OPTIONS_NAMESPACE_SECRET] = placeholder_secret;
error = vnet_application_attach (&attach_args);
SESSION_TEST ((error == 0), "server app attached: %U", format_clib_error,
error);
server_index = attach_args.app_index;
server_sep.is_ip4 = 1;
- server_sep.port = dummy_server_port;
+ server_sep.port = placeholder_server_port;
vnet_listen_args_t bind_args = {
.sep_ext = server_sep,
.app_index = server_index,
*/
client_sep.is_ip4 = 1;
client_sep.ip.ip4.as_u32 = clib_host_to_net_u32 (0x02020202);
- client_sep.port = dummy_server_port;
+ client_sep.port = placeholder_server_port;
client_sep.peer.is_ip4 = 1;
client_sep.peer.ip.ip4.as_u32 = clib_host_to_net_u32 (0x01010101);
- client_sep.peer.port = dummy_client_port;
+ client_sep.peer.port = placeholder_client_port;
client_sep.transport_proto = TRANSPORT_PROTO_TCP;
vnet_connect_args_t connect_args = {
SESSION_TEST ((tc != 0), "transport should exist");
SESSION_TEST ((memcmp (&tc->lcl_ip, &client_sep.peer.ip,
sizeof (tc->lcl_ip)) == 0), "ips should be equal");
- SESSION_TEST ((tc->lcl_port == dummy_client_port), "ports should be equal");
+ SESSION_TEST ((tc->lcl_port == placeholder_client_port),
+ "ports should be equal");
/* These sessions, because of the way they're established are pinned to
* main thread, even when we have workers and we avoid polling main thread,
static int
session_test_namespace (vlib_main_t * vm, unformat_input_t * input)
{
- u64 options[APP_OPTIONS_N_OPTIONS], dummy_secret = 1234;
+ u64 options[APP_OPTIONS_N_OPTIONS], placeholder_secret = 1234;
u32 server_index, server_st_index, server_local_st_index;
- u32 dummy_port = 1234, client_index, server_wrk_index;
- u32 dummy_api_context = 4321, dummy_client_api_index = ~0;
- u32 dummy_server_api_index = ~0, sw_if_index = 0;
+ u32 placeholder_port = 1234, client_index, server_wrk_index;
+ u32 placeholder_api_context = 4321, placeholder_client_api_index = ~0;
+ u32 placeholder_server_api_index = ~0, sw_if_index = 0;
session_endpoint_t server_sep = SESSION_ENDPOINT_NULL;
session_endpoint_t client_sep = SESSION_ENDPOINT_NULL;
session_endpoint_t intf_sep = SESSION_ENDPOINT_NULL;
client_name = format (0, "session_test_client");
server_sep.is_ip4 = 1;
- server_sep.port = dummy_port;
+ server_sep.port = placeholder_port;
client_sep.is_ip4 = 1;
- client_sep.port = dummy_port;
+ client_sep.port = placeholder_port;
clib_memset (options, 0, sizeof (options));
options[APP_OPTIONS_FLAGS] = APP_OPTIONS_FLAGS_IS_BUILTIN;
.api_client_index = ~0,
.options = options,
.namespace_id = 0,
- .session_cb_vft = &dummy_session_cbs,
+ .session_cb_vft = &placeholder_session_cbs,
.name = server_name,
};
intf_sep.ip.ip4 = intf_addr;
intf_sep.is_ip4 = 1;
- intf_sep.port = dummy_port;
+ intf_sep.port = placeholder_port;
/*
* Insert namespace and lookup
vnet_app_namespace_add_del_args_t ns_args = {
.ns_id = ns_id,
- .secret = dummy_secret,
+ .secret = placeholder_secret,
.sw_if_index = APP_NAMESPACE_INVALID_INDEX,
.is_add = 1
};
app_ns = app_namespace_get_from_id (ns_id);
SESSION_TEST ((app_ns != 0), "should find ns %v status", ns_id);
- SESSION_TEST ((app_ns->ns_secret == dummy_secret), "secret should be %d",
- dummy_secret);
+ SESSION_TEST ((app_ns->ns_secret == placeholder_secret),
+ "secret should be %d", placeholder_secret);
SESSION_TEST ((app_ns->sw_if_index == APP_NAMESPACE_INVALID_INDEX),
"sw_if_index should be invalid");
options[APP_OPTIONS_FLAGS] |= APP_OPTIONS_FLAGS_USE_GLOBAL_SCOPE;
options[APP_OPTIONS_FLAGS] |= APP_OPTIONS_FLAGS_USE_LOCAL_SCOPE;
- options[APP_OPTIONS_NAMESPACE_SECRET] = dummy_secret - 1;
+ options[APP_OPTIONS_NAMESPACE_SECRET] = placeholder_secret - 1;
attach_args.namespace_id = ns_id;
- attach_args.api_client_index = dummy_server_api_index;
+ attach_args.api_client_index = placeholder_server_api_index;
error = vnet_application_attach (&attach_args);
SESSION_TEST ((error != 0), "app attachment should fail");
options[APP_OPTIONS_FLAGS] &= ~APP_OPTIONS_FLAGS_USE_LOCAL_SCOPE;
options[APP_OPTIONS_NAMESPACE_SECRET] = 0;
attach_args.namespace_id = 0;
- attach_args.api_client_index = dummy_server_api_index;
+ attach_args.api_client_index = placeholder_server_api_index;
error = vnet_application_attach (&attach_args);
SESSION_TEST ((error == 0), "server attachment should work");
server_index = attach_args.app_index;
*/
options[APP_OPTIONS_FLAGS] |= APP_OPTIONS_FLAGS_USE_GLOBAL_SCOPE;
options[APP_OPTIONS_FLAGS] |= APP_OPTIONS_FLAGS_USE_LOCAL_SCOPE;
- options[APP_OPTIONS_NAMESPACE_SECRET] = dummy_secret;
+ options[APP_OPTIONS_NAMESPACE_SECRET] = placeholder_secret;
attach_args.namespace_id = ns_id;
- attach_args.api_client_index = dummy_server_api_index;
+ attach_args.api_client_index = placeholder_server_api_index;
error = vnet_application_attach (&attach_args);
SESSION_TEST ((error == 0), "server attachment should work");
server_index = attach_args.app_index;
*/
options[APP_OPTIONS_FLAGS] &= ~APP_OPTIONS_FLAGS_USE_GLOBAL_SCOPE;
attach_args.name = client_name;
- attach_args.api_client_index = dummy_client_api_index;
+ attach_args.api_client_index = placeholder_client_api_index;
error = vnet_application_attach (&attach_args);
SESSION_TEST ((error == 0), "client attachment should work");
client_index = attach_args.app_index;
- connect_args.api_context = dummy_api_context;
+ connect_args.api_context = placeholder_api_context;
connect_args.app_index = client_index;
error = vnet_connect (&connect_args);
SESSION_TEST ((error != 0), "client connect should return error code");
SESSION_TEST ((error == SESSION_E_INVALID_RMT_IP),
"error code should be invalid value (zero ip)");
- SESSION_TEST ((dummy_segment_count == 0),
+ SESSION_TEST ((placeholder_segment_count == 0),
"shouldn't have received request to map new segment");
connect_args.sep.ip.ip4.as_u8[0] = 127;
error = vnet_connect (&connect_args);
SESSION_TEST ((error == 0), "client connect should not return error code");
- SESSION_TEST ((dummy_segment_count == 1),
+ SESSION_TEST ((placeholder_segment_count == 1),
"should've received request to map new segment");
- SESSION_TEST ((dummy_accept == 1), "should've received accept request");
+ SESSION_TEST ((placeholder_accept == 1),
+ "should've received accept request");
detach_args.app_index = client_index;
vnet_application_detach (&detach_args);
options[APP_OPTIONS_FLAGS] &= ~APP_OPTIONS_FLAGS_USE_LOCAL_SCOPE;
options[APP_OPTIONS_FLAGS] |= APP_OPTIONS_FLAGS_USE_GLOBAL_SCOPE;
- attach_args.api_client_index = dummy_client_api_index;
+ attach_args.api_client_index = placeholder_client_api_index;
error = vnet_application_attach (&attach_args);
SESSION_TEST ((error == 0), "client attachment should work");
error = vnet_connect (&connect_args);
options[APP_OPTIONS_FLAGS] &= ~APP_OPTIONS_FLAGS_USE_GLOBAL_SCOPE;
options[APP_OPTIONS_FLAGS] |= APP_OPTIONS_FLAGS_USE_LOCAL_SCOPE;
- attach_args.api_client_index = dummy_server_api_index;
+ attach_args.api_client_index = placeholder_server_api_index;
attach_args.name = server_name;
error = vnet_application_attach (&attach_args);
SESSION_TEST ((error == 0), "app attachment should work");
options[APP_OPTIONS_FLAGS] &= ~APP_OPTIONS_FLAGS_USE_GLOBAL_SCOPE;
options[APP_OPTIONS_FLAGS] |= APP_OPTIONS_FLAGS_USE_LOCAL_SCOPE;
attach_args.namespace_id = 0;
- attach_args.api_client_index = dummy_client_api_index;
+ attach_args.api_client_index = placeholder_client_api_index;
attach_args.name = client_name;
vnet_application_attach (&attach_args);
error = vnet_connect (&connect_args);
*/
options[APP_OPTIONS_FLAGS] |= APP_OPTIONS_FLAGS_USE_GLOBAL_SCOPE;
options[APP_OPTIONS_FLAGS] |= APP_OPTIONS_FLAGS_USE_LOCAL_SCOPE;
- options[APP_OPTIONS_NAMESPACE_SECRET] = dummy_secret;
+ options[APP_OPTIONS_NAMESPACE_SECRET] = placeholder_secret;
attach_args.namespace_id = ns_id;
- attach_args.api_client_index = dummy_server_api_index;
+ attach_args.api_client_index = placeholder_server_api_index;
attach_args.name = server_name;
error = vnet_application_attach (&attach_args);
SESSION_TEST ((error == 0), "server attachment should work");
u64 options[APP_OPTIONS_N_OPTIONS];
u16 lcl_port = 1234, rmt_port = 4321;
u32 server_index, server_index2;
- u32 dummy_server_api_index = ~0;
+ u32 placeholder_server_api_index = ~0;
transport_connection_t *tc;
- u32 dummy_port = 1111;
+ u32 placeholder_port = 1111;
u8 is_filtered = 0, *ns_id = format (0, "appns1");
session_t *listener, *s;
app_namespace_t *default_ns = app_namespace_get_default ();
}
server_sep.is_ip4 = 1;
- server_sep.port = dummy_port;
+ server_sep.port = placeholder_port;
clib_memset (options, 0, sizeof (options));
vnet_app_attach_args_t attach_args = {
.api_client_index = ~0,
.options = options,
.namespace_id = 0,
- .session_cb_vft = &dummy_session_cbs,
+ .session_cb_vft = &placeholder_session_cbs,
.name = format (0, "session_test"),
};
options[APP_OPTIONS_FLAGS] |= APP_OPTIONS_FLAGS_USE_GLOBAL_SCOPE;
options[APP_OPTIONS_FLAGS] |= APP_OPTIONS_FLAGS_USE_LOCAL_SCOPE;
attach_args.namespace_id = 0;
- attach_args.api_client_index = dummy_server_api_index;
+ attach_args.api_client_index = placeholder_server_api_index;
error = vnet_application_attach (&attach_args);
SESSION_TEST ((error == 0), "server attached");
server_index = attach_args.app_index;
app_ns = app_namespace_get_from_id (ns_id);
attach_args.namespace_id = ns_id;
- attach_args.api_client_index = dummy_server_api_index;
+ attach_args.api_client_index = placeholder_server_api_index;
vec_free (attach_args.name);
attach_args.name = format (0, "server_test2");
error = vnet_application_attach (&attach_args);
char *show_local_listeners = "sh app ns table default";
unformat_input_t tmp_input;
u32 server_index, app_index;
- u32 dummy_server_api_index = ~0, sw_if_index = 0;
+ u32 placeholder_server_api_index = ~0, sw_if_index = 0;
u8 is_filtered = 0;
session_t *s;
transport_connection_t *tc;
.api_client_index = ~0,
.options = options,
.namespace_id = 0,
- .session_cb_vft = &dummy_session_cbs,
+ .session_cb_vft = &placeholder_session_cbs,
.name = format (0, "session_test"),
};
- attach_args.api_client_index = dummy_server_api_index;
+ attach_args.api_client_index = placeholder_server_api_index;
error = vnet_application_attach (&attach_args);
SESSION_TEST ((error == 0), "server attachment should work");
server_index = attach_args.app_index;
.api_client_index = api_index,
.options = options,
.namespace_id = 0,
- .session_cb_vft = &dummy_session_cbs,
+ .session_cb_vft = &placeholder_session_cbs,
.name = format (0, "session_mq_test"),
};
error = vnet_application_attach (&attach_args);
u8 *data = 0;
svm_fifo_trace_elem_t *trace;
u32 offset;
- svm_fifo_t *dummy_fifo;
+ svm_fifo_t *placeholder_fifo;
if (!f)
return s;
trace_len = 0;
#endif
- dummy_fifo = svm_fifo_alloc (f->size);
+ placeholder_fifo = svm_fifo_alloc (f->size);
svm_fifo_init (f, f->size);
clib_memset (f->head_chunk->data, 0xFF, f->size);
vec_validate (data, f->size);
if (verbose)
s = format (s, "adding [%u, %u]:", trace[i].offset,
(trace[i].offset + trace[i].len));
- svm_fifo_enqueue_with_offset (dummy_fifo, trace[i].offset,
+ svm_fifo_enqueue_with_offset (placeholder_fifo, trace[i].offset,
trace[i].len, &data[offset]);
}
else if (trace[i].action == 2)
{
if (verbose)
s = format (s, "adding [%u, %u]:", 0, trace[i].len);
- svm_fifo_enqueue (dummy_fifo, trace[i].len, &data[offset]);
+ svm_fifo_enqueue (placeholder_fifo, trace[i].len, &data[offset]);
}
else if (!no_read)
{
if (verbose)
s = format (s, "read: %u", trace[i].len);
- svm_fifo_dequeue_drop (dummy_fifo, trace[i].len);
+ svm_fifo_dequeue_drop (placeholder_fifo, trace[i].len);
}
if (verbose)
- s = format (s, "%U", format_svm_fifo, dummy_fifo, 1);
+ s = format (s, "%U", format_svm_fifo, placeholder_fifo, 1);
}
- s = format (s, "result: %U", format_svm_fifo, dummy_fifo, 1);
+ s = format (s, "result: %U", format_svm_fifo, placeholder_fifo, 1);
return s;
}
void *oldheap;
hash_pair_t *hp;
svmdb_shm_hdr_t *shm;
- u8 *dummy_value = 0;
+ u8 *placeholder_value = 0;
svmdb_value_t *value;
svmdb_notify_t *np;
int i;
if (hp == 0)
{
local_set_variable_nolock (client, a->nspace, (u8 *) a->var,
- dummy_value, a->elsize);
+ placeholder_value, a->elsize);
/* might have moved */
h = shm->namespaces[a->nspace];
hp = hash_get_pair_mem (h, a->var);
return(TRUE);
}
-static event_def_t dummy_event;
-static char dummy_string[32];
+static event_def_t placeholder_event;
+static char placeholder_string[32];
/****************************************************************************
* find_event_definition
event_def_t *edp;
if (g_neventdefs == 0)
- goto use_dummy;
+ goto use_placeholder;
bottom = g_neventdefs-1;
top = 0;
return(edp);
if (top >= bottom) {
- use_dummy:
- edp = &dummy_event;
+ use_placeholder:
+ edp = &placeholder_event;
edp->selected = TRUE;
edp->event = code;
edp->format = "0x%x";
- snprintf (dummy_string, sizeof(dummy_string), "E%lu", code);
- edp->name = &dummy_string[0];
+ snprintf (placeholder_string, sizeof(placeholder_string), "E%lu", code);
+ edp->name = &placeholder_string[0];
return(edp);
}
int x, y;
GdkRectangle *rp;
GdkRectangle hit_rect;
- GdkRectangle dummy;
+ GdkRectangle placeholder;
event_t *ep;
event_def_t *edp;
char tmpbuf [1024];
/* Figure out the dimensions of the detail box */
format_popbox_string(tmpbuf, sizeof(tmpbuf), ep, edp);
rp = tbox(tmpbuf, x, y - vp->pop_offset, TBOX_GETRECT_BOXED);
- if (gdk_rectangle_intersect(rp, &hit_rect, &dummy)) {
+ if (gdk_rectangle_intersect(rp, &hit_rect, &placeholder)) {
ep->flags &= ~EVENT_FLAG_SELECT;
view1_display_when_idle();
return 0;
/* Figure out the dimensions of the regular box */
rp = tbox(tmpbuf, x, y, TBOX_GETRECT_EVENT);
- if (gdk_rectangle_intersect(rp, &hit_rect, &dummy)) {
+ if (gdk_rectangle_intersect(rp, &hit_rect, &placeholder)) {
/* we hit the rectangle. */
if (ep->flags & EVENT_FLAG_SELECT) {
ep->flags &= ~EVENT_FLAG_SELECT;
{
HANDOFF_TRACE_NEXT_DROP,
HANDOFF_TRACE_N_NEXT,
-} tdummy_next_t;
+} tplaceholder_next_t;
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (handoff_trace_node, static) =
clib_error_t *
vlib_call_all_init_functions (vlib_main_t * vm)
{
- /* Call dummy functions to make sure purely static modules are
+ /* Call placeholder functions to make sure purely static modules are
linked in. */
#define _(f) vlib_##f##_reference ();
foreach_vlib_module_reference;
{
vlib_node_main_t *nm = &vm->node_main;
vlib_frame_t *f;
- vlib_next_frame_t *nf, nf_dummy;
+ vlib_next_frame_t *nf, nf_placeholder;
vlib_node_runtime_t *n;
vlib_frame_t *restore_frame;
vlib_pending_frame_t *p;
f = vlib_get_frame (vm, p->frame);
if (p->next_frame_index == VLIB_PENDING_FRAME_NO_NEXT_FRAME)
{
- /* No next frame: so use dummy on stack. */
- nf = &nf_dummy;
+ /* No next frame: so use placeholder on stack. */
+ nf = &nf_placeholder;
nf->flags = f->frame_flags & VLIB_NODE_FLAG_TRACE;
nf->frame = NULL;
}
VLIB_EARLY_CONFIG_FUNCTION (vlib_main_configure, "vlib");
static void
-dummy_queue_signal_callback (vlib_main_t * vm)
+placeholder_queue_signal_callback (vlib_main_t * vm)
{
}
clib_error_t *volatile error;
vlib_node_main_t *nm = &vm->node_main;
- vm->queue_signal_callback = dummy_queue_signal_callback;
+ vm->queue_signal_callback = placeholder_queue_signal_callback;
/* Turn on event log. */
if (!vm->elog_main.event_ring_size)
vec_free (pm->pcap_data);
memset (pm, 0, sizeof (*pm));
- vec_validate_aligned (vnet_trace_dummy, 2048, CLIB_CACHE_LINE_BYTES);
+ vec_validate_aligned (vnet_trace_placeholder, 2048,
+ CLIB_CACHE_LINE_BYTES);
if (pm->lock == 0)
clib_spinlock_init (&(pm->lock));
#include <vlib/vlib.h>
#include <vlib/threads.h>
-u8 *vnet_trace_dummy;
+u8 *vnet_trace_placeholder;
/* Helper function for nodes which only trace buffer data. */
void
if (!unformat_user (input, unformat_line_input, line_input))
return 0;
- if (vnet_trace_dummy == 0)
- vec_validate_aligned (vnet_trace_dummy, 2048, CLIB_CACHE_LINE_BYTES);
+ if (vnet_trace_placeholder == 0)
+ vec_validate_aligned (vnet_trace_placeholder, 2048,
+ CLIB_CACHE_LINE_BYTES);
while (unformat_check_input (line_input) != (uword) UNFORMAT_END_OF_INPUT)
{
};
/* *INDENT-ON* */
-/* Dummy function to get us linked in. */
+/* Placeholder function to get us linked in. */
void
vlib_trace_cli_reference (void)
{
#ifndef included_vlib_trace_funcs_h
#define included_vlib_trace_funcs_h
-extern u8 *vnet_trace_dummy;
+extern u8 *vnet_trace_placeholder;
always_inline void
vlib_validate_trace (vlib_trace_main_t * tm, vlib_buffer_t * b)
vlib_trace_header_t *h;
u32 n_data_words;
- ASSERT (vnet_trace_dummy);
+ ASSERT (vnet_trace_placeholder);
if (PREDICT_FALSE ((b->flags & VLIB_BUFFER_IS_TRACED) == 0))
- return vnet_trace_dummy;
+ return vnet_trace_placeholder;
if (PREDICT_FALSE (tm->add_trace_callback != 0))
{
}
else if (PREDICT_FALSE (tm->trace_enable == 0))
{
- ASSERT (vec_len (vnet_trace_dummy) >= n_data_bytes + sizeof (*h));
- return vnet_trace_dummy;
+ ASSERT (vec_len (vnet_trace_placeholder) >= n_data_bytes + sizeof (*h));
+ return vnet_trace_placeholder;
}
/* Are we trying to trace a handoff case? */
}
case VNET_LINK_NSH:
{
- arc = nsh_main_dummy.output_feature_arc_index;
+ arc = nsh_main_placeholder.output_feature_arc_index;
break;
}
case VNET_LINK_ARP:
#include <vnet/ip/ip.h>
#ifndef CLIB_MARCH_VARIANT
-nsh_main_dummy_t nsh_main_dummy;
+nsh_main_placeholder_t nsh_main_placeholder;
#endif /* CLIB_MARCH_VARIANT */
/**
* Follow the feature ARC. this will result eventually in
* the midchain-tx node
*/
- vnet_feature_arc_start (nsh_main_dummy.output_feature_arc_index,
+ vnet_feature_arc_start (nsh_main_placeholder.output_feature_arc_index,
tx_sw_if_index0, &next0, p0);
}
else
{
.arc_name = "nsh-output",
.start_nodes = VNET_FEATURES ("adj-nsh-midchain"),
- .arc_index_ptr = &nsh_main_dummy.output_feature_arc_index,
+ .arc_index_ptr = &nsh_main_placeholder.output_feature_arc_index,
};
VNET_FEATURE_INIT (nsh_tx_drop, static) =
extern vlib_node_registration_t adj_nsh_midchain_node;
extern vlib_node_registration_t adj_nsh_rewrite_node;
-typedef struct _nsh_main_dummy
+typedef struct _nsh_main_placeholder
{
u8 output_feature_arc_index;
-} nsh_main_dummy_t;
+} nsh_main_placeholder_t;
-extern nsh_main_dummy_t nsh_main_dummy;
+extern nsh_main_placeholder_t nsh_main_placeholder;
#endif
ethernet_sw_interface_up_down (vnet_main_t * vnm, u32 sw_if_index, u32 flags)
{
subint_config_t *subint;
- u32 dummy_flags;
- u32 dummy_unsup;
+ u32 placeholder_flags;
+ u32 placeholder_unsup;
clib_error_t *error = 0;
// Find the config for this subinterface
subint =
- ethernet_sw_interface_get_config (vnm, sw_if_index, &dummy_flags,
- &dummy_unsup);
+ ethernet_sw_interface_get_config (vnm, sw_if_index, &placeholder_flags,
+ &placeholder_unsup);
if (subint == 0)
{
ethernet_sw_interface_set_l2_mode (vnet_main_t * vnm, u32 sw_if_index, u32 l2)
{
subint_config_t *subint;
- u32 dummy_flags;
- u32 dummy_unsup;
+ u32 placeholder_flags;
+ u32 placeholder_unsup;
int is_port;
vnet_sw_interface_t *sw = vnet_get_sw_interface (vnm, sw_if_index);
// Find the config for this subinterface
subint =
- ethernet_sw_interface_get_config (vnm, sw_if_index, &dummy_flags,
- &dummy_unsup);
+ ethernet_sw_interface_get_config (vnm, sw_if_index, &placeholder_flags,
+ &placeholder_unsup);
if (subint == 0)
{
u32 sw_if_index, u32 l2)
{
subint_config_t *subint;
- u32 dummy_flags;
- u32 dummy_unsup;
+ u32 placeholder_flags;
+ u32 placeholder_unsup;
/* Find the config for this subinterface */
subint =
- ethernet_sw_interface_get_config (vnm, sw_if_index, &dummy_flags,
- &dummy_unsup);
+ ethernet_sw_interface_get_config (vnm, sw_if_index, &placeholder_flags,
+ &placeholder_unsup);
if (subint == 0)
{
} vnet_hw_interface_class_t;
/**
- * @brief Return a complete, zero-length (aka dummy) rewrite
+ * @brief Return a complete, zero-length (aka placeholder) rewrite
*/
extern u8 *default_build_rewrite (struct vnet_main_t *vnm,
u32 sw_if_index,
pm->pcap_data = save_pcap_data;
- vec_validate_aligned (vnet_trace_dummy, 2048, CLIB_CACHE_LINE_BYTES);
+ vec_validate_aligned (vnet_trace_placeholder, 2048,
+ CLIB_CACHE_LINE_BYTES);
if (pm->lock == 0)
clib_spinlock_init (&(pm->lock));
{
l2_bridge_domain_t *bd_config =
l2input_bd_config_from_index (l2im, bd_index);
- /* skip dummy bd_id 0 */
+ /* skip placeholder bd_id 0 */
if (bd_config && (bd_config->bd_id > 0))
send_bridge_domain_details (l2im, reg, bd_config,
vec_len (bd_config->members),
bd_main_t *bdm = &bd_main;
bdm->bd_index_by_bd_id = hash_create (0, sizeof (uword));
/*
- * create a dummy bd with bd_id of 0 and bd_index of 0 with feature set
+ * create a placeholder bd with bd_id of 0 and bd_index of 0 with feature set
* to packet drop only. Thus, packets received from any L2 interface with
* uninitialized bd_index of 0 can be dropped safely.
*/
if (is_add)
{
- /* Create dummy petr locator-set */
+ /* Create placeholder petr locator-set */
clib_memset (&loc, 0, sizeof (loc));
gid_address_from_ip (&loc.address, ip);
loc.priority = 1;
return 0;
}
-/* dummy node used only for statistics */
+/* placeholder node used only for statistics */
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (lisp_cp_output_node) = {
.function = lisp_cp_output,
}
static uword
-lisp_gpe_nsh_dummy_input (vlib_main_t * vm, vlib_node_runtime_t * node,
- vlib_frame_t * from_frame)
+lisp_gpe_nsh_placeholder_input (vlib_main_t * vm, vlib_node_runtime_t * node,
+ vlib_frame_t * from_frame)
{
vlib_node_increment_counter (vm, node->node_index, 0, 1);
return from_frame->n_vectors;
}
-static char *lisp_gpe_nsh_dummy_error_strings[] = {
- "lisp gpe dummy nsh decap",
+static char *lisp_gpe_nsh_placeholder_error_strings[] = {
+ "lisp gpe placeholder nsh decap",
};
/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (lisp_gpe_nsh_dummy_input_node) = {
- .function = lisp_gpe_nsh_dummy_input,
- .name = "lisp-gpe-nsh-dummy-input",
+VLIB_REGISTER_NODE (lisp_gpe_nsh_placeholder_input_node) = {
+ .function = lisp_gpe_nsh_placeholder_input,
+ .name = "lisp-gpe-nsh-placeholder-input",
.vector_size = sizeof (u32),
.type = VLIB_NODE_TYPE_INTERNAL,
.n_next_nodes = 1,
.n_errors = 1,
- .error_strings = lisp_gpe_nsh_dummy_error_strings,
+ .error_strings = lisp_gpe_nsh_placeholder_error_strings,
.next_nodes = {
[0] = "error-drop",
/* *INDENT-ON* */
static clib_error_t *
-lisp_add_dummy_nsh_node_command_fn (vlib_main_t * vm,
- unformat_input_t * input,
- vlib_cli_command_t * cmd)
+lisp_add_placeholder_nsh_node_command_fn (vlib_main_t * vm,
+ unformat_input_t * input,
+ vlib_cli_command_t * cmd)
{
lisp_gpe_main_t *lgm = vnet_lisp_gpe_get_main ();
vlib_node_add_next (lgm->vlib_main, lisp_gpe_ip4_input_node.index,
- lisp_gpe_nsh_dummy_input_node.index);
+ lisp_gpe_nsh_placeholder_input_node.index);
next_proto_to_next_index[LISP_GPE_NEXT_PROTO_NSH] =
LISP_GPE_INPUT_NEXT_NSH_INPUT;
return 0;
}
/* *INDENT-OFF* */
-VLIB_CLI_COMMAND (lisp_add_dummy_nsh_node_command, static) = {
- .path = "test one nsh add-dummy-decap-node",
- .function = lisp_add_dummy_nsh_node_command_fn,
+VLIB_CLI_COMMAND (lisp_add_placeholder_nsh_node_command, static) = {
+ .path = "test one nsh add-placeholder-decap-node",
+ .function = lisp_add_placeholder_nsh_node_command_fn,
};
/* *INDENT-ON* */
gpe_encap_mode_t encap_mode;
- u8 *dummy_stats_pool;
+ u8 *placeholder_stats_pool;
uword *lisp_stats_index_by_key;
vlib_combined_counter_main_t counters;
const lisp_gpe_adjacency_t *ladj;
lisp_fwd_path_t *path;
lisp_gpe_main_t *lgm = vnet_lisp_gpe_get_main ();
- u8 *dummy_elt;
+ u8 *placeholder_elt;
lisp_gpe_fwd_entry_t *lfe;
lisp_gpe_fwd_entry_key_t fe_key;
lisp_stats_key_t key;
key.tunnel_index = ladj->tunnel_index;
lisp_stats_key_t *key_copy = clib_mem_alloc (sizeof (*key_copy));
memcpy (key_copy, &key, sizeof (*key_copy));
- pool_get (lgm->dummy_stats_pool, dummy_elt);
+ pool_get (lgm->placeholder_stats_pool, placeholder_elt);
hash_set_mem (lgm->lisp_stats_index_by_key, key_copy,
- dummy_elt - lgm->dummy_stats_pool);
+ placeholder_elt - lgm->placeholder_stats_pool);
vlib_validate_combined_counter (&lgm->counters,
- dummy_elt - lgm->dummy_stats_pool);
+ placeholder_elt -
+ lgm->placeholder_stats_pool);
vlib_zero_combined_counter (&lgm->counters,
- dummy_elt - lgm->dummy_stats_pool);
+ placeholder_elt -
+ lgm->placeholder_stats_pool);
}
}
p = hash_get_mem (lgm->lisp_stats_index_by_key, &key);
if (p)
{
- s = pool_elt_at_index (lgm->dummy_stats_pool, p[0]);
+ s = pool_elt_at_index (lgm->placeholder_stats_pool, p[0]);
hp = hash_get_pair (lgm->lisp_stats_index_by_key, &key);
key_copy = (void *) (hp->key);
hash_unset_mem (lgm->lisp_stats_index_by_key, &key);
clib_mem_free (key_copy);
- pool_put (lgm->dummy_stats_pool, s);
+ pool_put (lgm->placeholder_stats_pool, s);
}
}
int i, trace_len;
scoreboard_trace_elt_t *trace;
u32 next_ack, left, group, has_new_ack = 0;
- tcp_connection_t _dummy_tc, *dummy_tc = &_dummy_tc;
+ tcp_connection_t _placeholder_tc, *placeholder_tc = &_placeholder_tc;
sack_block_t *block;
if (!TCP_SCOREBOARD_TRACE)
if (!tc)
return s;
- clib_memset (dummy_tc, 0, sizeof (*dummy_tc));
- tcp_connection_timers_init (dummy_tc);
- scoreboard_init (&dummy_tc->sack_sb);
- dummy_tc->rcv_opts.flags |= TCP_OPTS_FLAG_SACK;
+ clib_memset (placeholder_tc, 0, sizeof (*placeholder_tc));
+ tcp_connection_timers_init (placeholder_tc);
+ scoreboard_init (&placeholder_tc->sack_sb);
+ placeholder_tc->rcv_opts.flags |= TCP_OPTS_FLAG_SACK;
#if TCP_SCOREBOARD_TRACE
trace = tc->sack_sb.trace;
{
if (trace[i].ack != 0)
{
- dummy_tc->snd_una = trace[i].ack - 1448;
- dummy_tc->snd_una_max = trace[i].ack;
+ placeholder_tc->snd_una = trace[i].ack - 1448;
+ placeholder_tc->snd_una_max = trace[i].ack;
}
}
while (left < trace_len)
{
group = trace[left].group;
- vec_reset_length (dummy_tc->rcv_opts.sacks);
+ vec_reset_length (placeholder_tc->rcv_opts.sacks);
has_new_ack = 0;
while (trace[left].group == group)
{
if (verbose)
s = format (s, "Adding ack %u, snd_una_max %u, segs: ",
trace[left].ack, trace[left].snd_una_max);
- dummy_tc->snd_una_max = trace[left].snd_una_max;
+ placeholder_tc->snd_una_max = trace[left].snd_una_max;
next_ack = trace[left].ack;
has_new_ack = 1;
}
if (verbose)
s = format (s, "[%u, %u], ", trace[left].start,
trace[left].end);
- vec_add2 (dummy_tc->rcv_opts.sacks, block, 1);
+ vec_add2 (placeholder_tc->rcv_opts.sacks, block, 1);
block->start = trace[left].start;
block->end = trace[left].end;
}
}
/* Push segments */
- tcp_rcv_sacks (dummy_tc, next_ack);
+ tcp_rcv_sacks (placeholder_tc, next_ack);
if (has_new_ack)
- dummy_tc->snd_una = next_ack;
+ placeholder_tc->snd_una = next_ack;
if (verbose)
s = format (s, "result: %U", format_tcp_scoreboard,
- &dummy_tc->sack_sb);
+ &placeholder_tc->sack_sb);
}
- s = format (s, "result: %U", format_tcp_scoreboard, &dummy_tc->sack_sb);
+ s =
+ format (s, "result: %U", format_tcp_scoreboard, &placeholder_tc->sack_sb);
return s;
}
VLIB_CONFIG_FUNCTION (heapsize_config, "heapsize");
static clib_error_t *
-dummy_path_config (vlib_main_t * vm, unformat_input_t * input)
+placeholder_path_config (vlib_main_t * vm, unformat_input_t * input)
{
u8 *junk;
static clib_error_t *
plugin_path_config (vlib_main_t * vm, unformat_input_t * input)
{
- return dummy_path_config (vm, input);
+ return placeholder_path_config (vm, input);
}
VLIB_CONFIG_FUNCTION (plugin_path_config, "plugin_path");
static clib_error_t *
test_plugin_path_config (vlib_main_t * vm, unformat_input_t * input)
{
- return dummy_path_config (vm, input);
+ return placeholder_path_config (vm, input);
}
VLIB_CONFIG_FUNCTION (test_plugin_path_config, "test_plugin_path");
u32 n_total_events_disable_limit;
/** Dummy event to use when logger is disabled. */
- elog_event_t dummy_event;
+ elog_event_t placeholder_event;
/** Power of 2 number of elements in ring. */
uword event_ring_size;
uword ei;
word type_index, track_index;
- /* Return the user dummy memory to scribble data into. */
+ /* Return the user placeholder memory to scribble data into. */
if (PREDICT_FALSE (!elog_is_enabled (em)))
- return em->dummy_event.data;
+ return em->placeholder_event.data;
type_index = (word) type->type_index_plus_one - 1;
track_index = (word) track->track_index_plus_one - 1;
elog_event_type_t * type,
elog_track_t * track, u64 cpu_time)
{
- /* Return the user dummy memory to scribble data into. */
+ /* Return the user placeholder memory to scribble data into. */
if (PREDICT_FALSE (!elog_is_enabled (em)))
- return em->dummy_event.data;
+ return em->placeholder_event.data;
return elog_event_data (em, type, track, cpu_time);
}
size_t size;
rv = vapi_recv (ctx, (void *) &resp, &size, 0, 0);
ck_assert_int_eq (VAPI_OK, rv);
- int dummy;
- show_version_cb (NULL, &dummy, VAPI_OK, true, &resp->payload);
+ int placeholder;
+ show_version_cb (NULL, &placeholder, VAPI_OK, true, &resp->payload);
vapi_msg_free (ctx, resp);
}