Re: [vpp-dev] Regarding

2018-10-09 Thread Andrew Yourtchenko
Based on my experience with using it for session storage for acl plugin.

 Short answer - “it really depends on distribution of your keys and their 
evolution in time”.

The bucket doubles upon a hash collision and converts into a linear search mode 
of there is still a hash collision then.

It never shrinks, but is freed up if there is no values there.

Consequently, if you are unlucky and get a bunch of hash hits which cause the 
growth of one bucket and one key remains there that holds the bucket, then your 
distribution changes and the process repeats for each of the buckets, the 
memory usage can be quite large.

Given the above properties, might be interesting to experiment by grabbing more 
buckets than 64k, this way a chance to have a bucket freed will be higher. But 
(again, a hunch) at a sufficiently large number of buckets. Till then the 
overhead of having more buckets will probably be more a loss than win...

In the acl plugin I went with 1GB for 1m entries, and made changeable both the 
number of buckets and the max amount of memory.

Hope this helps.

--a

> On 9 Oct 2018, at 16:06, Prashant Upadhyaya  wrote:
> 
> Hi,
> 
> I am using clib_bihash_40_8_t  (VPP version 18.01)
> The number of buckets is 65536.
> 
> I am going to add 1 million records into the bihash. My application
> takes care that at any point of time there will never be more than 1
> million records going into the bihash.
> 
> Given the above, what should be the memory size which I should pass
> into the init function of bihash to guarantee that there will no panic
> memory allocation failures during the record additions into the bihash
> (assuming that init succeeds).
> Please make no assumptions about hash collisions.
> 
> Regards
> -Prashant
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#10780): https://lists.fd.io/g/vpp-dev/message/10780
> Mute This Topic: https://lists.fd.io/mt/27122953/675608
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [ayour...@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10782): https://lists.fd.io/g/vpp-dev/message/10782
Mute This Topic: https://lists.fd.io/mt/27122953/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] Regarding

2018-10-09 Thread Prashant Upadhyaya
Hi,

I am using clib_bihash_40_8_t  (VPP version 18.01)
The number of buckets is 65536.

I am going to add 1 million records into the bihash. My application
takes care that at any point of time there will never be more than 1
million records going into the bihash.

Given the above, what should be the memory size which I should pass
into the init function of bihash to guarantee that there will no panic
memory allocation failures during the record additions into the bihash
(assuming that init succeeds).
Please make no assumptions about hash collisions.

Regards
-Prashant
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10780): https://lists.fd.io/g/vpp-dev/message/10780
Mute This Topic: https://lists.fd.io/mt/27122953/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] Regarding clib_bihash_40_8_t

2018-10-09 Thread Prashant Upadhyaya
I am using clib_bihash_40_8_t  (VPP version 18.01)
The number of buckets is 65536.

I am going to add 1 million records into the bihash. My application
takes care that at any point of time there will never be more than 1
million records going into the bihash.

Given the above, what should be the memory size which I should pass
into the init function of bihash to guarantee that there will no panic
memory allocation failures during the record additions into the bihash
(assuming that init succeeds).
Please make no assumptions about hash collisions.

Regards
-Prashant
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10781): https://lists.fd.io/g/vpp-dev/message/10781
Mute This Topic: https://lists.fd.io/mt/27122954/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Elog binary file format

2018-10-09 Thread Florin Coras
As for the crash, try right at the start of your main: 
clib_mem_init_thread_safe (0, 256 << 20)

Florin

> On Oct 9, 2018, at 4:55 AM, Aleksander Djuric  
> wrote:
> 
> Correction: I've found all of unserialize_* functions. Trying to understand.. 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#10777): https://lists.fd.io/g/vpp-dev/message/10777
> Mute This Topic: https://lists.fd.io/mt/26875131/675152
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [fcoras.li...@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10779): https://lists.fd.io/g/vpp-dev/message/10779
Mute This Topic: https://lists.fd.io/mt/26875131/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Query regarding cli function handler

2018-10-09 Thread Dave Barach via Lists.Fd.Io
Debug CLI commands are executed in “process” [aka cooperating multitasking 
thread] context. As such, the stack has a fixed maximum size of 65K. See 
…/src/vlib/unix/cli.c, search for “.process_log2_n_stack_bytes = 16”…

HTH… Dave

From:  on behalf of Alok Makhariya 

Date: Tuesday, October 9, 2018 at 3:18 AM
To: "vpp-dev@lists.fd.io" 
Subject: [vpp-dev] Query regarding cli function handler


I am writing cli handler.
Is there any stack limit for cli function handler ?
What will happen if I define a large local variable inside function handler ?

Thanks
Alok

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10778): https://lists.fd.io/g/vpp-dev/message/10778
Mute This Topic: https://lists.fd.io/mt/27120391/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Elog binary file format

2018-10-09 Thread Aleksander Djuric
Correction: I've found all of unserialize_* functions. Trying to understand..
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10777): https://lists.fd.io/g/vpp-dev/message/10777
Mute This Topic: https://lists.fd.io/mt/26875131/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] hqos: multicore and multi-network interface problem

2018-10-09 Thread avakili
Hi dears,
QoS using hqos feature is working with single network interface and single core 
with following config:

##IT WORKS##
dpdk {
   dev :02:00.0 {
 num-rx-queues 2
 hqos
   }
    }
   
    cpu {
  main-core 0
  corelist-workers  1, 2, 3, 4
  corelist-hqos-threads  5

But when using more than one interface or core then not working:

##NOT WORKING##
dpdk { 
   dev :02:00.0 {
 num-rx-queues 2
 hqos
   }
   dev :06:00.0 {
 num-rx-queues 2
    hqos
  }
    }
   
    cpu {
  main-core 0
  corelist-workers  1, 2, 3, 4
  corelist-hqos-threads  5, 6
    }

Please help to fix or any idea if it is a bug in VPP.
Thanks
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10776): https://lists.fd.io/g/vpp-dev/message/10776
Mute This Topic: https://lists.fd.io/mt/27120560/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Elog binary file format

2018-10-09 Thread Aleksander Djuric
Thanks Florin! Thanks Damjan!

I know about these tools, but both of them uses elog_read_file function, which 
is described in elog.h
This function consist of 3 other functions: unserialize_open_clib_file, 
unserialize and unserialize_close.
If I right, the elog file parsing should be in unserialize.. Ok. I have found 
this function in vppinfra/serialize.c,
it calls va_serialize and... and that's all, I have found nothing here )

Also, maybe you know, why the elog_read_file function is not work when compiled 
outside of VPP (inside of c2cpel it works ok)
This sample always crashes with "Segmentation fault", is it possible to make it 
work?
 

> 
> #cat test.c
> #include 
> #include 
> static elog_main_t elog_main;
> int main (int argc, char **argv) {
>     elog_main_t *em = _main;
>     if (argc > 1) elog_read_file (em, argv[1]);
> }
> #gcc -g -Wall -I./include -g -O2 -o test test.o -lvppinfra
> #./test ./test.elog
> Segmentation fault
>  
> 

Or maybe you have some documents described the elog file format ?
That's would be great )
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10775): https://lists.fd.io/g/vpp-dev/message/10775
Mute This Topic: https://lists.fd.io/mt/26875131/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] Query regarding cli function handler

2018-10-09 Thread Alok Makhariya

I am writing cli handler.
Is there any stack limit for cli function handler ?
What will happen if I define a large local variable inside function handler ?

Thanks
Alok

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10774): https://lists.fd.io/g/vpp-dev/message/10774
Mute This Topic: https://lists.fd.io/mt/27120391/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] VPP Ping

2018-10-09 Thread brayan ortega
Dear Folks,
I would like to use "vppctl add trace" to see trace of vpp ping another
machine (all ping packets are dropped). Is it possible to use trace in this
case?

Best Regards,
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10773): https://lists.fd.io/g/vpp-dev/message/10773
Mute This Topic: https://lists.fd.io/mt/27120210/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] VPP Release 18.10: RC1 is tomorrow!!!

2018-10-09 Thread Marco Varlese
Dear all,

Gentle reminder about -RC1 deadline happening tomorrow [1].

[1] https://wiki.fd.io/view/Projects/vpp/Release_Plans/Release_Plan_18.10


Regards,
-- 
Marco V

SUSE LINUX GmbH | GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg) Maxfeldstr. 5, D-90409, Nürnberg

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10772): https://lists.fd.io/g/vpp-dev/message/10772
Mute This Topic: https://lists.fd.io/mt/27119694/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-