Inline...

Thanks… Dave

From: Jon Loeliger [mailto:j...@netgate.com]
Sent: Thursday, February 23, 2017 9:27 AM
To: Dave Barach (dbarach) <dbar...@cisco.com>
Cc: vpp-dev <vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] Loopback Interface Names

Dave,

Thanks for taking the time to help me here!

On Wed, Feb 22, 2017 at 4:47 PM, Dave Barach (dbarach) 
<dbar...@cisco.com<mailto:dbar...@cisco.com>> wrote:
You would certainly have to rewrite vnet_create_loopback_interface(...) a 
little bit. That’s not necessarily a bad thing.

Yeah, I figured as much on that front... :-)  I'm not afraid of
giving it a swing.

Please brain-police the instance number: flunk attempts to create specific 
loopback instances (e.g. loop0) more than once, and so forth. Bitmap, plus some 
upper limit (maybe 16k?) on the loopback instance number.

Can do.  Two questions.  If a loopback interface is deleted,
would that free-up the instance number for re-use?  Or is
there lingering reason to never reuse an instance number?

>>> Especially in multi-core situations, some care is required. I’m generally a 
>>> fan of setting interfaces admin-down, vs. actually deleting them.

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...?

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);
}

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.

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...
HTH… Dave

Thanks,
jdl

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...

_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to