From patchwork Fri Feb 13 23:14:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 44682 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f69.google.com (mail-ee0-f69.google.com [74.125.83.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E8C1C2153D for ; Fri, 13 Feb 2015 23:14:25 +0000 (UTC) Received: by mail-ee0-f69.google.com with SMTP id b15sf13880974eek.0 for ; Fri, 13 Feb 2015 15:14:25 -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: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=ayh8iBDK2ACsF66VkJf0YD8gMT6WIApmQkKkpNExAbc=; b=Mnnx8N78rBjN1+1ijC/qGLUJTp8VHYiEh483OM2Kf/3YhdSWrK7YRb4NxEYsobUGt0 6CyHK6v0AmgAZjyVwWbQTd1LMqJQkJJ4OktlbtsCvT9fbUKgasSxOE5PLYs1clN0LKq5 j0wcPH5/g8w/aY9KihsuB23LbFp6mHlsWt9WjoiZ0oJqVJn3EdMZdFOMgYgAntVW3xK7 xtnyBJKeYd6fY94E2B01wDfaj6ptNuQwmjb/xAp5gvFvVz86YL29H0ftRRcqz+tWfutc ZrXiHmn38VfWcJ2huvTdPJ43LhrUKoJiyIivSfn2FTUwyNdmf96TdcpzNoBqQFJknJ1z uq8A== X-Gm-Message-State: ALoCoQmWYnrSp1TvtfzkTgZObhcTRUPQhg9X69tI0kMxL5uPP1I/F1IZ5xDc1I1ND49lffOKGhfI X-Received: by 10.112.162.135 with SMTP id ya7mr773824lbb.14.1423869265116; Fri, 13 Feb 2015 15:14:25 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.65 with SMTP id v1ls377668laz.61.gmail; Fri, 13 Feb 2015 15:14:24 -0800 (PST) X-Received: by 10.152.9.41 with SMTP id w9mr10465250laa.17.1423869264706; Fri, 13 Feb 2015 15:14:24 -0800 (PST) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id st5si2811018lbb.56.2015.02.13.15.14.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Feb 2015 15:14:24 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by mail-lb0-f180.google.com with SMTP id z12so18243745lbi.11 for ; Fri, 13 Feb 2015 15:14:24 -0800 (PST) X-Received: by 10.112.85.68 with SMTP id f4mr10638585lbz.106.1423869264558; Fri, 13 Feb 2015 15:14:24 -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.35.133 with SMTP id h5csp161485lbj; Fri, 13 Feb 2015 15:14:23 -0800 (PST) X-Received: by 10.140.148.1 with SMTP id 1mr224164qhu.62.1423869263196; Fri, 13 Feb 2015 15:14:23 -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 j49si4547965qgd.115.2015.02.13.15.14.22 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 13 Feb 2015 15:14:23 -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 1YMPRE-0005hx-Au; Fri, 13 Feb 2015 23:14:20 +0000 Received: from mail-pa0-f46.google.com ([209.85.220.46]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YMPR8-0005gH-Rw for lng-odp@lists.linaro.org; Fri, 13 Feb 2015 23:14:14 +0000 Received: by mail-pa0-f46.google.com with SMTP id bj1so21872046pad.5 for ; Fri, 13 Feb 2015 15:14:09 -0800 (PST) X-Received: by 10.70.129.200 with SMTP id ny8mr19222223pdb.17.1423869249479; Fri, 13 Feb 2015 15:14:09 -0800 (PST) Received: from localhost.localdomain ([210.177.145.245]) by mx.google.com with ESMTPSA id bl2sm3517074pad.15.2015.02.13.15.14.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Feb 2015 15:14:08 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Fri, 13 Feb 2015 15:14:09 -0800 Message-Id: <1423869249-504-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCHv2 3/4] api: pools: normalize odp_pool_param_t layout 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.180 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 | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/include/odp/api/pool.h b/include/odp/api/pool.h index 66dc70e..b15ddd5 100644 --- a/include/odp/api/pool.h +++ b/include/odp/api/pool.h @@ -47,8 +47,10 @@ extern "C" { * Used to communicate pool creation options. */ typedef struct odp_pool_param_t { + int type; /**< Pool type */ union { struct { + uint32_t num; /**< Number of buffers in the pool */ uint32_t size; /**< Buffer size in bytes. The maximum number of bytes application will store in each @@ -58,20 +60,11 @@ typedef struct odp_pool_param_t { Use 0 for default alignment. Default will always be a multiple of 8. */ - uint32_t num; /**< Number of buffers in the pool */ } buf; struct { - uint32_t seg_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 __res1; /* Keep struct identical to buf, - until implementation is fixed */ uint32_t num; /**< The number of packets that the pool must provide that are - packet lenght 'len' bytes or + packet length 'len' bytes or smaller. */ uint32_t len; /**< Minimum packet length that the pool must provide 'num' @@ -80,16 +73,17 @@ typedef struct odp_pool_param_t { packets are larger than 'len'. Use 0 for default. */ + uint32_t seg_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. */ } pkt; struct { - uint32_t __res1; /* Keep struct identical to buf, */ - uint32_t __res2; /* until pool implementation is fixed*/ uint32_t num; /**< Number of timeouts in the pool */ } tmo; }; - - int type; /**< Pool type */ - } odp_pool_param_t; /** Packet pool*/