From patchwork Fri Aug 14 18:55:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 52461 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id A2B8D22B12 for ; Fri, 14 Aug 2015 18:59:53 +0000 (UTC) Received: by labd1 with SMTP id d1sf30511914lab.0 for ; Fri, 14 Aug 2015 11:59:52 -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=RhC+u/Y0Ph43uB0afJMIFuoiKwAbzuZJw6o6BXxJduM=; b=SCMXy6QNUcmA4MAYb1bwrOxOtbqAvEaFMYXmkn7TPM5pwbmpjxgdPepPLH+EqnTyl+ ENbYOmZh39J4FrbsnCyD66vXNqzvGgoLeUoqb19YqffJ9ke8hXzWtwLIYF/pq9MeG374 uLBenWjfpuHNrpTOobrmyHDNC9QyZXtEJZs78jPfNQImcRiFh+rxvQTzucK7kHPUuREg YiutTw3zgQwry+7/OCsXqenAvn6GCFSmttcGbJI2JKckg1d3CShbQkPNJeu9uq+khZht eHoslch4hgSlZAwwVhqP4NqUWyW8QY2bIox7BgeHHXcpFLyYfj2uUz91FCjWR+BPjszK 5KDQ== X-Gm-Message-State: ALoCoQmROKlEZV0j8RzgGET2c6CvqMhcLjPDQSklJ9p4ykhBReB/RjMbP75r+tEJB+PHPuPI7+u/ X-Received: by 10.112.54.166 with SMTP id k6mr13433478lbp.0.1439578792498; Fri, 14 Aug 2015 11:59:52 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.201 with SMTP id s9ls425309laj.40.gmail; Fri, 14 Aug 2015 11:59:52 -0700 (PDT) X-Received: by 10.152.87.52 with SMTP id u20mr45067814laz.48.1439578792351; Fri, 14 Aug 2015 11:59:52 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id y8si6492862lay.79.2015.08.14.11.59.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Aug 2015 11:59:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by lahi9 with SMTP id i9so48736514lah.2 for ; Fri, 14 Aug 2015 11:59:52 -0700 (PDT) X-Received: by 10.152.164.130 with SMTP id yq2mr36616525lab.76.1439578792245; Fri, 14 Aug 2015 11:59:52 -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 l6csp1818138lba; Fri, 14 Aug 2015 11:59:51 -0700 (PDT) X-Received: by 10.55.25.96 with SMTP id k93mr79894383qkh.20.1439578790200; Fri, 14 Aug 2015 11:59:50 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id a36si10949892qkh.103.2015.08.14.11.59.48; Fri, 14 Aug 2015 11:59:50 -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 A99DE622AA; Fri, 14 Aug 2015 18:59:48 +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 8946B6227F; Fri, 14 Aug 2015 18:59:01 +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 83FD96228E; Fri, 14 Aug 2015 18:58:12 +0000 (UTC) Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by lists.linaro.org (Postfix) with ESMTPS id 1A03C622AA for ; Fri, 14 Aug 2015 18:55:56 +0000 (UTC) Received: by wijp15 with SMTP id p15so28304535wij.0 for ; Fri, 14 Aug 2015 11:55:55 -0700 (PDT) X-Received: by 10.194.85.163 with SMTP id i3mr2633276wjz.75.1439578555339; Fri, 14 Aug 2015 11:55:55 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by smtp.googlemail.com with ESMTPSA id jr5sm9498962wjc.14.2015.08.14.11.55.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Aug 2015 11:55:54 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Fri, 14 Aug 2015 19:55:43 +0100 Message-Id: <1439578544-12730-2-git-send-email-zoltan.kiss@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1439578544-12730-1-git-send-email-zoltan.kiss@linaro.org> References: <1439578544-12730-1-git-send-email-zoltan.kiss@linaro.org> In-Reply-To: <1439486903-14811-1-git-send-email-zoltan.kiss@linaro.org> References: <1439486903-14811-1-git-send-email-zoltan.kiss@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH v4 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.215.50 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 --- v4: - fix function pointer call - add newline after declarations platform/linux-generic/odp_pool.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 14221fd..028f0be 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -140,6 +140,15 @@ 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 +369,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;