Typos. A bunch of typos I've been collecting.
[vpp.git] / src / vnet / bonding / device.c
index 13ff644..d333dfc 100644 (file)
@@ -72,7 +72,7 @@ format_bond_interface_name (u8 * s, va_list * args)
   bond_main_t *bm = &bond_main;
   bond_if_t *bif = pool_elt_at_index (bm->interfaces, dev_instance);
 
-  s = format (s, "BondEthernet%lu", bif->dev_instance);
+  s = format (s, "BondEthernet%lu", bif->id);
 
   return s;
 }
@@ -104,17 +104,6 @@ bond_set_l2_mode_function (vnet_main_t * vnm,
        ethernet_set_rx_redirect (vnm, sif_hw, 1);
       }
     }
-  else if ((bif_hw->l2_if_count == 0) && (l2_if_adjust == -1))
-    {
-      /* Just removed last L2 subinterface on this port */
-      vec_foreach (sw_if_index, bif->slaves)
-      {
-       sif_hw = vnet_get_sup_hw_interface (vnm, *sw_if_index);
-
-       /* Allow ip packets to go directly to ip4-input etc */
-       ethernet_set_rx_redirect (vnm, sif_hw, 0);
-      }
-    }
 
   return 0;
 }
@@ -464,7 +453,7 @@ bond_hash_to_port (u32 * h, u32 n_left, u32 n_slaves, int use_modulo_shortcut)
   u32 mask = n_slaves - 1;
 
 #ifdef CLIB_HAVE_VEC256
-  /* only lower 16 bits of hash due to single precision fp arithmetics */
+  /* only lower 16 bits of hash due to single precision fp arithmetic */
   u32x8 mask8, sc8u, h8a, h8b;
   f32x8 sc8f;
 
@@ -658,7 +647,7 @@ VNET_DEVICE_CLASS_TX_FN (bond_dev_class) (vlib_main_t * vm,
 
   if (PREDICT_FALSE (bif->admin_up == 0))
     {
-      vlib_buffer_free (vm, vlib_frame_args (frame), frame->n_vectors);
+      vlib_buffer_free (vm, vlib_frame_vector_args (frame), frame->n_vectors);
       vlib_increment_simple_counter (vnet_main.interface_main.sw_if_counters +
                                     VNET_INTERFACE_COUNTER_DROP,
                                     thread_index, bif->sw_if_index,
@@ -671,7 +660,7 @@ VNET_DEVICE_CLASS_TX_FN (bond_dev_class) (vlib_main_t * vm,
   n_slaves = vec_len (bif->active_slaves);
   if (PREDICT_FALSE (n_slaves == 0))
     {
-      vlib_buffer_free (vm, vlib_frame_args (frame), frame->n_vectors);
+      vlib_buffer_free (vm, vlib_frame_vector_args (frame), frame->n_vectors);
       vlib_increment_simple_counter (vnet_main.interface_main.sw_if_counters +
                                     VNET_INTERFACE_COUNTER_DROP,
                                     thread_index, bif->sw_if_index,
@@ -683,7 +672,7 @@ VNET_DEVICE_CLASS_TX_FN (bond_dev_class) (vlib_main_t * vm,
 
   vlib_get_buffers (vm, from, bufs, n_left);
 
-  /* active-backup mode, ship everyting to first sw if index */
+  /* active-backup mode, ship everything to first sw if index */
   if ((bif->lb == BOND_LB_AB) || PREDICT_FALSE (n_slaves == 1))
     {
       sw_if_index = *vec_elt_at_index (bif->active_slaves, 0);
@@ -745,8 +734,8 @@ done:
          f = vnet_get_frame_to_sw_interface (vnm, sw_if_index);
          f->n_vectors = ptd->per_port_queue[p].n_buffers;
          to_next = vlib_frame_vector_args (f);
-         clib_memcpy (to_next, ptd->per_port_queue[p].buffers,
-                      f->n_vectors * sizeof (u32));
+         clib_memcpy_fast (to_next, ptd->per_port_queue[p].buffers,
+                           f->n_vectors * sizeof (u32));
          vnet_put_frame_to_sw_interface (vnm, sw_if_index, f);
          ptd->per_port_queue[p].n_buffers = 0;
        }