From patchwork Wed Jan 13 17:18:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 59675 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp3495975lbb; Wed, 13 Jan 2016 09:19:58 -0800 (PST) X-Received: by 10.140.233.1 with SMTP id e1mr160141380qhc.42.1452705597917; Wed, 13 Jan 2016 09:19:57 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j108si2241962qge.77.2016.01.13.09.19.57; Wed, 13 Jan 2016 09:19:57 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id E59A76178C; Wed, 13 Jan 2016 17:19:56 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=RYLsRh1F; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id A3F0861782; Wed, 13 Jan 2016 17:19:53 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id CDC7A61782; Wed, 13 Jan 2016 17:19:50 +0000 (UTC) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) by lists.linaro.org (Postfix) with ESMTPS id B23F161785 for ; Wed, 13 Jan 2016 17:18:47 +0000 (UTC) Received: by mail-lf0-f52.google.com with SMTP id m198so112446922lfm.0 for ; Wed, 13 Jan 2016 09:18:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=mXE+UU1fnJqOy5JxGAJpGL6HbOkLyntKcw4JE9EPnpY=; b=RYLsRh1Fr6fDiZ2xz7467YNfJLwOghjF0iNuw+QFxwNAEYcbw6ZDcJ2/kbd98qtdtL vE0ynV/e+9n0tkEacs5uhQcM/e/dhFfGxqA8JzPM3JWisbAV/NxrfJ2cvj4ojgoa1PPU Ee1qSxytC9pHMUz9LfUOAQAI6QZLQdlenIBCQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mXE+UU1fnJqOy5JxGAJpGL6HbOkLyntKcw4JE9EPnpY=; b=R4mvzB59lEwC178tIFE3mvpYLzhv0qyphyDlyrQlns3AAWq0QmB08Dox/Cj6dlhheC cy1lVGtGyEPVxZ62+5AxBUC8C9H6LjOF2Zyb24AfhGShgN78dwEk+ZDYcrawEr6xhR5g qJemyYJadB+j1P1kSFPDUG6ghUK8d4HN4VgVdMobrRcJWYBtbZb3pwhE9xWDculoN/IG R6v+Cpfc8CngPhqvRKb+Pr6o7Vb0QVkqv4hP5Um+2IrvLE0tH9p/XLIna4q24z+w4DYt Hjq6MCHH7bIQU+brfB0Yz2CEoNrfI6xyW+iMtw2yaOSnVTacIRXcjjmypw57eD3D5ZHK IFbg== X-Gm-Message-State: ALoCoQkoOy88WRL2OozJA5FkVa8xuM3MAFEv5zAjjdRku9sUjol/GqJcJjakUazdlmUEuRJHqtl444PKZeqnedZ3POiB8wwJAw== X-Received: by 10.25.30.5 with SMTP id e5mr40611166lfe.48.1452705526401; Wed, 13 Jan 2016 09:18:46 -0800 (PST) Received: from localhost.localdomain ([195.238.92.128]) by smtp.gmail.com with ESMTPSA id h9sm294656lbj.42.2016.01.13.09.18.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Jan 2016 09:18:45 -0800 (PST) From: Ivan Khoronzhuk To: lng-odp@lists.linaro.org Date: Wed, 13 Jan 2016 19:18:37 +0200 Message-Id: <1452705517-28808-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCH] validation: pktio: use odp_time_ns() instead own function X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Now odp_time_wait_ns() can be used. Signed-off-by: Ivan Khoronzhuk Reviewed-by: Bill Fischofer --- test/validation/pktio/pktio.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c index 45c11c5..29ad4ea 100644 --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -259,17 +259,6 @@ static int default_pool_create(void) return 0; } -static void spin_wait(uint64_t ns) -{ - odp_time_t start, now, diff; - - start = odp_time_local(); - do { - now = odp_time_local(); - diff = odp_time_diff(now, start); - } while (odp_time_to_ns(diff) < ns); -} - static odp_pktio_t create_pktio(int iface_idx, odp_pktio_input_mode_t imode, odp_pktio_output_mode_t omode) { @@ -294,7 +283,7 @@ static odp_pktio_t create_pktio(int iface_idx, odp_pktio_input_mode_t imode, odp_pktio_print(pktio); if (wait_for_network) - spin_wait(ODP_TIME_SEC_IN_NS / 4); + odp_time_wait_ns(ODP_TIME_SEC_IN_NS / 4); return pktio; }