From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jyotiswarup Raiturkar Subject: rte_mempools / rte_rings thread safe? Date: Sat, 28 Dec 2013 20:25:00 +0530 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 To: "dev-VfR2kkLFssw@public.gmane.org" Return-path: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Hi The rte_mempool and rte_ring libs have multi-producer/multi-consumer versions. But it's also mentioned in the header files that the implementation is not pre-emtable : " Note: the mempool implementation is not preemptable. A lcore must not be interrupted by another task that uses the same mempool (because it uses a ring which is not preemptable)" I had some questions on the same : - Does having mutually exclusive core masks for a set of threads which use the ring/mempool suffice for thread safety ( threads will have different core ids but they will not be pinned to cores) ? - If i want to use this data structures in a pthread ( created outside of DPDK environment), is it ok to use this if i do "RTE_DEFINE_PER_LCORE(unsigned, _lcore_id);" with a core_id exclusive of all other core masks for DPDK processes. -Jyoti