On Mon, Feb 5, 2018 at 9:55 AM, Jon Loeliger <j...@netgate.com> wrote:
> > > >> I think we must check and reject instance misuse for this to be >> acceptable. I doubt the renumber is really used much for vhost and tap >> interface (others please correct me if not true). >> > > We do use them on every call we make to these functions. > As well as on loopbacks. Knowing what object (by name) will b > created is essential for us. > > >> >> > In your previous patch set #1, the usage of a bitmap to track instance >> usage seem a reasonable solution. It does imply we will never use “natural” >> instance and would always use the instance allocated from the bitmap and >> stored in the tunnel struct. >> > > That said, we can combine the two approaches. That is, use the > show_instance_by_real_instance vector for knowing what name to use, > but also use a bitmap to record what was used and allocated. > > One question on the bitmap approach. It had a hard-coded upper limit of > 16K > bits in my previous patch. Are people OK with that? It is arbitrary, and > could > be larger. It simply depends on how much memory folks are willing to spend > recording in-use bits. That or a search of the show_by_real vector. Or we > could convert to a hash-map to check "in-use" status. > > Preference? > John, Also as a point of information, I'd like to follow this approach for GRE as well as soon as we agree on an approach here! Thanks! jdl
_______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev