eal: fix IPC timeout
authorAnatoly Burakov <anatoly.burakov@intel.com>
Fri, 2 Mar 2018 08:41:33 +0000 (08:41 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 21 Mar 2018 08:50:23 +0000 (09:50 +0100)
Fixes: 783b6e54971d ("eal: add synchronous multi-process communication")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
lib/librte_eal/common/eal_common_proc.c

index caa8774..e4d8104 100644 (file)
@@ -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)