Re: [vpp-dev] min_log2 abuse

2020-05-12 Thread Dave Barach via lists.fd.io
dev Subject: Re: [vpp-dev] min_log2 abuse Am Di., 12. Mai 2020 um 13:17 Uhr schrieb Dave Barach (dbarach) mailto:dbar...@cisco.com>>: Dear Andreas, Do you have a handy list of places which convert netmasks to lengths? Regardless of what one might do with min_log2, we ought to clean up thos

Re: [vpp-dev] min_log2 abuse

2020-05-12 Thread Andreas Schultz
of clib.h Andreas > > > Dave > > > > *From:* vpp-dev@lists.fd.io *On Behalf Of *Andreas > Schultz > *Sent:* Tuesday, May 12, 2020 5:42 AM > *To:* vpp-dev > *Subject:* [vpp-dev] min_log2 abuse > > > > Hi, > > > > There are few places in VP

Re: [vpp-dev] min_log2 abuse

2020-05-12 Thread Damjan Marion via lists.fd.io
> On 12 May 2020, at 14:37, Andreas Schultz > wrote: > > > Am Di., 12. Mai 2020 um 13:53 Uhr schrieb Damjan Marion >: > > > > On 12 May 2020, at 11:41, Andreas Schultz > > wrote: > > > > Hi, > > > > There are few places in

Re: [vpp-dev] min_log2 abuse

2020-05-12 Thread Andreas Schultz
Am Di., 12. Mai 2020 um 13:53 Uhr schrieb Damjan Marion : > > > > On 12 May 2020, at 11:41, Andreas Schultz < > andreas.schu...@travelping.com> wrote: > > > > Hi, > > > > There are few places in VPP (most notable when trying to convert a > netmask into a length) that can pass 0 (zero) into

Re: [vpp-dev] min_log2 abuse

2020-05-12 Thread Damjan Marion via lists.fd.io
> On 12 May 2020, at 11:41, Andreas Schultz > wrote: > > Hi, > > There are few places in VPP (most notable when trying to convert a netmask > into a length) that can pass 0 (zero) into min_log2 and expect to get a > meaningful result. > > Obviously log2(0) is undefined. It turns out that

Re: [vpp-dev] min_log2 abuse

2020-05-12 Thread Dave Barach via lists.fd.io
, 2020 5:42 AM To: vpp-dev Subject: [vpp-dev] min_log2 abuse Hi, There are few places in VPP (most notable when trying to convert a netmask into a length) that can pass 0 (zero) into min_log2 and expect to get a meaningful result. Obviously log2(0) is undefined. It turns out that this also

[vpp-dev] min_log2 abuse

2020-05-12 Thread Andreas Schultz
Hi, There are few places in VPP (most notable when trying to convert a netmask into a length) that can pass 0 (zero) into min_log2 and expect to get a meaningful result. Obviously log2(0) is undefined. It turns out that this also applies to the return of min_log2. Under the hood the function