Re: [vpp-dev] Message serialize / deserializer in VPP ( like google protobuf )

2018-12-05 Thread Ole Troan
Satish, > Thanks Ole for the quick response. > > We are trying to send messages from a control plane process to VPP process > via memif channel. > This is to program the VPP dataplane tables for our product. > > I see some serialize functions in vppinfra/serialize.h file. Are these the > on

[vpp-dev] VPP API language changes

2018-12-05 Thread Ole Troan
All, Here is an update on API progress. In the long process of making types in the API language more explicit I have a few changes merged and a few in the pipeline: - Type aliases. Previously any new user defined type had to be a structure. With type aliasing one can do e.g. typedef u32 int

Re: [vpp-dev] String tests failures

2018-12-05 Thread Dave Barach via Lists.Fd.Io
See https://gerrit.fd.io/r/#/c/16352, which computes strlen if necessary for a precise copy-overlap check. Strncpy_s was always slightly wrong in this regard. The "make test" failure showed up [only] on aarch64 due to test code stack variable placement / alignment differences between aarch64 and

Re: [vpp-dev] Message serialize / deserializer in VPP ( like google protobuf )

2018-12-05 Thread satish . gundu
Thanks Ole. We can use option (1). But, Only thing is, on the CP side, we have some restrictions to have a format either as google protobuf (or) JSON format. Do we have builtin Json serialize/deserialize support in VPP for JSON messages into C structures . If so, can you please point me to some

Re: [vpp-dev] Message serialize / deserializer in VPP ( like google protobuf )

2018-12-05 Thread Ole Troan
Satish, > We can use option (1). > But, Only thing is, on the CP side, we have some restrictions to have a > format either as google protobuf (or) JSON format. > Do we have builtin Json serialize/deserialize support in VPP for JSON > messages into C structures . > If so, can you please point me

Re: [vpp-dev] Message serialize / deserializer in VPP ( like google protobuf )

2018-12-05 Thread Neale Ranns via Lists.Fd.Io
Hi Staish, I assume that since you where looking a C functions for serialize/deserialize you might try the direct C function API in, e.g : ./build-root/install-vpp-native/vpp/include/vapi/interface.api.vapi.h which is generated directly from the .api files. /neale De : au nom de "satish.gu.

[vpp-dev] vnet crashes, and problems building debug version (was Re: netlink & router (vppsb or patch->vpp) - help building/running)

2018-12-05 Thread Brian Dickson
Greetings again, Here is more context on the problem I'm seeing. The problem occurs if a large-ish number of IPv4 prefixes are added to the FIB (by way of the netlink and router plugin). If the prefix count is below some threshold (e.g. 50,000 prefixes), things work fine. At some prefix count (ha

Re: [vpp-dev] vnet crashes, and problems building debug version (was Re: netlink & router (vppsb or patch->vpp) - help building/running)

2018-12-05 Thread Neale Ranns via Lists.Fd.Io
Hi Brian, If you’re adding lots of routes, you’ll also need to bump the heap size for the IP FIBs as well as the main heap: https://fdio-vpp.readthedocs.io/en/latest/gettingstarted/users/configuring/startup.html#ip to run in gdb: sudo service vpp stop (or your OS equivalent) make build

[vpp-dev] Heap allocation

2018-12-05 Thread Harish Patil
Hi, I would like to pre-allocate separate heap space (outside of main heap) and be able to use the returned memory for my application's memory needs (just like malloc()). It seems we can have up to 256 heaps. Have few questions around this: 1) My understanding is that currently the main heap is a

Re: [vpp-dev] Heap allocation

2018-12-05 Thread Dave Barach via Lists.Fd.Io
You can have as many heaps as you need. There is no inherent limit. The constant CLIB_MAX_MHEAPS has to do with the number of distinct thread-id’s which os_get_thread_index() will return. This guitar-lick means “temporarily use the supplied heap for all allocations”: void *oldheap = clib_mem_

Re: [vpp-dev] Heap allocation

2018-12-05 Thread Harish Patil
Hi Dave, Great, thanks for the quick reply. Thanks for clarifying the same, I tried out a quick example and it seems okay. Harish On Wed, Dec 5, 2018 at 1:52 PM Dave Barach (dbarach) wrote: > You can have as many heaps as you need. There is no inherent limit. The > constant CLIB_MAX_MHEAPS has t