X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fvnet%2Fbonding%2Fdevice.c;h=0ca7f9eab3140157a5edd29f13125d6692ee9cca;hb=6b7e2332fbf74e043394699fd5d145af026d3719;hp=e7d6cdad407d8312814d2e0d11ca07cabac0fab1;hpb=a3d5986a35743a3ca1020155bed8267b5246d155;p=vpp.git diff --git a/src/vnet/bonding/device.c b/src/vnet/bonding/device.c index e7d6cdad407..0ca7f9eab31 100644 --- a/src/vnet/bonding/device.c +++ b/src/vnet/bonding/device.c @@ -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; } @@ -464,7 +464,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 +683,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 +745,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; }