Use thread local storage for thread index
[vpp.git] / src / vnet / unix / tapcli.c
index 25c930c..0fc62f6 100644 (file)
@@ -355,8 +355,7 @@ static uword tapcli_rx_iface(vlib_main_t * vm,
     to_next++;
     n_left_to_next--;
 
-    vnet_feature_start_device_input_x1 (ti->sw_if_index, &next_index, 
-                                        b_first, 0);
+    vnet_feature_start_device_input_x1 (ti->sw_if_index, &next_index, b_first);
 
     vlib_validate_buffer_enqueue_x1 (vm, node, next,
                                      to_next, n_left_to_next,
@@ -367,7 +366,7 @@ static uword tapcli_rx_iface(vlib_main_t * vm,
       vlib_increment_combined_counter (
           vnet_main.interface_main.combined_sw_if_counters
           + VNET_INTERFACE_COUNTER_RX,
-          os_get_cpu_number(), ti->sw_if_index,
+          vlib_get_thread_index(), ti->sw_if_index,
           1, n_bytes_in_packet);
 
       if (PREDICT_FALSE(n_trace > 0)) {
@@ -1436,7 +1435,8 @@ done:
 
 VLIB_CLI_COMMAND (tap_connect_command, static) = {
     .path = "tap connect",
-    .short_help = "tap connect <intfc-name> [hwaddr <addr>]",
+    .short_help =
+       "tap connect <intfc-name> [address <ip-addr>/mw] [hwaddr <addr>]",
     .function = tap_connect_command_fn,
 };