While we're at it, ASan complains about https://gerrit.fd.io/r/c/vpp/+/30228/3/src/vppinfra/cpu.h#94 And I think it is right, 'r->name' is a NULL-terminated C-string as far as I can tell, not a vector (hence 'vec_len(r->name)' is wrong). Shouldn't it be a plain strcmp() instead?
Best ben > -----Original Message----- > From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Ole Troan > Sent: mercredi 27 janvier 2021 14:50 > To: Radu Nicolau <radu.nico...@intel.com> > Cc: vpp-dev <vpp-dev@lists.fd.io> > Subject: [vpp-dev] vlib: startup multi-arch variant configuration fix for > interfaces > > Hi Radu, > > Looks like your patch: > https://gerrit.fd.io/r/c/vpp/+/30228 > > Introduces an unfortunate coupling between VLIB and VNET. > Can you see if you can find a way to avoid calling into VNET from VLIB? > > Best regards, > Ole > > static_always_inline void > -vlib_update_nr_variant_default (vlib_node_registration_t * nr, u8 * > variant) > +vlib_update_nr_variant_default (vlib_node_fn_registration_t * fnr, > + u8 * variant) > { > - vlib_node_fn_registration_t *fnr = nr->node_fn_registrations; > vlib_node_fn_registration_t *p_reg = 0; > vlib_node_fn_registration_t *v_reg = 0; > u32 tmp; > @@ -127,6 +128,8 @@ vlib_early_node_config (vlib_main_t * vm, > unformat_input_t * input) > { > clib_error_t *error = 0; > vlib_node_registration_t *nr, **all; > + vnet_device_class_t *c; > + vnet_main_t *vnm = vnet_get_main (); > unformat_input_t sub_input; > uword *hash = 0, *p; > u8 *variant = 0; > @@ -161,10 +164,20 @@ vlib_early_node_config (vlib_main_t * vm, > unformat_input_t * input) > nr = vm->node_main.node_registrations; > while (nr) > { > - vlib_update_nr_variant_default (nr, variant); > + vlib_update_nr_variant_default (nr- > >node_fn_registrations, > + variant); > nr = nr->next_registration; > } > > + /* also apply it to interfaces */ > + c = vnm->device_class_registrations; > + while (c) > + { > + vlib_update_nr_variant_default (c->tx_fn_registrations, > + variant); > + c = c->next_class_registration; > + } > + > vec_free (variant); > } > }
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18604): https://lists.fd.io/g/vpp-dev/message/18604 Mute This Topic: https://lists.fd.io/mt/80157105/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-