From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by dpdk.org (Postfix) with ESMTP id 8D7FC5948 for ; Mon, 17 Feb 2014 17:43:37 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by azsmga101.ch.intel.com with ESMTP; 17 Feb 2014 08:45:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.95,861,1384329600"; d="scan'208";a="476590336" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga001.fm.intel.com with ESMTP; 17 Feb 2014 08:44:56 -0800 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.84]) by IRSMSX104.ger.corp.intel.com ([169.254.5.244]) with mapi id 14.03.0123.003; Mon, 17 Feb 2014 16:44:55 +0000 From: "Richardson, Bruce" To: Mauro Annarumma , "dev@dpdk.org" Thread-Topic: [dpdk-dev] Question on DPDK multi-process support Thread-Index: AQHPK/e2nwsjY5JTlEiVmV6WzTEdYpq5pZKQ Date: Mon, 17 Feb 2014 16:44:55 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B01A99D070@IRSMSX103.ger.corp.intel.com> References: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] Question on DPDK multi-process support 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: Mon, 17 Feb 2014 16:43:38 -0000 > Hi, > I have some doubts on the DPDK multi-process support: >=20 > 1) According to the Programmers Guide (pag. 109 - 20.3 Multi-process > Limitations), one of the multi-process limitations is: >=20 > "All Intel(r) DPDK processes running as a single application and using sh= ared > memory must have distinct coremask arguments. It is not possible to have > a primary and secondary instance, or two secondary instances, using any o= f > the same logical cores. Attempting to do so can cause corruption of > memory pool caches, among other issues." >=20 > Does it mean that I can run a number of DPDK processes at most equal to > the number of my CPU logical cores? In the case I run 2 mono-lcore DPDK > processes with the same coremask, what are the possible issues? >=20 The potential issues are caused by a dependence on the lcore_id internally = by Intel DPDK data structures, especially mempools. If two processes use th= e same lcore they will have the same lcore_id value, and will try and acces= s the same mempool cache which is not thread-safe. This will cause mempool = corruption. NOTE: this applies only to co-operating processes, i.e. those run as primar= y and secondary processes. There are no mempool issues with running complet= ely independent Intel DPDK processes on the same cores, i.e. processes run = using different "--file-prefix=3D" parameters, since those do not share any= memory and data structures.=20 >=20 > 2) Can a secondary process use the rte_eth_rx_burst over a queue of a NIC > port configured in the primary process? >=20 Yes. NIC ports and their data structures are shared between co-operating pr= ocesses. Multiple processes doing RX on the same port is shown in the "exam= ples/multi_process/symmetric_mp" example application.