+ 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,
+ frame->n_vectors);
+ vlib_error_count (vm, node->node_index, BOND_TX_ERROR_NO_SLAVE,
+ frame->n_vectors);
+ return frame->n_vectors;
+ }
+
+ vlib_get_buffers (vm, from, bufs, n_left);
+
+ /* 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);
+
+ bond_tx_trace (vm, node, bif, bufs, frame->n_vectors, 0);
+ bond_update_sw_if_index (ptd, bif, from, bufs, &sw_if_index, n_left,
+ /* single_sw_if_index */ 1);
+ goto done;
+ }
+
+ if (bif->lb == BOND_LB_BC)
+ {
+ sw_if_index = *vec_elt_at_index (bif->active_slaves, 0);
+
+ bond_tx_inline (vm, bif, bufs, hashes, n_left, n_slaves, BOND_LB_BC);
+ bond_tx_trace (vm, node, bif, bufs, frame->n_vectors, 0);
+ bond_update_sw_if_index (ptd, bif, from, bufs, &sw_if_index, n_left,
+ /* single_sw_if_index */ 1);
+ goto done;
+ }
+
+ /* if have at least one slave on local numa node, only slaves on local numa
+ node will transmit pkts when bif->local_numa_only is enabled */
+ if (bif->n_numa_slaves >= 1)
+ n_slaves = bif->n_numa_slaves;
+
+ if (bif->lb == BOND_LB_L2)
+ bond_tx_inline (vm, bif, bufs, hashes, n_left, n_slaves, BOND_LB_L2);
+ else if (bif->lb == BOND_LB_L34)
+ bond_tx_inline (vm, bif, bufs, hashes, n_left, n_slaves, BOND_LB_L34);
+ else if (bif->lb == BOND_LB_L23)
+ bond_tx_inline (vm, bif, bufs, hashes, n_left, n_slaves, BOND_LB_L23);
+ else if (bif->lb == BOND_LB_RR)
+ bond_tx_inline (vm, bif, bufs, hashes, n_left, n_slaves, BOND_LB_RR);
+ else
+ ASSERT (0);
+
+ /* calculate port out of hash */
+ h = hashes;
+ if (BOND_MODULO_SHORTCUT (n_slaves))
+ bond_hash_to_port (h, frame->n_vectors, n_slaves, 1);
+ else
+ bond_hash_to_port (h, frame->n_vectors, n_slaves, 0);
+
+ bond_tx_trace (vm, node, bif, bufs, frame->n_vectors, h);
+
+ bond_update_sw_if_index (ptd, bif, from, bufs, hashes, frame->n_vectors,
+ /* single_sw_if_index */ 0);
+
+done:
+ for (p = 0; p < n_slaves; p++)
+ {
+ vlib_frame_t *f;
+ u32 *to_next;
+
+ sw_if_index = *vec_elt_at_index (bif->active_slaves, p);
+ if (PREDICT_TRUE (ptd->per_port_queue[p].n_buffers))