On Thu, Feb 23, 2017 at 8:53 AM, Dave Barach (dbarach) <dbar...@cisco.com> wrote:
> > >>> Especially in multi-core situations, some care is required. I’m > generally a fan of setting interfaces admin-down, vs. actually deleting > them. > Ah, I see. Check. (So, for lack of atomic_inc() or visible locking of some form, the function vnet_create_loopback_interface() is already not safely reentrant due to the static u32 instance number. Is this function possibly called in a multi-core senario? (I'm not sure what the global calling structure and threading model around this code is. (Sorry.))) > And second, is there a bit-vector implementation around? > > > > >>> clib_bitmap_XXX(...), used in lots of places > > > > I would assume so and I just need to go looking...? > Sweet. Thanks. > I still need to resolve the name expectations; that is, expecting > > "Loopback" to be the base, and not "loop". Does one of these > > options make more sense here? > > > > >>> This is an easy one. The string “loop” exists in exactly one place: > > > > static u8 * > > format_simulated_ethernet_name (u8 * s, va_list * args) > > { > > u32 dev_instance = va_arg (*args, u32); > > return format (s, "loop%d", dev_instance); > > } > Sure. (Thanks.) My real question is will existing VPP users and test tolerate me just patching that to be s/loop/Loopback/. I suspect "No". > 1) Have the API create call supply the desired name directly, > > defaulting to "loop"-names if none are specified. > > > > >>> Would it satisfy the cash customers to change the base string to > “Loopback” - perhaps based on a config parameter - and add the desired > instance number (not a free-form string) to the API? That will be less of a > mess to implement. > Absolutely. That was my preferred approach as well. > 2) Have a loopback-module-global-ish config variable stating > > to be in "loop" or "Loopback" mode. Mode can be set via > > new loopback API config call, or via VPP startup config setting. > > > > >>> could be done, of course, see (3) below... > > > > 3) Tell our users to get used to the New "loop" World Order? :-) > > > > >>> This would be a good topic for the vpp project call next week... I’ll > add it to the agenda... > > So, yeah, that would be good. Sorry, I will be unable to make that meeting. > PS -- At the risk of foretelling the future, bridge names are going to > > have this same naming issue, right? 'Cuz those are next up! > > > > >>> Copying John Lo so he can stock up on headache remedies... > Excellent! Thanks, jdl
_______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev