On Tue, 27 Feb 2018 14:59:29 +0000
Anatoly Burakov <[email protected]> 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