From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2018 18:22:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,299,1520924400"; d="scan'208";a="35634751" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga006.jf.intel.com with ESMTP; 19 Apr 2018 18:22:08 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 19 Apr 2018 18:22:08 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 19 Apr 2018 18:22:08 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.210]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.40]) with mapi id 14.03.0319.002; Fri, 20 Apr 2018 09:22:06 +0800 From: "Tan, Jianfeng" To: "dev@dpdk.org" CC: "thomas@monjalon.net" , "Burakov, Anatoly" Thread-Topic: [PATCH 2/2] ipc: fix timeout not properly handled in async Thread-Index: AQHT2EWzJZdL198jaU+uKmpMqqWDDKQI20PA 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> In-Reply-To: <1524187312-129804-3-git-send-email-jianfeng.tan@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 2/2] ipc: fix timeout not properly handled in async X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Apr 2018 01:22:10 -0000 > -----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