From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-x229.google.com (mail-pd0-x229.google.com [IPv6:2607:f8b0:400e:c02::229]) by dpdk.org (Postfix) with ESMTP id AF0D0156 for ; Sat, 28 Dec 2013 15:53:51 +0100 (CET) Received: by mail-pd0-f169.google.com with SMTP id v10so9910117pde.14 for ; Sat, 28 Dec 2013 06:55:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=jii+edhB61RsezUWvpQnfmTyq1kg+Y1jVPaFbtcdgjA=; b=L+UPun6LKxLmV6uhqtg1E+i3xvLmDm4j/zIyuP18d4SsCIEJbCG5Lo4yLhAlKj1ksE hkTLed/eHeF4g+ldY3D15jusblOYOuRpl2zWmej8N8NuOzl1+Fj06jM6Tzwx0/2gG3PZ o29QmwxX/Nw7l/pDqzJG8+zkPzMwxqMw2wIjitnoOCzoFXxjXMHFScmumI4yre4oXX5h fF9cuUjT7eoEwaxGLk3v7DplcrY7fRv5XHa/UgBBNR5aGvY968+2Q/EAGY5hULPL5Vpz szxlGT4ygZkH3N3aBu9zd4ciLKuKXR0ZpU1jNfK4dQ0AHdKkGiELD80BO8OExWJOfAdg 3+Yg== MIME-Version: 1.0 X-Received: by 10.68.130.10 with SMTP id oa10mr16960948pbb.160.1388242500145; Sat, 28 Dec 2013 06:55:00 -0800 (PST) Received: by 10.68.38.135 with HTTP; Sat, 28 Dec 2013 06:55:00 -0800 (PST) Date: Sat, 28 Dec 2013 20:25:00 +0530 Message-ID: From: Jyotiswarup Raiturkar To: "dev@dpdk.org" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] rte_mempools / rte_rings thread safe? X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 14:53:52 -0000 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