build: add -Wall and -fno-common, fix reported issues
Type: refactor Change-Id: I8489ccd54411c2aa9355439c5641dc31012c64a2 Signed-off-by: Benoît Ganne <bganne@cisco.com> Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Benoît Ganne
committed by
Damjan Marion
parent
4168c4d914
commit
49ee68443d
@ -22,20 +22,26 @@ endif
|
||||
|
||||
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_common_cflags = \
|
||||
-g \
|
||||
-DFORTIFY_SOURCE=2 \
|
||||
-fstack-protector \
|
||||
-fPIC \
|
||||
-Wall \
|
||||
-Werror \
|
||||
-fno-common
|
||||
|
||||
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_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_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_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
|
||||
|
@ -462,6 +462,9 @@ icmpr_add_external_region (void * *addr, uint32_t size, int *fd,
|
||||
|
||||
err = ftruncate (rfd, size);
|
||||
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
raddr = mmap (NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, rfd, 0);
|
||||
|
||||
*addr = raddr;
|
||||
@ -500,7 +503,6 @@ on_interrupt (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
|
||||
|
||||
int err = MEMIF_ERR_SUCCESS, ret_val;
|
||||
uint16_t rx = 0, tx = 0;
|
||||
uint16_t fb = 0;
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
|
||||
@ -579,8 +581,6 @@ on_interrupt1 (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
|
||||
int err = MEMIF_ERR_SUCCESS, ret_val;
|
||||
int i;
|
||||
uint16_t rx, tx;
|
||||
uint16_t fb;
|
||||
uint16_t pck_seq;
|
||||
|
||||
do
|
||||
{
|
||||
@ -657,7 +657,6 @@ icmpr_memif_create (long index, long mode, char *s)
|
||||
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;
|
||||
@ -830,8 +829,6 @@ icmpr_send (long index, long packet_num, char *hw, char *ip)
|
||||
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];
|
||||
@ -977,9 +974,8 @@ done:
|
||||
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;
|
||||
|
@ -372,7 +372,6 @@ on_interrupt (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
|
||||
|
||||
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 */
|
||||
|
||||
@ -457,10 +456,8 @@ on_interrupt0 (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
|
||||
|
||||
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
|
||||
@ -475,7 +472,7 @@ on_interrupt0 (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
|
||||
goto error;
|
||||
}
|
||||
|
||||
prev_i = i = 0;
|
||||
i = 0;
|
||||
|
||||
/* loop while there are RX buffers to be processed */
|
||||
while (rx)
|
||||
@ -522,7 +519,6 @@ on_interrupt0 (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
|
||||
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);
|
||||
@ -570,8 +566,6 @@ on_interrupt1 (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
|
||||
int err = MEMIF_ERR_SUCCESS, ret_val;
|
||||
int i;
|
||||
uint16_t rx, tx;
|
||||
uint16_t fb;
|
||||
uint16_t pck_seq;
|
||||
|
||||
do
|
||||
{
|
||||
@ -639,7 +633,6 @@ icmpr_memif_create (long index, long mode, char *s)
|
||||
|
||||
/* 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;
|
||||
@ -1106,7 +1099,6 @@ error:
|
||||
int
|
||||
user_input_handler ()
|
||||
{
|
||||
int i;
|
||||
char *in = (char *) malloc (256);
|
||||
char *ui = fgets (in, 256, stdin);
|
||||
char *end;
|
||||
@ -1223,9 +1215,8 @@ done:
|
||||
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));
|
||||
|
@ -112,7 +112,6 @@ pthread_t thread[MAX_THREADS];
|
||||
void
|
||||
user_signal_handler (int sig)
|
||||
{
|
||||
sig = sig;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -375,9 +374,8 @@ memif_rx_interrupt (void *ptr)
|
||||
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);
|
||||
@ -602,7 +600,6 @@ icmpr_memif_create (long index)
|
||||
|
||||
/* 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;
|
||||
@ -765,7 +762,6 @@ error:
|
||||
int
|
||||
user_input_handler ()
|
||||
{
|
||||
int i;
|
||||
char *in = (char *) malloc (256);
|
||||
char *ui = fgets (in, 256, stdin);
|
||||
char *end;
|
||||
@ -830,9 +826,8 @@ done:
|
||||
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;
|
||||
|
@ -330,9 +330,7 @@ on_interrupt (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
|
||||
|
||||
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
|
||||
@ -413,9 +411,7 @@ on_interrupt0 (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
|
||||
|
||||
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
|
||||
@ -497,8 +493,6 @@ on_interrupt1 (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
|
||||
int err = MEMIF_ERR_SUCCESS, ret_val;
|
||||
int i;
|
||||
uint16_t rx, tx;
|
||||
uint16_t fb;
|
||||
uint16_t pck_seq;
|
||||
|
||||
do
|
||||
{
|
||||
@ -565,7 +559,6 @@ icmpr_memif_create (long index, long mode, char *s)
|
||||
|
||||
/* 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;
|
||||
@ -1051,7 +1044,6 @@ error:
|
||||
int
|
||||
user_input_handler ()
|
||||
{
|
||||
int i;
|
||||
char *in = (char *) malloc (256);
|
||||
char *ui = fgets (in, 256, stdin);
|
||||
char *end;
|
||||
@ -1167,9 +1159,8 @@ done:
|
||||
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));
|
||||
|
@ -458,7 +458,6 @@ int
|
||||
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;
|
||||
|
@ -290,6 +290,7 @@ on_interrupt (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
|
||||
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;
|
||||
@ -311,7 +312,6 @@ on_interrupt (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
|
||||
&(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;
|
||||
@ -338,7 +338,6 @@ icmpr_memif_create (int is_master)
|
||||
{
|
||||
/* 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;
|
||||
|
@ -173,8 +173,6 @@ START_TEST (test_create_master)
|
||||
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)
|
||||
@ -584,7 +582,7 @@ END_TEST
|
||||
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;
|
||||
|
@ -46,13 +46,13 @@ int
|
||||
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);
|
||||
|
||||
|
@ -95,7 +95,7 @@ macro(vpp_library_set_multiarch_sources lib)
|
||||
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}>)
|
||||
|
@ -20,7 +20,6 @@ macro(add_vpp_library lib)
|
||||
)
|
||||
|
||||
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()
|
||||
|
@ -45,7 +45,6 @@ macro(add_vpp_plugin name)
|
||||
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()
|
||||
|
@ -51,7 +51,6 @@
|
||||
#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);
|
||||
|
@ -157,6 +157,7 @@ typedef struct
|
||||
} 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);
|
||||
|
@ -59,7 +59,7 @@ typedef struct
|
||||
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)
|
||||
|
@ -60,7 +60,7 @@ typedef struct
|
||||
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)
|
||||
|
@ -37,7 +37,7 @@ typedef enum
|
||||
MARKER_N_PACKET_TEMPLATES,
|
||||
} marker_packet_template_id_t;
|
||||
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
LACP_PROCESS_EVENT_START = 1,
|
||||
LACP_PROCESS_EVENT_STOP = 2,
|
||||
|
@ -177,13 +177,14 @@ static int api_lb_add_del_vip (vat_main_t * vam)
|
||||
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)) {
|
||||
@ -196,7 +197,7 @@ static int api_lb_add_del_vip (vat_main_t * vam)
|
||||
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;
|
||||
@ -254,6 +255,7 @@ static int api_lb_add_del_vip (vat_main_t * vam)
|
||||
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);
|
||||
@ -269,7 +271,6 @@ static int api_lb_add_del_as (vat_main_t * vam)
|
||||
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;
|
||||
|
@ -226,7 +226,6 @@ api_nsim_configure (vat_main_t * vam)
|
||||
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;
|
||||
|
||||
|
@ -35,6 +35,7 @@ unsigned char def_str[] =
|
||||
"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 */
|
||||
|
@ -66,7 +66,7 @@ typedef struct
|
||||
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;
|
||||
|
@ -29,6 +29,7 @@ unsigned char keyword_str[] = "End.AM";
|
||||
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 */
|
||||
|
@ -46,7 +46,7 @@ typedef struct
|
||||
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;
|
||||
|
@ -36,6 +36,7 @@ unsigned char def_str[] =
|
||||
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,
|
||||
|
@ -68,7 +68,7 @@ typedef struct
|
||||
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;
|
||||
|
@ -419,7 +419,7 @@ wait_for_state_change (udp_echo_main_t * utm, connection_state_t state)
|
||||
|
||||
u64 server_bytes_received, server_bytes_sent;
|
||||
|
||||
static void *
|
||||
__clib_unused static void *
|
||||
cut_through_thread_fn (void *arg)
|
||||
{
|
||||
app_session_t *s;
|
||||
@ -716,7 +716,7 @@ send_test_chunk (udp_echo_main_t * utm, app_session_t * s, u32 bytes)
|
||||
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);
|
||||
@ -807,7 +807,6 @@ static void
|
||||
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;
|
||||
|
||||
@ -1028,7 +1027,6 @@ server_handle_event_queue (udp_echo_main_t * utm)
|
||||
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);
|
||||
|
@ -398,7 +398,7 @@ format_ipsec_integ_alg (u8 * s, va_list * args)
|
||||
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 *);
|
||||
|
||||
@ -408,7 +408,7 @@ api_unformat_sw_if_index (unformat_input_t * input, va_list * args)
|
||||
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 *);
|
||||
|
||||
@ -562,12 +562,13 @@ unformat_flow_classify_table_type (unformat_input_t * input, va_list * va)
|
||||
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)
|
||||
{
|
||||
@ -1045,8 +1046,8 @@ static void vl_api_sw_interface_event_t_handler
|
||||
}
|
||||
#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 */
|
||||
}
|
||||
@ -7264,14 +7265,11 @@ api_bd_ip_mac_add_del (vat_main_t * vam)
|
||||
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;
|
||||
|
||||
|
||||
@ -7714,6 +7712,7 @@ api_virtio_pci_create (vat_main_t * vam)
|
||||
|
||||
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);
|
||||
@ -10117,7 +10116,6 @@ api_sw_interface_ip6nd_ra_prefix (vat_main_t * vam)
|
||||
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;
|
||||
@ -13228,8 +13226,6 @@ api_gre_tunnel_add_del (vat_main_t * vam)
|
||||
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;
|
||||
@ -13332,8 +13328,6 @@ static void vl_api_gre_tunnel_details_t_handler_json
|
||||
{
|
||||
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)
|
||||
{
|
||||
@ -14167,7 +14161,7 @@ api_ip_probe_neighbor (vat_main_t * vam)
|
||||
{
|
||||
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;
|
||||
@ -14179,7 +14173,7 @@ api_ip_probe_neighbor (vat_main_t * vam)
|
||||
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;
|
||||
@ -14706,7 +14700,7 @@ api_ipsec_spd_entry_add_del (vat_main_t * vam)
|
||||
{
|
||||
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;
|
||||
@ -14746,16 +14740,16 @@ api_ipsec_spd_entry_add_del (vat_main_t * vam)
|
||||
;
|
||||
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))
|
||||
{
|
||||
@ -14918,7 +14912,7 @@ api_ipsec_tunnel_if_add_del (vat_main_t * vam)
|
||||
u8 renumber = 0;
|
||||
u32 instance = ~0;
|
||||
u32 count = 1, jj;
|
||||
int ret;
|
||||
int ret = -1;
|
||||
|
||||
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
|
||||
{
|
||||
@ -20026,7 +20020,6 @@ api_ip_source_and_port_range_check_add_del (vat_main_t * vam)
|
||||
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)
|
||||
@ -20242,11 +20235,9 @@ api_set_punt (vat_main_t * vam)
|
||||
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)
|
||||
@ -20307,7 +20298,6 @@ static void vl_api_ipsec_gre_tunnel_details_t_handler_json
|
||||
{
|
||||
vat_main_t *vam = &vat_main;
|
||||
vat_json_node_t *node = NULL;
|
||||
struct in_addr ip4;
|
||||
|
||||
if (VAT_JSON_ARRAY != vam->json_tree.type)
|
||||
{
|
||||
|
@ -288,7 +288,6 @@ setup_signal_handlers (void)
|
||||
static void
|
||||
vat_find_plugin_path ()
|
||||
{
|
||||
extern char *vat_plugin_path;
|
||||
char *p, path[PATH_MAX];
|
||||
int rv;
|
||||
u8 *s;
|
||||
|
@ -230,8 +230,8 @@ void do_one_file (vat_main_t * vam);
|
||||
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);
|
||||
|
@ -404,7 +404,7 @@ static inline int
|
||||
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
|
||||
{
|
||||
@ -443,7 +443,7 @@ vcl_test_read (int fd, uint8_t * buf, uint32_t nbytes,
|
||||
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
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user