From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id EC648B3BE for ; Thu, 25 Sep 2014 09:58:02 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 25 Sep 2014 00:58:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,595,1406617200"; d="scan'208";a="578713321" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga001.jf.intel.com with ESMTP; 25 Sep 2014 01:04:17 -0700 Received: from irsmsx110.ger.corp.intel.com (163.33.3.25) by IRSMSX101.ger.corp.intel.com (163.33.3.153) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 25 Sep 2014 09:03:04 +0100 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.200]) by IRSMSX110.ger.corp.intel.com ([169.254.15.149]) with mapi id 14.03.0195.001; Thu, 25 Sep 2014 09:03:04 +0100 From: "Gray, Mark D" To: "Saha, Avik (AWS)" , "dev@dpdk.org" Thread-Topic: Safe practices for adding to rte_table_hash_lru Thread-Index: Ac/YLvsoKvZcFU7uRWCBFLGUZOGmsgAZ8WSg Date: Thu, 25 Sep 2014 08:03:03 +0000 Message-ID: <738D45BC1F695740A983F43CFE1B7EA92D743985@IRSMSX102.ger.corp.intel.com> References: In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] Safe practices for adding to rte_table_hash_lru 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: Thu, 25 Sep 2014 07:58:03 -0000 >=20 > Hey guys > Is it safe to add an entry to the rte_table_hash while the pipeline is= being > run - for instance if I were to try and add an entry on a port reader act= ion > when the packet enters the pipeline? If the table is part of the pipeline, it is not safe. i.e. the table is not= threadsafe. You can use a control message ring to add entries to the table in an=20 asynchronous manner. Your main dpdk loop would then periodically handle these messages. There are examples of this in Intel DPDK vSwitch (https://g= ithub.com/01org/dpdk-ovs) and also, I think, in the DPDK ip_pipeline sample application. >=20 > Thanks > Avik