From patchwork Wed Sep 24 14:46:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Barbu X-Patchwork-Id: 37839 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B2455204FF for ; Wed, 24 Sep 2014 14:47:17 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id u10sf5519405lbd.3 for ; Wed, 24 Sep 2014 07:47:16 -0700 (PDT) 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: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=5hma/WBrc2gsoY/6x6T1PuQwCEXGjRTncuP4FqTOqVQ=; b=dBkFHIQI0X4nKzNEBod7CbGArbOvWeobHME6jlrlaC/S75dSB3qRKK8QQp5Vb2l579 q6+7w9lj02joq4gYzva3TprNt4vs/sVOOh6ktOjpo1YmAdss/fHamnKJoau9EgQKA+VA 95sp6cEd2sYwWdRYGKYYvmb5Ihe/hDXEs+Ng938pl9aB8E3+4fCuWt9ebpBTOnK7dmDR mSlVDHxvv25iIRu1Co8FDdBs8CeY7SaEydt/kgB/R86N2Yhdp94NkNvtp1DcFlGkAB5C E1KwGeFwaTFQG03OWf12FKovWLK5K/DfjULtizcPThmxp/MiR0wgQkyBTytGifMadY9R 1TWA== X-Gm-Message-State: ALoCoQkVrLLJCdRjdWu6mxI7BoAEcdYkRmOUiD5OYSFlEOeMDPBuwKGkeWHPqfpvKaCq/685zjTV X-Received: by 10.180.160.169 with SMTP id xl9mr4138362wib.7.1411570036499; Wed, 24 Sep 2014 07:47:16 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.20.6 with SMTP id j6ls118248lae.24.gmail; Wed, 24 Sep 2014 07:47:16 -0700 (PDT) X-Received: by 10.152.4.97 with SMTP id j1mr6768351laj.73.1411570036343; Wed, 24 Sep 2014 07:47:16 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com [209.85.215.41]) by mx.google.com with ESMTPS id bg9si23188177lbb.3.2014.09.24.07.47.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Sep 2014 07:47:16 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by mail-la0-f41.google.com with SMTP id s18so10864196lam.14 for ; Wed, 24 Sep 2014 07:47:16 -0700 (PDT) X-Received: by 10.112.200.134 with SMTP id js6mr6662171lbc.0.1411570035940; Wed, 24 Sep 2014 07:47:15 -0700 (PDT) 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.130.169 with SMTP id of9csp594084lbb; Wed, 24 Sep 2014 07:47:15 -0700 (PDT) X-Received: by 10.224.163.8 with SMTP id y8mr8252991qax.60.1411570034751; Wed, 24 Sep 2014 07:47:14 -0700 (PDT) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id q67si16064029qgd.122.2014.09.24.07.47.13 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 24 Sep 2014 07:47:14 -0700 (PDT) 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 1XWnqa-0003P9-K9; Wed, 24 Sep 2014 14:47:12 +0000 Received: from mail-la0-f49.google.com ([209.85.215.49]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XWnqU-0003P4-PR for lng-odp@lists.linaro.org; Wed, 24 Sep 2014 14:47:06 +0000 Received: by mail-la0-f49.google.com with SMTP id pn19so10571306lab.8 for ; Wed, 24 Sep 2014 07:47:00 -0700 (PDT) X-Received: by 10.112.129.71 with SMTP id nu7mr3215843lbb.106.1411570020268; Wed, 24 Sep 2014 07:47:00 -0700 (PDT) Received: from robucws331.enea.se (sestofw01.enea.se. [192.36.1.252]) by mx.google.com with ESMTPSA id mn4sm5857000lbb.4.2014.09.24.07.46.59 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Sep 2014 07:46:59 -0700 (PDT) From: Ciprian Barbu To: lng-odp@lists.linaro.org Date: Wed, 24 Sep 2014 17:46:46 +0300 Message-Id: <1411570006-22095-1-git-send-email-ciprian.barbu@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-Topics: patch Subject: [lng-odp] [PATCH] odp_pktio_netmap: fixed odp_shm_reserve 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: ciprian.barbu@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.215.41 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: Ciprian Barbu --- example/packet_netmap/odp_pktio_netmap.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/example/packet_netmap/odp_pktio_netmap.c b/example/packet_netmap/odp_pktio_netmap.c index 88af2e5..c65cc93 100644 --- a/example/packet_netmap/odp_pktio_netmap.c +++ b/example/packet_netmap/odp_pktio_netmap.c @@ -224,6 +224,7 @@ int main(int argc, char *argv[]) int thr_id; int num_workers; void *pool_base; + odp_shm_t shm; int i; /* Init ODP before calling anything else */ @@ -233,7 +234,9 @@ int main(int argc, char *argv[]) } /* Reserve memory for args from shared mem */ - args = odp_shm_reserve("shm_args", sizeof(args_t), ODP_CACHE_LINE_SIZE); + shm = odp_shm_reserve("shm_args", sizeof(args_t), + ODP_CACHE_LINE_SIZE, 0); + args = odp_shm_addr(shm); if (args == NULL) { ODP_ERR("Error: shared mem alloc failed.\n"); exit(EXIT_FAILURE); @@ -255,8 +258,9 @@ int main(int argc, char *argv[]) odp_init_local(thr_id); /* Create packet pool */ - pool_base = odp_shm_reserve("shm_packet_pool", - SHM_PKT_POOL_SIZE, ODP_CACHE_LINE_SIZE); + shm = odp_shm_reserve("shm_packet_pool", + SHM_PKT_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0); + pool_base = odp_shm_addr(shm); if (pool_base == NULL) { ODP_ERR("Error: packet pool mem alloc failed.\n"); exit(EXIT_FAILURE);