bonding: traffic traversing the wrong interface
[vpp.git] / src / vnet / bonding / device.c
index e288c57..bcd7e58 100644 (file)
@@ -455,6 +455,7 @@ bond_tx_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
 
       n_left -= 1;
       b += 1;
+      h += 1;
     }
 }
 
@@ -464,7 +465,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;
 
@@ -683,7 +684,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);
@@ -751,11 +752,6 @@ done:
          ptd->per_port_queue[p].n_buffers = 0;
        }
     }
-
-  vlib_increment_simple_counter (vnet_main.interface_main.sw_if_counters
-                                + VNET_INTERFACE_COUNTER_TX, thread_index,
-                                bif->sw_if_index, frame->n_vectors);
-
   return frame->n_vectors;
 }