DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Tan, Jianfeng" <jianfeng.tan@intel.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: "thomas@monjalon.net" <thomas@monjalon.net>,
	"Burakov, Anatoly" <anatoly.burakov@intel.com>
Subject: Re: [dpdk-dev] [PATCH 2/2] ipc: fix timeout not properly handled in async
Date: Fri, 20 Apr 2018 01:22:06 +0000	[thread overview]
Message-ID: <ED26CBA2FAD1BF48A8719AEF02201E36515276A6@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1524187312-129804-3-git-send-email-jianfeng.tan@intel.com>



> -----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
> 
> 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.
> 
> We fix this by counting timeout as a processed reply.
> 
> Fixes: f05e26051c15 ("eal: add IPC asynchronous request")
> 
> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>  lib/librte_eal/common/eal_common_proc.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> 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 == -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);
> 
>  	last_msg = param->n_responses_processed == reply->nb_sent;
> --
> 2.7.4

  reply	other threads:[~2018-04-20  1:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-20  1:21 [dpdk-dev] [PATCH 0/2] code clean up and fix in ipc Jianfeng Tan
2018-04-20  1:21 ` [dpdk-dev] [PATCH 1/2] ipc: clearn up code Jianfeng Tan
2018-04-20  7:55   ` Burakov, Anatoly
2018-04-20 14:41     ` Tan, Jianfeng
2018-04-20  1:21 ` [dpdk-dev] [PATCH 2/2] ipc: fix timeout not properly handled in async Jianfeng Tan
2018-04-20  1:22   ` Tan, Jianfeng [this message]
2018-04-20  7:56   ` Burakov, Anatoly
2018-04-20 15:20 ` [dpdk-dev] [PATCH v2 0/2] code clean up and fix in ipc Jianfeng Tan
2018-04-20 15:20   ` [dpdk-dev] [PATCH v2 1/2] ipc: clearn up code Jianfeng Tan
2018-04-20 15:20   ` [dpdk-dev] [PATCH v2 2/2] ipc: fix timeout not properly handled in async Jianfeng Tan
2018-04-23 20:48   ` [dpdk-dev] [PATCH v2 0/2] code clean up and fix in ipc Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ED26CBA2FAD1BF48A8719AEF02201E36515276A6@SHSMSX103.ccr.corp.intel.com \
    --to=jianfeng.tan@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).