From patchwork Tue Nov 11 04:03:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 40551 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 79DC6244B6 for ; Tue, 11 Nov 2014 04:08:36 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id e51sf6303765eek.6 for ; Mon, 10 Nov 2014 20:08:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=xL73RylXVXv3lLKsvH8ti31Lk+7NvYAZsydOKP4xYwI=; b=KURfKNmquoIMv3eHmOkCtunVS1N4uYNZcWF6fR5iN3OVedX7kFbKlxPh0MNUr0kQSh K2Q+MVAOGXoik+41Wsx0rLlKTSovseyABHOZbQitaEeR6bOjezSfDDcayk/AVVycgxYW C3G/wLJff22WCMTUU8J+tn9ovntediO6ZIc2YSOCoQVvvnohmbY67jhFqDDy5pKHkR4B BVgKQweE0bbkr0fs1jGqDBhxgjPDrUzbgQRZnWENQLM0jFCigR/81pRwXA3dqHUCaD91 rhte6wao6zEiYXDYjhihB2hdOoLmPjh0u5KkxZw8Ji3BvoLThJuI9aHcesiq8uxSFw1G T9zA== X-Gm-Message-State: ALoCoQmRY6xQ8CBArG93zAOC6U0Gn1lVAfFvvHiAPtNXAFay4+XdNxjNIeNmrcNQ6A2+CguTDPX/ X-Received: by 10.180.98.165 with SMTP id ej5mr5963771wib.1.1415678915772; Mon, 10 Nov 2014 20:08:35 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.66 with SMTP id h2ls403553laa.58.gmail; Mon, 10 Nov 2014 20:08:35 -0800 (PST) X-Received: by 10.152.8.1 with SMTP id n1mr33343898laa.28.1415678915259; Mon, 10 Nov 2014 20:08:35 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id n9si30041998laa.10.2014.11.10.20.08.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Nov 2014 20:08:34 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id n15so7100529lbi.34 for ; Mon, 10 Nov 2014 20:08:34 -0800 (PST) X-Received: by 10.152.234.136 with SMTP id ue8mr33717722lac.21.1415678914836; Mon, 10 Nov 2014 20:08:34 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp200035lbc; Mon, 10 Nov 2014 20:08:34 -0800 (PST) X-Received: by 10.140.96.101 with SMTP id j92mr46759268qge.87.1415678913674; Mon, 10 Nov 2014 20:08:33 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id g11si34764700qgg.113.2014.11.10.20.08.32 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 10 Nov 2014 20:08:33 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Xo2kp-0003U1-TA; Tue, 11 Nov 2014 04:08:31 +0000 Received: from mail-ob0-f177.google.com ([209.85.214.177]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Xo2gF-00038k-WD for lng-odp@lists.linaro.org; Tue, 11 Nov 2014 04:03:48 +0000 Received: by mail-ob0-f177.google.com with SMTP id m8so6640611obr.36 for ; Mon, 10 Nov 2014 20:03:42 -0800 (PST) X-Received: by 10.60.157.100 with SMTP id wl4mr30527004oeb.37.1415678622750; Mon, 10 Nov 2014 20:03:42 -0800 (PST) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id ln10sm7905136obc.24.2014.11.10.20.03.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Nov 2014 20:03:42 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 10 Nov 2014 22:03:10 -0600 Message-Id: <1415678595-31405-6-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1415678595-31405-1-git-send-email-bill.fischofer@linaro.org> References: <1415678595-31405-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH ODP v1.0 Buffer/Packet APIs 4/9] Modifications to test programs to work with v1.0 buffer/packet APIs X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bill.fischofer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Bill Fischofer --- test/api_test/odp_timer_ping.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/test/api_test/odp_timer_ping.c b/test/api_test/odp_timer_ping.c index 65e3834..90c1ae6 100644 --- a/test/api_test/odp_timer_ping.c +++ b/test/api_test/odp_timer_ping.c @@ -318,9 +318,8 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED) ping_arg_t pingarg; odp_queue_t queue; odp_buffer_pool_t pool; - void *pool_base; int i; - odp_shm_t shm; + odp_buffer_pool_param_t params; if (odp_test_global_init() != 0) return -1; @@ -333,14 +332,14 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED) /* * Create message pool */ - shm = odp_shm_reserve("msg_pool", - MSG_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0); - pool_base = odp_shm_addr(shm); - - pool = odp_buffer_pool_create("msg_pool", pool_base, MSG_POOL_SIZE, - BUF_SIZE, - ODP_CACHE_LINE_SIZE, - ODP_BUFFER_TYPE_RAW); + + params.buf_num = MSG_POOL_SIZE/BUF_SIZE; + params.buf_size = BUF_SIZE; + params.buf_type = ODP_BUFFER_TYPE_RAW; + params.buf_opts = ODP_BUFFER_OPTS_NONE; + + pool = odp_buffer_pool_create("msg_pool", ¶ms, NULL); + if (pool == ODP_BUFFER_POOL_INVALID) { ODP_ERR("Pool create failed.\n"); return -1;