From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH v3 2/3] eal: add synchronous multi-process communication Date: Thu, 25 Jan 2018 12:25:58 +0000 Message-ID: References: <1512067450-59203-1-git-send-email-jianfeng.tan@intel.com> <1516853783-108023-1-git-send-email-jianfeng.tan@intel.com> <1516853783-108023-3-git-send-email-jianfeng.tan@intel.com> <93ea032e-e2da-f087-567a-2397fad7ff02@intel.com> <2601191342CEEE43887BDE71AB977258862836A2@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "Richardson, Bruce" , "thomas@monjalon.net" To: "Ananyev, Konstantin" , "Tan, Jianfeng" , "dev@dpdk.org" Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 37D71A49F for ; Thu, 25 Jan 2018 13:26:01 +0100 (CET) In-Reply-To: <2601191342CEEE43887BDE71AB977258862836A2@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 25-Jan-18 12:19 PM, Ananyev, Konstantin wrote: > > >> -----Original Message----- >> From: Burakov, Anatoly >> Sent: Thursday, January 25, 2018 12:00 PM >> To: Tan, Jianfeng ; dev@dpdk.org >> Cc: Richardson, Bruce ; Ananyev, Konstantin ; thomas@monjalon.net >> Subject: Re: [PATCH v3 2/3] eal: add synchronous multi-process communication >> >> On the overall patch, >> >> Reviewed-by: Anatoly Burakov >> >> For request(), returning number of replies received actually makes >> sense, because now we get use the value to read our replies, if we were >> a primary process sending messages to secondary processes. > > Yes, I also think it is good to return number of sends. > Then caller can compare number of sended requests with number of > received replies and decide should it be considered a failure or no. > Well, OK, that might make sense. However, i think it would've be of more value to make the API consistent (0/-1 on success/failure) and put number of sent messages into the reply, like number of received. I.e. something like struct reply { int nb_sent; int nb_received; }; We do it for the latter already, so why not the former? -- Thanks, Anatoly