From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tan, Jianfeng" Subject: Re: [PATCH 2/2] ipc: fix timeout not properly handled in async Date: Fri, 20 Apr 2018 01:22:06 +0000 Message-ID: References: <1524187312-129804-1-git-send-email-jianfeng.tan@intel.com> <1524187312-129804-3-git-send-email-jianfeng.tan@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "thomas@monjalon.net" , "Burakov, Anatoly" To: "dev@dpdk.org" Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 3BE07AAD4 for ; Fri, 20 Apr 2018 03:22:09 +0200 (CEST) In-Reply-To: <1524187312-129804-3-git-send-email-jianfeng.tan@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" > -----Original Message----- > From: Tan, Jianfeng > Sent: Friday, April 20, 2018 9:22 AM > To: dev@dpdk.org > Cc: thomas@monjalon.net; Burakov, Anatoly; Tan, Jianfeng > Subject: [PATCH 2/2] ipc: fix timeout not properly handled in async >=20 > In original implementation, timeout event for an async request > will be ignored. As a result, an async request will never > trigger the action if it cannot receive any reply any more. >=20 > We fix this by counting timeout as a processed reply. >=20 > Fixes: f05e26051c15 ("eal: add IPC asynchronous request") >=20 > Signed-off-by: Jianfeng Tan > Signed-off-by: Anatoly Burakov > --- > lib/librte_eal/common/eal_common_proc.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/lib/librte_eal/common/eal_common_proc.c > b/lib/librte_eal/common/eal_common_proc.c > index 070a075..27de16e 100644 > --- a/lib/librte_eal/common/eal_common_proc.c > +++ b/lib/librte_eal/common/eal_common_proc.c > @@ -419,7 +419,13 @@ process_async_request(struct pending_request *sr, > const struct timespec *now) > } else if (sr->reply_received =3D=3D -1) { > /* we were asked to ignore this process */ > reply->nb_sent--; > + } else if (timeout) { > + /* count it as processed reponse, but don't increment Oops, a typo: s/reponse/response > + * nb_received. > + */ > + param->n_responses_processed++; > } > + > free(sr->reply); >=20 > last_msg =3D param->n_responses_processed =3D=3D reply->nb_sent; > -- > 2.7.4