interface: let drivers control polling when down 27/30527/8
authorMohammed Hawari <mohammed@hawari.fr>
Mon, 21 Dec 2020 17:19:46 +0000 (18:19 +0100)
committerDamjan Marion <dmarion@me.com>
Fri, 22 Jan 2021 09:06:32 +0000 (09:06 +0000)
Change-Id: I03e164d8d5a329497f422e99f8b0058135241b4e
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix

src/vlib/node.c
src/vnet/interface/runtime.c

index 13889d1..25e249b 100644 (file)
@@ -478,6 +478,8 @@ register_node (vlib_main_t * vm, vlib_node_registration_t * r)
     if (vec_len (n->runtime_data) > 0)
       clib_memcpy (rt->runtime_data, n->runtime_data,
                   vec_len (n->runtime_data));
+    else
+      clib_memset (rt->runtime_data, 0, VLIB_NODE_RUNTIME_DATA_SIZE);
 
     vec_free (n->runtime_data);
   }
index f4c09be..019d3ee 100644 (file)
@@ -103,20 +103,12 @@ vnet_hw_if_update_runtime_data (vnet_main_t *vnm, u32 hw_if_index)
   pool_foreach (rxq, im->hw_if_rx_queues)
     {
       u32 ti = rxq->thread_index;
-      uword flags;
 
       hi = vnet_get_hw_interface (vnm, rxq->hw_if_index);
 
       if (hi->input_node_index != node_index)
        continue;
 
-      flags = vnet_sw_interface_get_flags (vnm, hi->sw_if_index);
-      if ((flags & VNET_SW_INTERFACE_FLAG_ADMIN_UP) == 0)
-       {
-         log_debug ("skip interface %v (admin down)", hi->name);
-         continue;
-       }
-
       if (rxq->mode == VNET_HW_IF_RX_MODE_INTERRUPT ||
          rxq->mode == VNET_HW_IF_RX_MODE_ADAPTIVE)
        last_int = clib_max (last_int, rxq - im->hw_if_rx_queues);