From patchwork Thu Jun 25 12:09:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 50316 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B40C3228FC for ; Thu, 25 Jun 2015 12:10:21 +0000 (UTC) Received: by wiea6 with SMTP id a6sf21226504wie.1 for ; Thu, 25 Jun 2015 05:10:20 -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: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=EBhdCqzn1JUcqEQR8wfq2HIhEXWzA6luLHbsitPdu18=; b=FbZBsvBpDQj6cqEh+Qq9DlmdlgPVWqzTkXjK9trzrU3JVKHJiJN1rFZRMPKMS3KL2h tG/80EQ7uO39JGc6AEZCcyqRyIJMrLaar0mu/LK39KxjoHvM+Ec0h4AkbmNg9JManB4c kWIUx/QTtb0QK6wQJWUUaZ7PuVwIWMurftARMkz7MD1xCJj74yFU8I2vk1sbQJqGCfy1 wAfSUFelOPO5K5y7tb8pD5wWeR95PKTZy4t62Zy8g+KEu8qvbzgZTmTk7Y4OHwYT2WNi yW1RCMd5jWga6fK8VMyK2O2AZ0006abxBdm+yqN499bk4OAOlooQy7rw8qUoqvcjl8/B 922g== X-Gm-Message-State: ALoCoQl6bbIrwhNksODmLR5BA3m38o4+ee1uRhmZNLYxVUIbs9kI/vCwtolFcD00WE3t7tjwKllr X-Received: by 10.180.90.106 with SMTP id bv10mr2193260wib.6.1435234220944; Thu, 25 Jun 2015 05:10:20 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.227 with SMTP id lf3ls336449lab.93.gmail; Thu, 25 Jun 2015 05:10:20 -0700 (PDT) X-Received: by 10.112.209.106 with SMTP id ml10mr43993928lbc.112.1435234220586; Thu, 25 Jun 2015 05:10:20 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id ao2si21796337lac.69.2015.06.25.05.10.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jun 2015 05:10:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by lagi2 with SMTP id i2so43749130lag.2 for ; Thu, 25 Jun 2015 05:10:20 -0700 (PDT) X-Received: by 10.152.42.177 with SMTP id p17mr23007630lal.29.1435234220367; Thu, 25 Jun 2015 05:10:20 -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.108.230 with SMTP id hn6csp559231lbb; Thu, 25 Jun 2015 05:10:19 -0700 (PDT) X-Received: by 10.55.15.103 with SMTP id z100mr56551010qkg.7.1435234218930; Thu, 25 Jun 2015 05:10:18 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id ga2si5108667qcb.48.2015.06.25.05.10.16; Thu, 25 Jun 2015 05:10:18 -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 0940561E14; Thu, 25 Jun 2015 12:10:16 +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 0AC8E61DBB; Thu, 25 Jun 2015 12:09:49 +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 1D61561DBA; Thu, 25 Jun 2015 12:09:43 +0000 (UTC) Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by lists.linaro.org (Postfix) with ESMTPS id BF26161C6C for ; Thu, 25 Jun 2015 12:09:41 +0000 (UTC) Received: by oiyy130 with SMTP id y130so50760940oiy.0 for ; Thu, 25 Jun 2015 05:09:41 -0700 (PDT) X-Received: by 10.60.133.102 with SMTP id pb6mr39500084oeb.50.1435234181383; Thu, 25 Jun 2015 05:09:41 -0700 (PDT) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id yw8sm15754454obb.29.2015.06.25.05.09.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Jun 2015 05:09:40 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Thu, 25 Jun 2015 07:09:28 -0500 Message-Id: <1435234172-2015-2-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1435234172-2015-1-git-send-email-bill.fischofer@linaro.org> References: <1435234172-2015-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 2/6] api: pool: split odp_pool_params to separate include file 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: 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.215.44 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 --- include/odp/api/pool.h | 57 -------------------------- include/odp/api/pool_param.h | 95 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 57 deletions(-) create mode 100644 include/odp/api/pool_param.h diff --git a/include/odp/api/pool.h b/include/odp/api/pool.h index 0bcfb98..b95f40d 100644 --- a/include/odp/api/pool.h +++ b/include/odp/api/pool.h @@ -41,63 +41,6 @@ extern "C" { #define ODP_POOL_NAME_LEN 32 /** - * Pool parameters - * Used to communicate pool creation options. - */ -typedef struct odp_pool_param_t { - /** Pool type */ - int type; - - union { - struct { - /** Number of buffers in the pool */ - uint32_t num; - - /** Buffer size in bytes. The maximum number of bytes - application will store in each buffer. */ - uint32_t size; - - /** Minimum buffer alignment in bytes. Valid values are - powers of two. Use 0 for default alignment. - Default will always be a multiple of 8. */ - uint32_t align; - } buf; - struct { - /** The number of packets that the pool must provide - that are packet length 'len' bytes or smaller. */ - uint32_t num; - - /** Minimum packet length that the pool must provide - 'num' packets. The number of packets may be less - than 'num' when packets are larger than 'len'. - Use 0 for default. */ - uint32_t len; - - /** Minimum number of packet data bytes that are stored - in the first segment of a packet. The maximum value - is defined by ODP_CONFIG_PACKET_SEG_LEN_MAX. - Use 0 for default. */ - uint32_t seg_len; - - /** User area size in bytes. Specify as 0 if no user - area is needed. */ - uint32_t uarea_size; - } pkt; - struct { - /** Number of timeouts in the pool */ - uint32_t num; - } tmo; - }; -} odp_pool_param_t; - -/** Packet pool*/ -#define ODP_POOL_PACKET ODP_EVENT_PACKET -/** Buffer pool */ -#define ODP_POOL_BUFFER ODP_EVENT_BUFFER -/** Timeout pool */ -#define ODP_POOL_TIMEOUT ODP_EVENT_TIMEOUT - -/** * Create a pool * * This routine is used to create a pool. It take two arguments: the optional diff --git a/include/odp/api/pool_param.h b/include/odp/api/pool_param.h new file mode 100644 index 0000000..0d043a4 --- /dev/null +++ b/include/odp/api/pool_param.h @@ -0,0 +1,95 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP pool param + */ + +#ifndef ODP_API_POOL_PARAM_H_ +#define ODP_API_POOL_PARAM_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/** @addtogroup odp_buffer + * ODP Pool parameters + * @{ + */ + +/** + * Pool type + */ + +typedef enum odp_pool_type_e { + ODP_POOL_PACKET = ODP_EVENT_PACKET, + ODP_POOL_BUFFER = ODP_EVENT_BUFFER, + ODP_POOL_TIMEOUT = ODP_EVENT_TIMEOUT, +} odp_pool_type_e; + +/** + * Pool parameters + * Used to communicate pool creation options. + */ +typedef struct odp_pool_param_t { + /** Pool type */ + odp_pool_type_e type; + + union { + struct { + /** Number of buffers in the pool */ + uint32_t num; + + /** Buffer size in bytes. The maximum number of bytes + application will store in each buffer. */ + uint32_t size; + + /** Minimum buffer alignment in bytes. Valid values are + powers of two. Use 0 for default alignment. + Default will always be a multiple of 8. */ + uint32_t align; + } buf; + struct { + /** The number of packets that the pool must provide + that are packet length 'len' bytes or smaller. */ + uint32_t num; + + /** Minimum packet length that the pool must provide + 'num' packets. The number of packets may be less + than 'num' when packets are larger than 'len'. + Use 0 for default. */ + uint32_t len; + + /** Minimum number of packet data bytes that are stored + in the first segment of a packet. The maximum value + is defined by ODP_CONFIG_PACKET_SEG_LEN_MAX. + Use 0 for default. */ + uint32_t seg_len; + + /** User area size in bytes. Specify as 0 if no user + area is needed. */ + uint32_t uarea_size; + } pkt; + struct { + /** Number of timeouts in the pool */ + uint32_t num; + } tmo; + }; +} odp_pool_param_t; + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif