From patchwork Thu Aug 13 17:28:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 52405 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by patches.linaro.org (Postfix) with ESMTPS id 985782031F for ; Thu, 13 Aug 2015 17:29:28 +0000 (UTC) Received: by labia3 with SMTP id ia3sf19612084lab.1 for ; Thu, 13 Aug 2015 10:29:27 -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:delivered-to:from:to:date :message-id:in-reply-to:references:in-reply-to:references:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=4ue4GPYiNSFAqqAKO/jFmB4XvzvUip2P0GJN3cUtvxM=; b=W/2cyQsF65Go4rc0zpCeIcyKoYHn2JngEoQczeWRkMIHf/B9qZf6V/Sv645TaEao1d q9DDFtolASYN284/FsYuoXEKJYAf9INewCtSb+DZtOTJExnTIJQsmFHBovwDHs9LHMTc je//8dWo8SzI+MSx1KfGPQsPkEdwxOyKQivgeGRndObtn+/gF9IP6rpoPnCPMdLzGjjZ Z919F9PWePda3oC/JVwhQvvRByDOXdIxH6OqpZqc4asbFYIZGCSqnKhh+kEJuqO148CU CIuJnl4qRWtRDm8iTMf74g36mjTbC7AICNwnMNOaxIct4lXrnyPvBBXtRSpqcHH1qC6y AmTw== X-Gm-Message-State: ALoCoQljIZ+6L7wI8t2EsQjJrB9p7wmTl7kVW/UICo3cG0YssDeSWpodxXkLlzs4QIH00U+F/W4E X-Received: by 10.152.115.196 with SMTP id jq4mr11479490lab.1.1439486967617; Thu, 13 Aug 2015 10:29:27 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.162 with SMTP id z2ls242101laj.101.gmail; Thu, 13 Aug 2015 10:29:27 -0700 (PDT) X-Received: by 10.152.87.116 with SMTP id w20mr37301337laz.119.1439486967467; Thu, 13 Aug 2015 10:29:27 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id ro2si3236899lbb.135.2015.08.13.10.29.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Aug 2015 10:29:27 -0700 (PDT) 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 lbbpu9 with SMTP id pu9so31165184lbb.3 for ; Thu, 13 Aug 2015 10:29:27 -0700 (PDT) X-Received: by 10.152.164.130 with SMTP id yq2mr29236899lab.76.1439486967329; Thu, 13 Aug 2015 10:29:27 -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.7.198 with SMTP id l6csp1081358lba; Thu, 13 Aug 2015 10:29:26 -0700 (PDT) X-Received: by 10.50.109.233 with SMTP id hv9mr31515188igb.92.1439486965621; Thu, 13 Aug 2015 10:29:25 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j9si1979172igg.6.2015.08.13.10.29.24; Thu, 13 Aug 2015 10:29:25 -0700 (PDT) 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; Received: by lists.linaro.org (Postfix, from userid 109) id 90A2C621F2; Thu, 13 Aug 2015 17:29:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id EA449621E6; Thu, 13 Aug 2015 17:29:15 +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 CA5C5621F0; Thu, 13 Aug 2015 17:29:12 +0000 (UTC) Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by lists.linaro.org (Postfix) with ESMTPS id 0CAE2621E7 for ; Thu, 13 Aug 2015 17:28:40 +0000 (UTC) Received: by wicne3 with SMTP id ne3so267915858wic.1 for ; Thu, 13 Aug 2015 10:28:39 -0700 (PDT) X-Received: by 10.180.12.148 with SMTP id y20mr56605441wib.80.1439486919294; Thu, 13 Aug 2015 10:28:39 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by smtp.googlemail.com with ESMTPSA id yu4sm4315997wjc.43.2015.08.13.10.28.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Aug 2015 10:28:38 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Thu, 13 Aug 2015 18:28:22 +0100 Message-Id: <1439486903-14811-2-git-send-email-zoltan.kiss@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1439486903-14811-1-git-send-email-zoltan.kiss@linaro.org> References: <1439486903-14811-1-git-send-email-zoltan.kiss@linaro.org> In-Reply-To: <1439403136-26964-1-git-send-email-zoltan.kiss@linaro.org> References: <1439403136-26964-1-git-send-email-zoltan.kiss@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH v3 2/3] linux-generic: pool: implement user area init support X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 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" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zoltan.kiss@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.mailfrom=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: Zoltan Kiss --- platform/linux-generic/odp_pool.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 14221fd..2cc8441 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -140,6 +140,14 @@ int odp_pool_term_local(void) return 0; } +static void packet_uarea_init(odp_pool_param_t *params, odp_buffer_hdr_t *tmp) +{ + if (params->type == ODP_POOL_PACKET && params->pkt.uarea_init) { + odp_packet_t pkt = _odp_packet_from_buffer(odp_hdr_to_buf(tmp)); + (params->pkt.uarea_init)(pkt, params->pkt.uarea_init_arg); + } +} + /** * Pool creation */ @@ -360,6 +368,8 @@ odp_pool_t odp_pool_create(const char *name, odp_pool_param_t *params) } } + packet_uarea_init(params, tmp); + /* Push buffer onto pool's freelist */ ret_buf(&pool->s, tmp); buf -= buf_stride;