[dpdk-dev,1/4] eal: fix IPC timeouts

Message ID 53373b6d98cc54581eff8fecd277ebca077e589e.1519311106.git.anatoly.burakov@intel.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Burakov, Anatoly Feb. 22, 2018, 3:43 p.m. UTC
  Fixes: 783b6e54971d ("eal: add synchronous multi-process communication")
Cc: jianfeng.tan@intel.com
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_common_proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Jianfeng Tan Feb. 23, 2018, 3:11 a.m. UTC | #1
> -----Original Message-----
> From: Burakov, Anatoly
> Sent: Thursday, February 22, 2018 11:44 PM
> To: dev@dpdk.org
> Cc: Tan, Jianfeng
> Subject: [PATCH 1/4] eal: fix IPC timeouts
> 
> Fixes: 783b6e54971d ("eal: add synchronous multi-process communication")
> Cc: jianfeng.tan@intel.com
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>

Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>

Thank you for identifying and fixing this bug.
  

Patch

diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c
index caa8774..e4d8104 100644
--- a/lib/librte_eal/common/eal_common_proc.c
+++ b/lib/librte_eal/common/eal_common_proc.c
@@ -583,7 +583,7 @@  mp_request_one(const char *dst, struct rte_mp_msg *req,
 		/* Check if time is out */
 		if (gettimeofday(&now, NULL) < 0)
 			break;
-		if (now.tv_sec < ts->tv_sec)
+		if (ts->tv_sec < now.tv_sec)
 			break;
 		else if (now.tv_sec == ts->tv_sec &&
 			 now.tv_usec * 1000 < ts->tv_nsec)