Re: MBUF behaviour

2018-04-08 Thread Christopher Collins
On Sat, Apr 07, 2018 at 08:15:55PM +0530, Aditya Xavier wrote: > That explains everything. However, one question. > > When we do a os_mbuf_free_chain, shouldn’t om_data also provide “”, instead > of the previous value ? The contents of an mbuf's data buffer beyond `om_len` are always

Re: MBUF behaviour

2018-04-06 Thread Christopher Collins
Hi Aditya, On Sat, Apr 07, 2018 at 07:59:44AM +0530, Aditya Xavier wrote: > Hi Christopher, > > That is the expected behaviour, however if you try running the sample app I > gave you would notice the following > After step 11, I.e initialise the os_mbuf by doing a os_mbuf_get from a >

Re: MBUF behaviour

2018-04-06 Thread Aditya Xavier
Hi Christopher, That is the expected behaviour, however if you try running the sample app I gave you would notice the following After step 11, I.e initialise the os_mbuf by doing a os_mbuf_get from a mempool, the new value is overwritten on the previous value. I.e 1. Accessing the mbuf after

Re: MBUF behaviour

2018-04-06 Thread Christopher Collins
Hi Aditya, On Fri, Apr 06, 2018 at 07:36:41PM +0530, Aditya Xavier wrote: > Hi Mynewt Team, > > Please help me understand the behavior of MBUF. > > PFB the steps I did :- > > 1.os_mempool_init > 2.os_mbuf_pool_init > 3.Initialized a os_mbuf by os_mbuf_get > 4.Triggered Console