Hi,

We are seeing some issue in our plugin that seems to caused by the change of 
pointer for a pool element.

The scenario is as below. Can you please let us know , if this can really occur.

1. We have multiple workers
2. We have one global pool of  custom-structures ( this is a non-fixed pool)
3. This global pool is protected by a lock for addition and deletion.
4. However, it is not protected for reading. So, all workers refer read entries 
from this pool by using pool_elt_at_index()
5. All the workers keep on adding and deleting elements in this pool by taking 
lock.
6. What we are seeing is, the pointer returned by 
pool_elt_at_index(global_pool, index)
is getting changed in between and causing some issue in our logic.

Couple of questions we have is :
1 ) If a pool element is getting used (not-free-element),  Until that element 
is put back again into the pool, can we assume that the address of the element 
remain same and will not get  chagned by pool resizing.

2) Having pools that spans across threads will cause any issues like this while 
reading the elements ( though we protect the pool for add/del of elements using 
a spin lock) ?

--
Thanks & Regards,
Murthy
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

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

Reply via email to