From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] eal: add asynchronous request API to DPDK IPC Date: Fri, 2 Mar 2018 10:48:25 -0800 Message-ID: <20180302104825.1e419ce7@xeon-e3> References: <92186ea34a31743ed76dbd9267f0586da22575f3.1519742486.git.anatoly.burakov@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, jianfeng.tan@intel.com, konstantin.ananyev@intel.com To: Anatoly Burakov Return-path: Received: from mail-pf0-f181.google.com (mail-pf0-f181.google.com [209.85.192.181]) by dpdk.org (Postfix) with ESMTP id 938F72BF1 for ; Fri, 2 Mar 2018 19:48:34 +0100 (CET) Received: by mail-pf0-f181.google.com with SMTP id z10so4357971pfh.13 for ; Fri, 02 Mar 2018 10:48:34 -0800 (PST) In-Reply-To: <92186ea34a31743ed76dbd9267f0586da22575f3.1519742486.git.anatoly.burakov@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 27 Feb 2018 14:59:29 +0000 Anatoly Burakov wrote: > +rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts) > { > + struct sync_request *dummy; > + struct async_request_shared_param *param = NULL; > + struct rte_mp_reply *reply = NULL; > + int dir_fd, ret = 0; > + DIR *mp_dir; > + struct dirent *ent; > + struct timeval now; > + struct timespec *end = NULL; > + > + RTE_LOG(DEBUG, EAL, "request: %s\n", req->name); > + > + if (check_input(req) == false) > + return -1; > + if (gettimeofday(&now, NULL) < 0) { > + RTE_LOG(ERR, EAL, "Faile to get current time\n"); > + rte_errno = errno; > + return -1; > + } gettimeofday is not a good API to use in DPDK. It gets changed by NTP; if you have to use system time you want monotonic clock