From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailfilter01.viettel.com.vn (mailfilter01.viettel.com.vn [125.235.240.53]) by dpdk.org (Postfix) with ESMTP id B18DB4C8C for ; Fri, 1 Jun 2018 09:09:49 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.49,464,1520874000"; d="scan'208";a="77461113" Received: from 125.235.240.44.adsl.viettel.vn (HELO mta1.viettel.com.vn) ([125.235.240.44]) by mailfilter01.viettel.com.vn with ESMTP; 01 Jun 2018 14:09:46 +0700 Received: from localhost (localhost [127.0.0.1]) by mta1.viettel.com.vn (Postfix) with ESMTP id C4EBB610142; Fri, 1 Jun 2018 14:09:46 +0700 (ICT) Received: from mta1.viettel.com.vn ([127.0.0.1]) by localhost (mta1.viettel.com.vn [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id qxObOxOkJpbT; Fri, 1 Jun 2018 14:09:46 +0700 (ICT) Received: from localhost (localhost [127.0.0.1]) by mta1.viettel.com.vn (Postfix) with ESMTP id A36AE60CF11; Fri, 1 Jun 2018 14:09:46 +0700 (ICT) X-Virus-Scanned: amavisd-new at Received: from mta1.viettel.com.vn ([127.0.0.1]) by localhost (mta1.viettel.com.vn [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id f7jek5gj1HRR; Fri, 1 Jun 2018 14:09:46 +0700 (ICT) Received: from ANMLONGTB5 (unknown [27.68.241.28]) by mta1.viettel.com.vn (Postfix) with ESMTPSA id 55B50610163; Fri, 1 Jun 2018 14:09:45 +0700 (ICT) To: Cc: , Message-ID: <012701d3f978$57d75d40$078617c0$@viettel.com.vn> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdP5d0PbKeYIbXvURgy11gM7Ouff7Q== Content-Language: en-us MilterAction: FORWARD Date: Fri, 1 Jun 2018 14:09:46 +0700 (ICT) From: longtb5@viettel.com.vn Subject: [dpdk-users] Membership library thread safety X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2018 07:09:50 -0000 Hi, I'm using rte_member in my application. I have two questions. 1. Could a rte_member_setsum be initialized on one thread and used on another thread? 2. Are the operations (lookup, add, reset,.) atomic, or do I need to use some kind of locking (e.g. rte_spinlock)? I couldn't find anything in the doc. My guess is that you can init and use a setsum on different threads just fine, but sharing a setsum among different threads does require locking. Thanks and best regards, -BL