vpp_root_packages = vpp vom
-vpp_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 \
- -fstack-protector-all -fPIC -Werror
-vpp_debug_TAG_CXXFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 \
- -fstack-protector-all -fPIC -Werror
-vpp_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 \
- -fstack-protector-all -fPIC -Werror
-
-vpp_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
-vpp_TAG_CXXFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
-vpp_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror -pie
-
-vpp_clang_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
-vpp_clang_TAG_CXXFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
-vpp_clang_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
+vpp_common_cflags = \
+ -g \
+ -DFORTIFY_SOURCE=2 \
+ -fstack-protector \
+ -fPIC \
+ -Wall \
+ -Werror \
+ -fno-common
+
+vpp_debug_TAG_CFLAGS = -O0 -DCLIB_DEBUG $(vpp_common_cflags)
+vpp_debug_TAG_CXXFLAGS = -O0 -DCLIB_DEBUG $(vpp_common_cflags)
+vpp_debug_TAG_LDFLAGS = -O0 -DCLIB_DEBUG $(vpp_common_cflags)
+
+vpp_TAG_CFLAGS = -O2 $(vpp_common_cflags)
+vpp_TAG_CXXFLAGS = -O2 $(vpp_common_cflags)
+vpp_TAG_LDFLAGS = -O2 $(vpp_common_cflags) -pie
+
+vpp_clang_TAG_CFLAGS = -O2 $(vpp_common_cflags)
+vpp_clang_TAG_CXXFLAGS = -O2 $(vpp_common_cflags)
+vpp_clang_TAG_LDFLAGS = -O2 $(vpp_common_cflags)
vpp_gcov_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DCLIB_GCOV -fPIC -Werror -fprofile-arcs -ftest-coverage
vpp_gcov_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DCLIB_GCOV -fPIC -Werror -coverage
err = ftruncate (rfd, size);
+ if (err)
+ return err;
+
raddr = mmap (NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, rfd, 0);
*addr = raddr;
int err = MEMIF_ERR_SUCCESS, ret_val;
uint16_t rx = 0, tx = 0;
- uint16_t fb = 0;
int i = 0;
int j = 0;
int err = MEMIF_ERR_SUCCESS, ret_val;
int i;
uint16_t rx, tx;
- uint16_t fb;
- uint16_t pck_seq;
do
{
memif_connection_t *c = &memif_connection[index];
memif_conn_args_t args;
- int fd = -1;
memset (&args, 0, sizeof (args));
args.is_master = mode;
args.log2_ring_size = 11;
memif_connection_t *c = &memif_connection[index];
if (c->conn == NULL)
return -1;
- int err, i;
- uint16_t tx = 0, rx = 0;
char *end, *ui;
uint8_t tmp[6];
icmpr_thread_data_t *data = &icmpr_thread_data[index];
int
poll_event (int timeout)
{
- struct epoll_event evt, *e;
+ struct epoll_event evt;
int app_err = 0, memif_err = 0, en = 0;
- int tmp, nfd;
uint32_t events = 0;
memset (&evt, 0, sizeof (evt));
evt.events = EPOLLIN | EPOLLOUT;
int err = MEMIF_ERR_SUCCESS, ret_val;
uint16_t rx = 0, tx = 0;
- uint16_t fb = 0;
int i = 0; /* rx buffer iterator */
int j = 0; /* tx bufferiterator */
int err = MEMIF_ERR_SUCCESS, ret_val;
uint16_t rx = 0, tx = 0;
- uint16_t fb;
int i; /* rx buffer iterator */
int j; /* tx bufferiterator */
- int prev_i; /* first allocated rx buffer */
/* loop while there are packets in shm */
do
goto error;
}
- prev_i = i = 0;
+ i = 0;
/* loop while there are RX buffers to be processed */
while (rx)
if (err != MEMIF_ERR_SUCCESS)
INFO ("memif_buffer_free: %s", memif_strerror (err));
rx -= j;
- prev_i = i;
DBG ("freed %d buffers. %u/%u alloc/free buffers",
fb, rx, MAX_MEMIF_BUFS - rx);
int err = MEMIF_ERR_SUCCESS, ret_val;
int i;
uint16_t rx, tx;
- uint16_t fb;
- uint16_t pck_seq;
do
{
/* setting memif connection arguments */
memif_conn_args_t args;
- int fd = -1;
memset (&args, 0, sizeof (args));
args.is_master = mode;
args.log2_ring_size = 11;
int
user_input_handler ()
{
- int i;
char *in = (char *) malloc (256);
char *ui = fgets (in, 256, stdin);
char *end;
int
poll_event (int timeout)
{
- struct epoll_event evt, *e;
+ struct epoll_event evt;
int app_err = 0, memif_err = 0, en = 0;
- int tmp, nfd;
uint32_t events = 0;
struct timespec start, end;
memset (&evt, 0, sizeof (evt));
void
user_signal_handler (int sig)
{
- sig = sig;
}
static void
memif_connection_t *c = &memif_connection[data->index];
int err;
uint16_t rx = 0, tx = 0, fb = 0;
- struct epoll_event evt, *e;
+ struct epoll_event evt;
int en = 0;
- uint32_t events = 0;
sigset_t sigset;
signal (SIGUSR1, user_signal_handler);
/* setting memif connection arguments */
memif_conn_args_t args;
- int fd = -1;
memset (&args, 0, sizeof (args));
args.is_master = 0;
args.log2_ring_size = 10;
int
user_input_handler ()
{
- int i;
char *in = (char *) malloc (256);
char *ui = fgets (in, 256, stdin);
char *end;
int
poll_event (int timeout)
{
- struct epoll_event evt, *e;
+ struct epoll_event evt;
int app_err = 0, memif_err = 0, en = 0;
- int tmp, nfd;
uint32_t events = 0;
memset (&evt, 0, sizeof (evt));
evt.events = EPOLLIN | EPOLLOUT;
int err = MEMIF_ERR_SUCCESS, ret_val;
uint16_t rx = 0, tx = 0;
- uint16_t fb = 0;
int i = 0; /* rx buffer iterator */
- int j = 0; /* tx bufferiterator */
/* loop while there are packets in shm */
do
int err = MEMIF_ERR_SUCCESS, ret_val;
uint16_t rx = 0, tx = 0;
- uint16_t fb = 0;
int i = 0; /* rx buffer iterator */
- int j = 0; /* tx bufferiterator */
/* loop while there are packets in shm */
do
int err = MEMIF_ERR_SUCCESS, ret_val;
int i;
uint16_t rx, tx;
- uint16_t fb;
- uint16_t pck_seq;
do
{
/* setting memif connection arguments */
memif_conn_args_t args;
- int fd = -1;
memset (&args, 0, sizeof (args));
args.is_master = mode;
args.log2_ring_size = 11;
int
user_input_handler ()
{
- int i;
char *in = (char *) malloc (256);
char *ui = fgets (in, 256, stdin);
char *end;
int
poll_event (int timeout)
{
- struct epoll_event evt, *e;
+ struct epoll_event evt;
int app_err = 0, memif_err = 0, en = 0;
- int tmp, nfd;
uint32_t events = 0;
struct timespec start, end;
memset (&evt, 0, sizeof (evt));
resolve_packet3 (void **pck_, uint32_t * size, uint8_t ip_addr[4])
{
struct ether_header *eh;
- struct ether_arp *eah;
struct iphdr *ip;
struct icmphdr *icmp;
int32_t offset = 0;
memif_connection_t *c = &memif_connection;
int err;
uint16_t rx;
+ uint16_t fb = 0;
/* receive data from shared memory buffers */
err = memif_rx_burst (c->conn, qid, c->rx_bufs, MAX_MEMIF_BUFS, &rx);
c->rx_buf_num += rx;
&(c->tx_bufs + i)->len, c->ip_addr);
}
- uint16_t fb;
/* mark memif buffers and shared memory buffers as free */
err = memif_refill_queue (c->conn, qid, rx, 0);
c->rx_buf_num -= fb;
{
/* setting memif connection arguments */
memif_conn_args_t args;
- int fd = -1;
memset (&args, 0, sizeof (args));
args.is_master = is_master;
args.log2_ring_size = 10;
memset (&args, 0, sizeof (args));
args.is_master = 1;
- libmemif_main_t *lm = &libmemif_main;
-
if ((err =
memif_init (control_fd_update, TEST_APP_NAME, NULL,
NULL, NULL)) != MEMIF_ERR_SUCCESS)
START_TEST (test_rx_burst)
{
int err, i;
- uint16_t max_buf = 10, buf, rx;
+ uint16_t max_buf = 10, rx;
uint8_t qid;
memif_buffer_t *bufs;
memif_queue_t *mq;
main (void)
{
int num_fail;
- Suite *main, *socket;
+ Suite *mains, *socket;
SRunner *sr;
- main = main_suite ();
+ mains = main_suite ();
socket = socket_suite ();
- sr = srunner_create (main);
+ sr = srunner_create (mains);
srunner_add_suite (sr, socket);
set(l ${lib}_${VARIANT})
add_library(${l} OBJECT ${ARGN})
set_target_properties(${l} PROPERTIES POSITION_INDEPENDENT_CODE ON)
- target_compile_options(${l} PUBLIC "-DCLIB_MARCH_VARIANT=${VARIANT}" -Wall -fno-common)
+ target_compile_options(${l} PUBLIC "-DCLIB_MARCH_VARIANT=${VARIANT}")
separate_arguments(VARIANT_FLAGS)
target_compile_options(${l} PUBLIC ${VARIANT_FLAGS})
target_sources(${lib} PRIVATE $<TARGET_OBJECTS:${l}>)
)
add_library(${lib} SHARED ${ARG_SOURCES})
- target_compile_options(${lib} PRIVATE -Wall -fno-common)
if(VPP_LIB_VERSION)
set_target_properties(${lib} PROPERTIES SOVERSION ${VPP_LIB_VERSION})
endif()
endforeach()
add_library(${plugin_name} SHARED ${PLUGIN_SOURCES} ${api_includes})
set_target_properties(${plugin_name} PROPERTIES NO_SONAME 1)
- target_compile_options(${plugin_name} PRIVATE -Wall)
if(NOT VPP_EXTERNAL_PROJECT)
add_dependencies(${plugin_name} vpp_version_h api_headers)
endif()
#undef vl_printfun
flowprobe_main_t flowprobe_main;
-vlib_node_registration_t flowprobe_walker_node;
static vlib_node_registration_t flowprobe_timer_node;
uword flowprobe_walker_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
vlib_frame_t * f);
} flowprobe_main_t;
extern flowprobe_main_t flowprobe_main;
+extern vlib_node_registration_t flowprobe_walker_node;
void flowprobe_flush_callback_ip4 (void);
void flowprobe_flush_callback_ip6 (void);
vat_main_t *vat_main;
} export_test_main_t;
-export_test_main_t export_test_main;
+static export_test_main_t export_test_main;
#define foreach_standard_reply_retval_handler \
_(vxlan_gpe_ioam_export_enable_disable_reply)
vat_main_t *vat_main;
} export_test_main_t;
-export_test_main_t export_test_main;
+static export_test_main_t export_test_main;
#define foreach_standard_reply_retval_handler \
_(ioam_export_ip6_enable_disable_reply)
MARKER_N_PACKET_TEMPLATES,
} marker_packet_template_id_t;
-enum
+typedef enum
{
LACP_PROCESS_EVENT_START = 1,
LACP_PROCESS_EVENT_STOP = 2,
int ret;
ip46_address_t ip_prefix;
u8 prefix_length = 0;
- u8 protocol;
+ u8 protocol = 0;
u32 port = 0;
u32 encap = 0;
u32 dscp = ~0;
u32 srv_type = LB_SRV_TYPE_CLUSTERIP;
u32 target_port = 0;
u32 new_length = 1024;
+ int is_del = 0;
if (!unformat(line_input, "%U", unformat_ip46_prefix, &ip_prefix,
&prefix_length, IP46_TYPE_ANY, &prefix_length)) {
if (unformat(line_input, "new_len %d", &new_length))
;
else if (unformat(line_input, "del"))
- mp->is_del = 1;
+ is_del = 1;
else if (unformat(line_input, "protocol tcp"))
{
protocol = IP_PROTOCOL_TCP;
mp->target_port = htons((u16)target_port);
mp->node_port = htons((u16)target_port);
mp->new_flows_table_length = htonl(new_length);
+ mp->is_del = is_del;
S(mp);
W (ret);
ip46_address_t vip_prefix, as_addr;
u8 vip_plen;
ip46_address_t *as_array = 0;
- u32 vip_index;
u32 port = 0;
u8 protocol = 0;
u8 is_del = 0;
unformat_input_t *i = vam->input;
f64 delay = 0.0, bandwidth = 0.0;
f64 packet_size = 1500.0;
- u32 num_workers = vlib_num_workers ();
u32 packets_per_drop = 0;
int ret;
"Endpoint with dynamic proxy to SR-unaware appliance";
unsigned char params_str[] = "nh <next-hop> oif <iface-out> iif <iface-in>";
+srv6_ad_main_t srv6_ad_main;
/*****************************************/
/* SRv6 LocalSID instantiation and removal functions */
vlib_combined_counter_main_t invalid_counters;/**< Invalid rewrite counters */
} srv6_ad_main_t;
-srv6_ad_main_t srv6_ad_main;
+extern srv6_ad_main_t srv6_ad_main;
format_function_t format_srv6_ad_localsid;
unformat_function_t unformat_srv6_ad_localsid;
unsigned char def_str[] = "Endpoint to SR-unaware appliance via masquerading";
unsigned char params_str[] = "nh <next-hop> oif <iface-out> iif <iface-in>";
+srv6_am_main_t srv6_am_main;
/*****************************************/
/* SRv6 LocalSID instantiation and removal functions */
u32 sw_if_index_in; /**< Incoming iface from proxied device */
} srv6_am_localsid_t;
-srv6_am_main_t srv6_am_main;
+extern srv6_am_main_t srv6_am_main;
format_function_t format_srv6_am_localsid;
unformat_function_t unformat_srv6_am_localsid;
unsigned char params_str[] =
"nh <next-hop> oif <iface-out> iif <iface-in> src <src-addr> next <sid> [next <sid> ...]";
+srv6_as_main_t srv6_as_main;
static inline u8 *
prepare_rewrite (ip6_address_t src_addr, ip6_address_t * sid_list,
vlib_combined_counter_main_t invalid_counters;/**< Invalid rewrite counters */
} srv6_as_main_t;
-srv6_as_main_t srv6_as_main;
+extern srv6_as_main_t srv6_as_main;
format_function_t format_srv6_as_localsid;
unformat_function_t unformat_srv6_as_localsid;
u64 server_bytes_received, server_bytes_sent;
-static void *
+__clib_unused static void *
cut_through_thread_fn (void *arg)
{
app_session_t *s;
u64 test_buf_len, bytes_this_chunk, test_buf_offset;
u8 *test_data = utm->connect_test_data;
- u32 bytes_to_snd, enq_space, min_chunk;
+ u32 enq_space;
int written;
test_buf_len = vec_len (test_data);
client_test (udp_echo_main_t * utm)
{
f64 start_time, timeout = 100.0;
- app_session_t *session;
svm_msg_q_msg_t msg;
session_event_t *e;
session_event_t *e;
svm_msg_q_msg_t msg;
svm_msg_q_t *mq = utm->our_event_queue;
- int i;
while (utm->state != STATE_READY)
sleep (5);
static uword
api_unformat_sw_if_index (unformat_input_t * input, va_list * args)
{
- vat_main_t *vam __attribute__ ((unused)) = va_arg (*args, vat_main_t *);
+ vat_main_t *vam __clib_unused = va_arg (*args, vat_main_t *);
vnet_main_t *vnm = vnet_get_main ();
u32 *result = va_arg (*args, u32 *);
static uword
api_unformat_hw_if_index (unformat_input_t * input, va_list * args)
{
- vat_main_t *vam __attribute__ ((unused)) = va_arg (*args, vat_main_t *);
+ vat_main_t *vam __clib_unused = va_arg (*args, vat_main_t *);
vnet_main_t *vnm = vnet_get_main ();
u32 *result = va_arg (*args, u32 *);
return 1;
}
+#if (VPP_API_TEST_BUILTIN==0)
+
static const char *mfib_flag_names[] = MFIB_ENTRY_NAMES_SHORT;
static const char *mfib_flag_long_names[] = MFIB_ENTRY_NAMES_LONG;
static const char *mfib_itf_flag_long_names[] = MFIB_ITF_NAMES_LONG;
static const char *mfib_itf_flag_names[] = MFIB_ITF_NAMES_SHORT;
-#if (VPP_API_TEST_BUILTIN==0)
uword
unformat_mfib_itf_flags (unformat_input_t * input, va_list * args)
{
}
#endif
-static void vl_api_sw_interface_event_t_handler_json
- (vl_api_sw_interface_event_t * mp)
+__clib_unused static void
+vl_api_sw_interface_event_t_handler_json (vl_api_sw_interface_event_t * mp)
{
/* JSON output not supported */
}
vl_api_mac_address_t mac = { 0 };
unformat_input_t *i = vam->input;
vl_api_bd_ip_mac_add_del_t *mp;
- ip46_type_t type;
u32 bd_id;
- u8 is_ipv6 = 0;
u8 is_add = 1;
u8 bd_id_set = 0;
u8 ip_set = 0;
u8 mac_set = 0;
- u8 macaddr[6];
int ret;
mp->pci_addr = htonl (pci_addr);
mp->features = clib_host_to_net_u64 (features);
+ mp->gso_enabled = gso_enabled;
if (random_mac == 0)
clib_memcpy (mp->mac_address, mac_address, 6);
vl_api_sw_interface_ip6nd_ra_prefix_t *mp;
u32 sw_if_index;
u8 sw_if_index_set = 0;
- u32 address_length = 0;
u8 v6_address_set = 0;
vl_api_prefix_t pfx;
u8 use_default = 0;
vl_api_gre_tunnel_add_del_t *mp;
vl_api_gre_tunnel_type_t t_type;
u8 is_add = 1;
- u8 ipv4_set = 0;
- u8 ipv6_set = 0;
u8 src_set = 0;
u8 dst_set = 0;
u32 outer_fib_id = 0;
{
vat_main_t *vam = &vat_main;
vat_json_node_t *node = NULL;
- struct in_addr ip4;
- struct in6_addr ip6;
if (VAT_JSON_ARRAY != vam->json_tree.type)
{
{
unformat_input_t *i = vam->input;
vl_api_ip_probe_neighbor_t *mp;
- vl_api_address_t dst_adr;
+ vl_api_address_t dst_adr = { };
u8 int_set = 0;
u8 adr_set = 0;
u32 sw_if_index;
int_set = 1;
else if (unformat (i, "sw_if_index %d", &sw_if_index))
int_set = 1;
- else if (unformat (i, "address %U", unformat_vl_api_address, dst_adr))
+ else if (unformat (i, "address %U", unformat_vl_api_address, &dst_adr))
adr_set = 1;
else
break;
{
unformat_input_t *i = vam->input;
vl_api_ipsec_spd_entry_add_del_t *mp;
- u8 is_add = 1, is_outbound = 0, is_ipv6 = 0, is_ip_any = 1;
+ u8 is_add = 1, is_outbound = 0;
u32 spd_id = 0, sa_id = 0, protocol = 0, policy = 0;
i32 priority = 0;
u32 rport_start = 0, rport_stop = (u32) ~ 0;
;
else if (unformat (i, "laddr_start %U",
unformat_vl_api_address, &laddr_start))
- is_ip_any = 0;
+ ;
else if (unformat (i, "laddr_stop %U", unformat_vl_api_address,
&laddr_stop))
- is_ip_any = 0;
+ ;
else if (unformat (i, "raddr_start %U", unformat_vl_api_address,
&raddr_start))
- is_ip_any = 0;
+ ;
else if (unformat (i, "raddr_stop %U", unformat_vl_api_address,
&raddr_stop))
- is_ip_any = 0;
+ ;
else
if (unformat (i, "action %U", unformat_ipsec_policy_action, &policy))
{
u8 renumber = 0;
u32 instance = ~0;
u32 count = 1, jj;
- int ret;
+ int ret = -1;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
u8 prefix_set = 0;
u32 vrf_id = ~0;
u8 is_add = 1;
- u8 is_ipv6 = 0;
int ret;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
unformat_input_t *i = vam->input;
vl_api_address_family_t af;
vl_api_set_punt_t *mp;
- u32 ipv = ~0;
u32 protocol = ~0;
u32 port = ~0;
int is_add = 1;
- u8 is_ip4 = 1;
int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
vat_main_t *vam = &vat_main;
vat_json_node_t *node = NULL;
- struct in_addr ip4;
if (VAT_JSON_ARRAY != vam->json_tree.type)
{
static void
vat_find_plugin_path ()
{
- extern char *vat_plugin_path;
char *p, path[PATH_MAX];
int rv;
u8 *s;
int exec (vat_main_t * vam);
/* Plugin API library functions */
-char *vat_plugin_path;
-char *vat_plugin_name_filter;
+extern char *vat_plugin_path;
+extern char *vat_plugin_name_filter;
void vat_plugin_api_reference (void);
uword unformat_sw_if_index (unformat_input_t * input, va_list * args);
uword unformat_ip4_address (unformat_input_t * input, va_list * args);
vcl_test_read (int fd, uint8_t * buf, uint32_t nbytes,
vcl_test_stats_t * stats)
{
- int rx_bytes, errno_val;
+ int rx_bytes;
do
{
static inline int
vcl_test_read_ds (int fd, vppcom_data_segments_t ds, vcl_test_stats_t * stats)
{
- int rx_bytes, errno_val;
+ int rx_bytes;
do
{
static int
vtc_cfg_sync (vcl_test_session_t * ts)
{
- vcl_test_client_main_t *vcm = &vcl_client_main;
vcl_test_cfg_t *rx_cfg = (vcl_test_cfg_t *) ts->rxbuf;
int rx_bytes, tx_bytes;
vtc_worker_init (vcl_test_client_worker_t * wrk)
{
vcl_test_client_main_t *vcm = &vcl_client_main;
- vcl_test_session_t *ctrl = &vcm->ctrl_session;
vcl_test_cfg_t *cfg = &wrk->cfg;
vcl_test_session_t *ts;
- uint32_t i, n;
- int rv, nbytes;
+ uint32_t n;
+ int rv;
__wrk_index = wrk->wrk_index;
vcl_test_session_t *ctrl = &vcm->ctrl_session;
vcl_test_cfg_t *cfg = &ctrl->cfg;
vcl_test_client_worker_t *wrk;
- vcl_test_session_t *ts;
- int tx_bytes, rv;
- uint32_t i, n, sidx, n_conn, n_conn_per_wrk;
+ uint32_t i, n_conn, n_conn_per_wrk;
vtinf ("%s-directional Stream Test Starting!",
ctrl->cfg.test == VCL_TEST_TYPE_BI ? "Bi" : "Uni");
{
vcl_test_client_main_t *vcm = &vcl_client_main;
vcl_test_session_t *ctrl = &vcm->ctrl_session;
- int rv, errno_val;
+ int rv;
vcm->n_workers = 1;
vcl_test_cfg_init (&ctrl->cfg);
static void
vl_api_show_threads_t_handler (vl_api_show_threads_t * mp)
{
- vlib_main_t *vm = vlib_get_main ();
- int rv = 0, count = 0;
+ int count = 0;
#if !defined(__powerpc64__)
vl_api_registration_t *reg;
u32 arg_len;
int rv;
int (*fp) (vat_main_t *);
- api_main_t *am = &api_main;
maybe_register_api_client (vam);
unformat_sw_if_index (unformat_input_t * input, va_list * args)
{
void *vam_unused = va_arg (*args, void *);
+ (void) (vam_unused);
u32 *result = va_arg (*args, u32 *);
vnet_main_t *vnm = vnet_get_main ();
u32 sw_if_index = ~0;
FINISH;
}
-static void *vl_api_sw_interface_set_rx_placement_t_print
+__clib_unused
+ static void *vl_api_sw_interface_set_rx_placement_t_print
(vl_api_sw_interface_set_rx_placement_t * mp, void *handle)
{
u8 *s;
FINISH;
}
-static void *vl_api_sw_interface_rx_placement_dump_t_print
+__clib_unused
+ static void *vl_api_sw_interface_rx_placement_dump_t_print
(vl_api_sw_interface_rx_placement_dump_t * mp, void *handle)
{
u8 *s;
FINISH;
}
-static void *vl_api_bd_ip_mac_dump_t_print
+__clib_unused
+ static void *vl_api_bd_ip_mac_dump_t_print
(vl_api_bd_ip_mac_dump_t * mp, void *handle)
{
u8 *s;
FINISH;
}
-static void *vl_api_virtio_pci_create_t_print
+__clib_unused
+ static void *vl_api_virtio_pci_create_t_print
(vl_api_virtio_pci_create_t * mp, void *handle)
{
u8 *s;
FINISH;
}
-static void *vl_api_virtio_pci_delete_t_print
+__clib_unused
+ static void *vl_api_virtio_pci_delete_t_print
(vl_api_virtio_pci_delete_t * mp, void *handle)
{
u8 *s;
FINISH;
}
-static void *vl_api_sw_interface_virtio_pci_dump_t_print
+__clib_unused
+ static void *vl_api_sw_interface_virtio_pci_dump_t_print
(vl_api_sw_interface_virtio_pci_dump_t * mp, void *handle)
{
u8 *s;
FINISH;
}
-static void *vl_api_sw_interface_bond_dump_t_print
+__clib_unused
+ static void *vl_api_sw_interface_bond_dump_t_print
(vl_api_sw_interface_bond_dump_t * mp, void *handle)
{
u8 *s;
FINISH;
}
-static void *vl_api_sw_interface_slave_dump_t_print
+__clib_unused
+ static void *vl_api_sw_interface_slave_dump_t_print
(vl_api_sw_interface_slave_dump_t * mp, void *handle)
{
u8 *s;
s = format (s, "instance %d ", ntohl (mp->tunnel.instance));
- if (mp->tunnel.type == GRE_TUNNEL_TYPE_TEB)
+ if (mp->tunnel.type == GRE_API_TUNNEL_TYPE_TEB)
s = format (s, "teb ");
- if (mp->tunnel.type == GRE_TUNNEL_TYPE_ERSPAN)
+ if (mp->tunnel.type == GRE_API_TUNNEL_TYPE_ERSPAN)
s = format (s, "erspan %d ", ntohs (mp->tunnel.session_id));
if (mp->tunnel.outer_fib_id)
FINISH;
}
-static void *vl_api_show_threads_t_print
+__clib_unused
+ static void *vl_api_show_threads_t_print
(vl_api_show_threads_t * mp, void *handle)
{
u8 *s;
static void *vl_api_app_namespace_add_del_t_print
(vl_api_app_namespace_add_del_t * mp, void *handle)
{
- u8 *s, *ns_id = 0;
+ u8 *s;
u8 len = clib_min (mp->namespace_id_len,
ARRAY_LEN (mp->namespace_id) - 1);
mp->namespace_id[len] = 0;
FINISH;
}
-static void *vl_api_ip_container_proxy_add_del_t_print
+__clib_unused
+ static void *vl_api_ip_container_proxy_add_del_t_print
(vl_api_ip_container_proxy_add_del_t * mp, void *handle)
{
u8 *s;
#include <vpp/api/types.h>
#include <vat/vat.h>
+const vl_api_mac_address_t VL_API_ZERO_MAC_ADDRESS;
+const vl_api_address_t VL_API_ZERO_ADDRESS;
+
u8 *
format_vl_api_address_family (u8 * s, va_list * args)
{
#include <vpp/api/vpe_all_api_h.h>
#undef vl_typedefs
-const vl_api_mac_address_t VL_API_ZERO_MAC_ADDRESS;
-const vl_api_address_t VL_API_ZERO_ADDRESS;
+extern const vl_api_mac_address_t VL_API_ZERO_MAC_ADDRESS;
+extern const vl_api_address_t VL_API_ZERO_ADDRESS;
extern uword unformat_vl_api_mac_address (unformat_input_t * input, va_list * args);
extern uword unformat_vl_api_address_family (unformat_input_t * input, va_list * args);
stat_segment_main_t *sm = &stat_segment_main;
stat_segment_shared_header_t *shared_header = sm->shared_header;
stat_segment_directory_entry_t e;
- hash_pair_t *hp;
ASSERT (shared_header);
{
stat_segment_main_t *sm = &stat_segment_main;
stat_segment_shared_header_t *shared_header;
- stat_segment_directory_entry_t *ep;
void *oldheap;
ssize_t memory_size;
int mfd;
vlib_cli_command_t * cmd)
{
stat_segment_main_t *sm = &stat_segment_main;
- counter_t *counter;
- hash_pair_t *p;
- stat_segment_directory_entry_t *show_data, *this;
- int i, j;
+ stat_segment_directory_entry_t *show_data;
+ int i;
int verbose = 0;
- u8 *s;
if (unformat (input, "verbose"))
verbose = 1;
static inline void
update_node_counters (stat_segment_main_t * sm)
{
- vlib_main_t *vm = vlib_mains[0];
vlib_main_t **stat_vms = 0;
vlib_node_t ***node_dups = 0;
int i, j;
for (j = 0; j < vec_len (node_dups); j++)
{
vlib_node_t **nodes = node_dups[j];
- u32 l = vec_len (nodes);
for (i = 0; i < vec_len (nodes); i++)
{
stat_segment_shared_header_t *shared_header = sm->shared_header;
vlib_main_t *vm = vlib_mains[0];
f64 vector_rate;
- u64 input_packets, last_input_packets;
+ u64 input_packets;
f64 dt, now;
vlib_main_t *this_vlib_main;
int i, start;