Re: constant for empty prefix set

2022-03-14 Thread Alexander Zubkov
t; > > > > > Let me ping this. I would like to receive a feedback on this (and some > > > other my recent) messages. > > > > > > On Sat, Jan 1, 2022 at 9:45 PM Alexander Zubkov wrote: > > > > > > > > Hi, > > > > > > > &g

Re: constant for empty prefix set

2022-03-04 Thread Alexander Zubkov
Hello, Great news! Thanks! On Fri, Mar 4, 2022 at 2:45 PM Ondrej Zajicek wrote: > > On Wed, Feb 23, 2022 at 07:09:33PM +0100, Alexander Zubkov wrote: > > On Wed, Feb 23, 2022, 17:43 Ondrej Zajicek wrote: > > > > > On Wed, Feb 23, 2022 at 03:46:53PM +0100, Alexander Zubkov wrote: > > > > Updated

Re: constant for empty prefix set

2022-03-04 Thread Ondrej Zajicek
On Wed, Feb 23, 2022 at 07:09:33PM +0100, Alexander Zubkov wrote: > On Wed, Feb 23, 2022, 17:43 Ondrej Zajicek wrote: > > > On Wed, Feb 23, 2022 at 03:46:53PM +0100, Alexander Zubkov wrote: > > > Updated patch. Again full and incremental. > > > > Thanks, will look at it. > > > > Good. Give me kn

Re: constant for empty prefix set

2022-02-23 Thread Alexander Zubkov
On Wed, Feb 23, 2022, 17:43 Ondrej Zajicek wrote: > On Wed, Feb 23, 2022 at 03:46:53PM +0100, Alexander Zubkov wrote: > > Updated patch. Again full and incremental. > > Thanks, will look at it. > Good. Give me know if some additional work on the patch is needed. > > > > One solution would be a

Re: constant for empty prefix set

2022-02-23 Thread Ondrej Zajicek
On Wed, Feb 23, 2022 at 03:46:53PM +0100, Alexander Zubkov wrote: > Updated patch. Again full and incremental. Thanks, will look at it. > > One solution would be a global constant empty trie, so you can just set > > pointer to that. Alternative would be just have NULL like in T_SET, > > but that

Re: constant for empty prefix set

2022-02-23 Thread Alexander Zubkov
Updated patch. Again full and incremental. On Wed, Feb 23, 2022 at 4:48 AM Ondrej Zajicek wrote: > > On Tue, Feb 22, 2022 at 08:18:35PM +0100, Alexander Zubkov wrote: > > Adding new pathches (v2 - full patch, v1-v2 - incremental from previous): > > > > 1) Modified as_path_filter function - added

Re: constant for empty prefix set

2022-02-22 Thread Ondrej Zajicek
On Tue, Feb 22, 2022 at 08:18:35PM +0100, Alexander Zubkov wrote: > Adding new pathches (v2 - full patch, v1-v2 - incremental from previous): > > 1) Modified as_path_filter function - added additional parameter to > choose between using set or key parameter. Now empty set does not work > like a ze

Re: constant for empty prefix set

2022-02-22 Thread Alexander Zubkov
Adding new pathches (v2 - full patch, v1-v2 - incremental from previous): 1) Modified as_path_filter function - added additional parameter to choose between using set or key parameter. Now empty set does not work like a zero integer constant. Also thought about passing one struct f_val parameter i

Re: constant for empty prefix set

2022-02-21 Thread Ondrej Zajicek
On Tue, Feb 22, 2022 at 03:02:55AM +0100, Alexander Zubkov wrote: > > Also to your previous question: > > > > > > I also think now - why at all do we need a typed empty set? I think it > > > > is possible to add an untyped empty set, that will act as a "joker" > > > > with any types. It should fit

Re: constant for empty prefix set

2022-02-21 Thread Alexander Zubkov
On Tue, Feb 22, 2022, 01:21 Ondrej Zajicek wrote: > On Mon, Feb 21, 2022 at 11:01:25PM +0100, Alexander Zubkov wrote: > > Made some example changes to allow the use of an empty set, which > > works with all types and prefixes too. Its value has type T_SET with > > NULL pointer to the tree. Looks

Re: constant for empty prefix set

2022-02-21 Thread Ondrej Zajicek
On Mon, Feb 21, 2022 at 11:01:25PM +0100, Alexander Zubkov wrote: > Made some example changes to allow the use of an empty set, which > works with all types and prefixes too. Its value has type T_SET with > NULL pointer to the tree. Looks goot at the first sight. Hi Is assigning [] to variable of

Re: constant for empty prefix set

2022-02-21 Thread Alexander Zubkov
; As for generic way to define empty sets/list, I can imagine now these > > variants for consideration: > > > > function-like: > > emtpy_list(), empty_set() - example: empty_set(ip), > > empty_list(lc), ... > > empty() - example: empty(ip set), empty(lclist) >

Re: constant for empty prefix set

2022-02-15 Thread Alexander Zubkov
example: empty_set(ip), > empty_list(lc), ... > empty() - example: empty(ip set), empty(lclist) > > type-conversion-like: > () [] - example: (ip set) [], (lclist) [] > > OO-like: > type..empty - type.ip_set.empty, type.lclist.empty > > > > > 5) Reduce/re

Re: constant for empty prefix set

2022-02-14 Thread Alexander Zubkov
st.empty > > 5) Reduce/reduce fix - Will look at this. > > > > On Tue, Jan 11, 2022 at 1:10 PM Alexander Zubkov wrote: > > > > > > Hi, > > > > > > Let me ping this. I would like to receive a feedback on this (and some > > > other my r

Re: constant for empty prefix set

2022-02-14 Thread Ondrej Zajicek
back on this (and some > > other my recent) messages. > > > > On Sat, Jan 1, 2022 at 9:45 PM Alexander Zubkov wrote: > > > > > > Hi, > > > > > > I propose to add some constant for empty prefix set, for example (as > > > in the patch)

Re: constant for empty prefix set

2022-02-10 Thread Alexander Zubkov
> > > > Hi, > > > > I propose to add some constant for empty prefix set, for example (as > > in the patch): > > define pfx_empty = [ /empty/ ]; > > > > It is useful when we define a named prefix list, which we can use > > somewhere in filters, but

Re: constant for empty prefix set

2022-01-11 Thread Alexander Zubkov
Hi, Let me ping this. I would like to receive a feedback on this (and some other my recent) messages. On Sat, Jan 1, 2022 at 9:45 PM Alexander Zubkov wrote: > > Hi, > > I propose to add some constant for empty prefix set, for example (as > in the patch): > define pfx_empty = [

constant for empty prefix set

2022-01-01 Thread Alexander Zubkov
Hi, I propose to add some constant for empty prefix set, for example (as in the patch): define pfx_empty = [ /empty/ ]; It is useful when we define a named prefix list, which we can use somewhere in filters, but this prefix list is generated, for example, and we may need to make it empty. But