From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id C2BF85583 for ; Tue, 13 Jun 2017 17:35:08 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jun 2017 08:35:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,338,1493708400"; d="scan'208";a="98968615" Received: from dhunt5-mobl.ger.corp.intel.com (HELO [10.237.221.55]) ([10.237.221.55]) by orsmga002.jf.intel.com with ESMTP; 13 Jun 2017 08:35:06 -0700 To: Jean-Philippe ANDRIOT , users@dpdk.org References: <12e40f2e-6bd3-1443-9895-0dd75e82a769@gmail.com> From: "Hunt, David" Message-ID: <99d5092a-aaa9-d526-118f-4441681d20a0@intel.com> Date: Tue, 13 Jun 2017 16:35:05 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <12e40f2e-6bd3-1443-9895-0dd75e82a769@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-users] Is it possible to use distributor library in multi-process mode ? 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: Tue, 13 Jun 2017 15:35:09 -0000 On 9/6/2017 9:17 PM, Jean-Philippe ANDRIOT wrote: > > Hi, > > I would like to use packet distributor library in multi-process mode, > meaning both distributor core and every worker are running in a > different process (secondary proc type). > > However, there is no /rte_distributor_lookup/ function to get a > distributor instance from a DPDK secondary process, such as > /rte_ring_lookup/ for rings. > > I had a look to the implementation of both ring and distributor and it > looks like both are created the same way (rte_memzone allocation and > registration in a RTE_TAILQ in shm). > > So I'm wondering if the rte_distributor_lookup function could be > easily implemented ( based on rte_ring_lookup ) or if there are > specific issues which prevent distributor to be used in multi process > mode. > > Thanks ! > Jean-Philippe, It sounds like you're going in the right direction for this. I haven't attempted a multi-process implementation myself, but what you're describing is theoretically possible. If you implemented an rte_distributor_lookup function, once you get the rte_distributor instance, you should then be able to call the client API's to get and return packets to the distributor app. Please ensure that the number of running workers matches the number of workers in the created distributor instance, and that each app passes in a unique worker_id. Regards, Dave.