summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vnet/vnet/interface.h4
-rw-r--r--vnet/vnet/l2/l2_output.c16
-rw-r--r--vnet/vnet/map/ip4_map_t.c2
-rw-r--r--vnet/vnet/policer/node_funcs.c4
-rw-r--r--vnet/vnet/vcgn/cnat_bulk_port.c4
-rw-r--r--vpp-api-test/vat/plugin.c1
6 files changed, 22 insertions, 9 deletions
diff --git a/vnet/vnet/interface.h b/vnet/vnet/interface.h
index f441f9e1027..1ddd259a0b4 100644
--- a/vnet/vnet/interface.h
+++ b/vnet/vnet/interface.h
@@ -263,6 +263,10 @@ typedef struct vnet_hw_interface_t {
VNET_HW_INTERFACE_FLAG_SPEED_40G | \
VNET_HW_INTERFACE_FLAG_SPEED_100G)
+ /* l2output node flags */
+#define VNET_HW_INTERFACE_FLAG_L2OUTPUT_SHIFT 9
+#define VNET_HW_INTERFACE_FLAG_L2OUTPUT_MAPPED (1 << 9)
+
/* Hardware address as vector. Zero (e.g. zero-length vector) if no
address for this class (e.g. PPP). */
u8 * hw_address;
diff --git a/vnet/vnet/l2/l2_output.c b/vnet/vnet/l2/l2_output.c
index a5424866db1..02862138928 100644
--- a/vnet/vnet/l2/l2_output.c
+++ b/vnet/vnet/l2/l2_output.c
@@ -477,17 +477,27 @@ u32 l2output_create_output_node_mapping (
#if DPDK > 0
uword cpu_number;
+ hw0 = vnet_get_sup_hw_interface (vnet_main, sw_if_index);
+
cpu_number = os_get_cpu_number();
if (cpu_number)
{
+ u32 oldflags;
+ vlib_node_t *error_drop_node;
+
+ error_drop_node = vlib_get_node_by_name (vlib_main, (u8 *) "error-drop");
+ oldflags = __sync_fetch_and_or(&hw0->flags,
+ VNET_HW_INTERFACE_FLAG_L2OUTPUT_MAPPED);
+
+ if ((oldflags & VNET_HW_INTERFACE_FLAG_L2OUTPUT_MAPPED) )
+ return error_drop_node->index;
+
output_node_mapping_send_rpc (node_index, sw_if_index);
- return 0;
+ return error_drop_node->index;
}
#endif
- hw0 = vnet_get_sup_hw_interface (vnet_main, sw_if_index);
-
// dynamically create graph node arc
next = vlib_node_add_next (vlib_main,
node_index,
diff --git a/vnet/vnet/map/ip4_map_t.c b/vnet/vnet/map/ip4_map_t.c
index 07f5b19c257..7a72068143a 100644
--- a/vnet/vnet/map/ip4_map_t.c
+++ b/vnet/vnet/map/ip4_map_t.c
@@ -847,7 +847,7 @@ ip4_map_t (vlib_main_t *vm,
vlib_buffer_t *p0, *p1;
ip4_header_t *ip40, *ip41;
map_domain_t *d0, *d1;
- ip4_mapt_next_t next0, next1;
+ ip4_mapt_next_t next0 = 0, next1 = 0;
u16 ip4_len0, ip4_len1;
u8 error0, error1;
i32 dst_port0, dst_port1;
diff --git a/vnet/vnet/policer/node_funcs.c b/vnet/vnet/policer/node_funcs.c
index 3badcfdfd1f..b85418feecb 100644
--- a/vnet/vnet/policer/node_funcs.c
+++ b/vnet/vnet/policer/node_funcs.c
@@ -85,7 +85,7 @@ uword vnet_policer_inline (vlib_main_t * vm,
vlib_buffer_t * b0, * b1;
u32 next0, next1;
u32 sw_if_index0, sw_if_index1;
- u32 pi0, pi1;
+ u32 pi0 = 0, pi1 = 0;
u32 len0, len1;
u32 col0, col1;
policer_read_response_type_st * pol0, * pol1;
@@ -200,7 +200,7 @@ uword vnet_policer_inline (vlib_main_t * vm,
vlib_buffer_t * b0;
u32 next0;
u32 sw_if_index0;
- u32 pi0;
+ u32 pi0 = 0;
u32 len0;
u32 col0;
policer_read_response_type_st * pol0;
diff --git a/vnet/vnet/vcgn/cnat_bulk_port.c b/vnet/vnet/vcgn/cnat_bulk_port.c
index 67ddd255e0f..d8894eb84f5 100644
--- a/vnet/vnet/vcgn/cnat_bulk_port.c
+++ b/vnet/vnet/vcgn/cnat_bulk_port.c
@@ -315,9 +315,9 @@ void cnat_port_free_v2_bulk (
static i16 get_suiting_port_pos_from_range(cnat_portmap_v2_t *my_pm,
u16 bulk_start, i16 bulk_size, port_pair_t pair_type)
{
- i16 num_pos, num_bits, iterations;
+ i16 num_pos = 0, num_bits, iterations;
uword bulk_ports;
- i16 inc;
+ i16 inc = 0;
i16 num_uwords = bulk_size/BITS(my_pm->bm[0]);
if(PREDICT_FALSE(!num_uwords)) {
diff --git a/vpp-api-test/vat/plugin.c b/vpp-api-test/vat/plugin.c
index dca46953386..89dbad07a9f 100644
--- a/vpp-api-test/vat/plugin.c
+++ b/vpp-api-test/vat/plugin.c
@@ -178,7 +178,6 @@ int vat_plugin_init (vat_main_t * vam)
{
plugin_main_t *pm = &vat_plugin_main;
- clib_warning ("plugin-path %s", vat_plugin_path);
pm->plugin_path = format (0, "%s%c", vat_plugin_path, 0);
if (vat_plugin_name_filter)