From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH v2 07/12] eal: add channel for primary/secondary communication Date: Thu, 28 Sep 2017 16:29:37 +0100 Message-ID: References: <1503654052-84730-1-git-send-email-jianfeng.tan@intel.com> <1506606959-76230-1-git-send-email-jianfeng.tan@intel.com> <1506606959-76230-8-git-send-email-jianfeng.tan@intel.com> <2601191342CEEE43887BDE71AB9772584F24FF69@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit To: dev@dpdk.org Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id B34C51B1B7 for ; Thu, 28 Sep 2017 17:29:38 +0200 (CEST) In-Reply-To: <2601191342CEEE43887BDE71AB9772584F24FF69@irsmsx105.ger.corp.intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 28-Sep-17 4:01 PM, Ananyev, Konstantin wrote: > Hi Jianfeng, > > >> -----Original Message----- >> From: Tan, Jianfeng >> Sent: Thursday, September 28, 2017 2:56 PM >> To: dev@dpdk.org >> Cc: Richardson, Bruce ; Ananyev, Konstantin ; De Lara Guarch, Pablo >> ; thomas@monjalon.net; yliu@fridaylinux.org; maxime.coquelin@redhat.com; mtetsuyah@gmail.com; >> Yigit, Ferruh ; Tan, Jianfeng >> Subject: [PATCH v2 07/12] eal: add channel for primary/secondary communication >> >> Previouly, there is only one way for primary/secondary to exchange >> messages, that is, primary process writes info into some predefind >> file, and secondary process reads info out. That cannot address >> the requirements: >> a. Secondary wants to send info to primary, for example, secondary >> would like to send request (about some specific vdev to primary). >> b. Sending info at any time, instead of just initialization time. >> c. Share FDs with the other side, for vdev like vhost, related FDs >> (memory region, kick) should be shared. >> >> This patch proposes to create a communication channel, as an unix >> socket connection, for above requirements. Primary will listen on >> the unix socket; secondary will connect this socket to talk. >> >> Three new APIs are added: >> >> 1. rte_eal_mp_action_register is used to register an action, >> indexed by a string; if the calling component wants to >> response the messages from the corresponding component in >> its primary process or secondary processes. >> 2. rte_eal_mp_action_unregister is used to unregister the action >> if the calling component does not want to response the messages. >> 3. rte_eal_mp_sendmsg is used to send a message. > > I think we already have similar channel in librte_pdump(). > Also it seems like eal_vfio also has it's own socket to communicate between mp/sp. > Could we probably make it generic - so same code (and socket) be used by all such places. > Konstantin > Agreed, however looking at this, it's already a generic-enough solution, and other places could be fixed to use this in later releases. That said, i believe this particular part of the patchset should go in as a separate patchset and more design consideration and input from others. -- Thanks, Anatoly