From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ACbtjcXyIEwtv+Jo9AfgYlsBMzNJGHccJbSrgPt3KCk=; b=kCgJ1oDe7vFVVrFfSsB/SJvRfWllcQebshxSq9CsJWosQkkWRC7LghnWjW1bKxIJQL GYZWKudxdqwBEQNC3jlNK8Cdk/Yup8462/w96iHmo+r0GjOkG6VMSASOFo9x1AQVj7pd i7sJHTzLDe21tLFb+YaRV2pbt654g6MJTW0xqr6pWBdvOkhN6QwYHOdgsm4TgIEqx7/5 HJ3LwxXzXn+ep4uS48FLRzURLbLoRI9KlgeB/vmV3WVjf84j/iQjAVIIslvx7tmi4v8T 4wf9WMjfOmfmusobIyvwnK4dq8BwINniNmtiIFd1wbytE2AzKtfrQwY4PvyXsXRx2I9o c7uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ACbtjcXyIEwtv+Jo9AfgYlsBMzNJGHccJbSrgPt3KCk=; b=bhFutVVY3y8ISbPlgCOMD+GV2cM4nTd94f7ZbXZOcXRbf9mLD3AUepJ01PMGYd2xnn N5SwRdinkkLqPtEspn5OX6dgqRQLjsruDPNd0TIP1NEa5fKv4/G2EjWUsXBUbP8pUK4/ ZH10WAcJiI095PXaPGStvzb7QvUXUgQFbTmcp9UTEoQ7HK2fg4pyzd8BvC8i8Oj6ZVCy Eq/KHbxEqe+LStGcS0EgCiekiSXGU0Y/6e9y4fwCaWWq6FP5sLgddLZCM/uaOP3gBzWw SQDpxhdoeFXtKq4WB0UqIe6t6AkSEodJVXoAjt9xBsqMzmn8jUdKP+i4gKvxMYGaOVMB yIpA== X-Gm-Message-State: APf1xPBrMApBV3cqXLXGovANtZ5Th0V/WSWiQCLYnxsA46SPZL6bBjn/ KE3FAI2TQuldYRVJNlhEk3c1lg== X-Google-Smtp-Source: AG47ELvj89l18PfOE4+d1RN81Zj2PaaKk4kmMAtWo3baSw3Uv2W2VkM35HePMc3aP/mf0cE2xAKLaQ== X-Received: by 10.99.161.2 with SMTP id b2mr5351264pgf.130.1520016513588; Fri, 02 Mar 2018 10:48:33 -0800 (PST) Received: from xeon-e3 (204-195-71-95.wavecable.com. [204.195.71.95]) by smtp.gmail.com with ESMTPSA id n12sm10967992pgp.20.2018.03.02.10.48.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Mar 2018 10:48:33 -0800 (PST) Date: Fri, 2 Mar 2018 10:48:25 -0800 From: Stephen Hemminger To: Anatoly Burakov Cc: dev@dpdk.org, jianfeng.tan@intel.com, konstantin.ananyev@intel.com Message-ID: <20180302104825.1e419ce7@xeon-e3> In-Reply-To: <92186ea34a31743ed76dbd9267f0586da22575f3.1519742486.git.anatoly.burakov@intel.com> References: <92186ea34a31743ed76dbd9267f0586da22575f3.1519742486.git.anatoly.burakov@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] eal: add asynchronous request API to DPDK IPC X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Mar 2018 18:48:34 -0000 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