diff options
Diffstat (limited to 'vnet')
-rw-r--r-- | vnet/vnet/devices/netmap/node.c | 5 | ||||
-rw-r--r-- | vnet/vnet/feature/feature.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/vnet/vnet/devices/netmap/node.c b/vnet/vnet/devices/netmap/node.c index 1e2a6a27..54d0aa15 100644 --- a/vnet/vnet/devices/netmap/node.c +++ b/vnet/vnet/devices/netmap/node.c @@ -153,7 +153,7 @@ netmap_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node, while (r && n_left_to_next) { - vlib_buffer_t *b0 = 0, *first_b0 = 0; + vlib_buffer_t *first_b0 = 0; u32 offset = 0; u32 bi0 = 0, first_bi0 = 0, prev_bi0; u32 next_slot_index = (cur_slot_index + 1) % ring->num_slots; @@ -171,6 +171,7 @@ netmap_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node, while (data_len && n_free_bufs) { + vlib_buffer_t *b0; /* grab free buffer */ u32 last_empty_buffer = vec_len (nm->rx_buffers[cpu_index]) - 1; @@ -233,7 +234,7 @@ netmap_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node, /* redirect if feature path enabled */ vnet_feature_start_device_input_x1 (nif->sw_if_index, &next0, - b0, 0); + first_b0, 0); /* enque and take next packet */ vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, diff --git a/vnet/vnet/feature/feature.c b/vnet/vnet/feature/feature.c index c19b3e0e..c518cc61 100644 --- a/vnet/vnet/feature/feature.c +++ b/vnet/vnet/feature/feature.c @@ -175,7 +175,7 @@ vnet_feature_enable_disable (const char *arc_name, const char *node_name, arc_index = vnet_get_feature_arc_index (arc_name); - if (arc_index == ~0) + if (arc_index == ~(u8) 0) return; cm = &fm->feature_config_mains[arc_index]; |