From patchwork Thu Apr 17 11:56:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 28555 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f198.google.com (mail-pd0-f198.google.com [209.85.192.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C08C220674 for ; Thu, 17 Apr 2014 11:56:56 +0000 (UTC) Received: by mail-pd0-f198.google.com with SMTP id fp1sf1023014pdb.9 for ; Thu, 17 Apr 2014 04:56:56 -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:in-reply-to :references:cc: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=IA1uGxkPDnT0bz8p+gUVWhuO0P8NU/fJkn1SBvOjRno=; b=Ysl1JEorljDtUVEtQLBOh8rRMWJhxOsEw6uQjunIF8pApNKwgdFxENVIbemkjcRhtS mVHhH1p/ScF6DoZ9w114498+PjFyqJNGClgwWVZ12gfwSozvX37+0MrUy4tcGmqSAYIv DWMzFZGHFV5iFNK5eN/sZky9ps9f+GnZGQvxwrgSbXW59j+0pKE17PayiSiZKd71gMbP VbgSNZsyqI9SvWfQcmQ5iflOIBLU8KcOwE7V+K92UVNPx1fJVk0qd53ibOCbfbePiT87 DbQ/UNH6Za/GgD1alkSxyIJmnOW19TrYjIu6Ajb22lIOWwIVAIw2QOnBfyCwf43KNzcI Zong== X-Gm-Message-State: ALoCoQlPjFWwZ7A7sY5TQwc112WWLsy0FDQ3d4XMiGJukWjf68qWKQZY4gcGdtShW1tyC1m47NRI X-Received: by 10.68.134.233 with SMTP id pn9mr7002837pbb.5.1397735816060; Thu, 17 Apr 2014 04:56:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.131 with SMTP id z3ls1111572qgd.59.gmail; Thu, 17 Apr 2014 04:56:55 -0700 (PDT) X-Received: by 10.58.185.145 with SMTP id fc17mr11793072vec.14.1397735815923; Thu, 17 Apr 2014 04:56:55 -0700 (PDT) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id j4si4412539vcv.190.2014.04.17.04.56.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Apr 2014 04:56:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id oz11so355964veb.19 for ; Thu, 17 Apr 2014 04:56:55 -0700 (PDT) X-Received: by 10.58.202.106 with SMTP id kh10mr970838vec.31.1397735815849; Thu, 17 Apr 2014 04:56:55 -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.220.221.72 with SMTP id ib8csp28974vcb; Thu, 17 Apr 2014 04:56:55 -0700 (PDT) X-Received: by 10.140.85.116 with SMTP id m107mr9628145qgd.78.1397735815135; Thu, 17 Apr 2014 04:56:55 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id v9si10417152qar.105.2014.04.17.04.56.54 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 17 Apr 2014 04:56:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wakvp-00065G-EA; Thu, 17 Apr 2014 11:56:41 +0000 Received: from mail-ee0-f50.google.com ([74.125.83.50]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wakvf-00064K-GU for lng-odp@lists.linaro.org; Thu, 17 Apr 2014 11:56:31 +0000 Received: by mail-ee0-f50.google.com with SMTP id c13so574931eek.37 for ; Thu, 17 Apr 2014 04:56:37 -0700 (PDT) X-Received: by 10.15.98.68 with SMTP id bi44mr1571570eeb.97.1397735797409; Thu, 17 Apr 2014 04:56:37 -0700 (PDT) Received: from uglx0153363.synapse.com ([195.238.92.128]) by mx.google.com with ESMTPSA id z48sm66742553eel.27.2014.04.17.04.56.36 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Apr 2014 04:56:36 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Thu, 17 Apr 2014 14:56:12 +0300 Message-Id: <1397735782-31924-2-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397735782-31924-1-git-send-email-taras.kondratiuk@linaro.org> References: <1397735782-31924-1-git-send-email-taras.kondratiuk@linaro.org> Cc: Filip Moerman Subject: [lng-odp] [PATCH v2 01/11] Move odp_buffer.h to linux-generic 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: taras.kondratiuk@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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 To be able to make platform specific changes in odp_buffer.h move it to platform directory. Signed-off-by: Taras Kondratiuk --- include/odp_buffer.h | 107 ----------------------- platform/linux-generic/include/api/odp_buffer.h | 100 +++++++++++++++++++++ 2 files changed, 100 insertions(+), 107 deletions(-) delete mode 100644 include/odp_buffer.h create mode 100644 platform/linux-generic/include/api/odp_buffer.h diff --git a/include/odp_buffer.h b/include/odp_buffer.h deleted file mode 100644 index 2d2c25a..0000000 --- a/include/odp_buffer.h +++ /dev/null @@ -1,107 +0,0 @@ -/* Copyright (c) 2013, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - - -/** - * @file - * - * ODP buffer descriptor - */ - -#ifndef ODP_BUFFER_H_ -#define ODP_BUFFER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - - - -#include - - - - - -/** - * ODP buffer - */ -typedef uint32_t odp_buffer_t; - -#define ODP_BUFFER_INVALID (0xffffffff) /**< Invalid buffer */ - - -/** - * Buffer start address - * - * @param buf Buffer handle - * - * @return Buffer start address - */ -void *odp_buffer_addr(odp_buffer_t buf); - -/** - * Buffer maximum data size - * - * @param buf Buffer handle - * - * @return Buffer maximum data size - */ -size_t odp_buffer_size(odp_buffer_t buf); - -/** - * Buffer type - * - * @param buf Buffer handle - * - * @return Buffer type - */ -int odp_buffer_type(odp_buffer_t buf); - -#define ODP_BUFFER_TYPE_INVALID (-1) /**< Buffer type invalid */ -#define ODP_BUFFER_TYPE_RAW 0 /**< Raw buffer */ -#define ODP_BUFFER_TYPE_PACKET 1 /**< Packet buffer */ -#define ODP_BUFFER_TYPE_TIMER 2 /**< Timer buffer */ - -/** - * Tests if buffer is part of a scatter/gather list - * - * @param buf Buffer handle - * - * @return 1 if belongs to a scatter list, otherwise 0 - */ -int odp_buffer_is_scatter(odp_buffer_t buf); - -/** - * Tests if buffer is valid - * - * @param buf Buffer handle - * - * @return 1 if valid, otherwise 0 - */ -int odp_buffer_is_valid(odp_buffer_t buf); - -/** - * Print buffer metadata to STDOUT - * - * @param buf Buffer handle - * - */ -void odp_buffer_print(odp_buffer_t buf); - - -#ifdef __cplusplus -} -#endif - -#endif - - - - - - - diff --git a/platform/linux-generic/include/api/odp_buffer.h b/platform/linux-generic/include/api/odp_buffer.h new file mode 100644 index 0000000..d79e76d --- /dev/null +++ b/platform/linux-generic/include/api/odp_buffer.h @@ -0,0 +1,100 @@ +/* Copyright (c) 2013, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + +/** + * @file + * + * ODP buffer descriptor + */ + +#ifndef ODP_BUFFER_H_ +#define ODP_BUFFER_H_ + +#ifdef __cplusplus +extern "C" { +#endif + + + +#include + + + + + +/** + * ODP buffer + */ +typedef uint32_t odp_buffer_t; + +#define ODP_BUFFER_INVALID (0xffffffff) /**< Invalid buffer */ + + +/** + * Buffer start address + * + * @param buf Buffer handle + * + * @return Buffer start address + */ +void *odp_buffer_addr(odp_buffer_t buf); + +/** + * Buffer maximum data size + * + * @param buf Buffer handle + * + * @return Buffer maximum data size + */ +size_t odp_buffer_size(odp_buffer_t buf); + +/** + * Buffer type + * + * @param buf Buffer handle + * + * @return Buffer type + */ +int odp_buffer_type(odp_buffer_t buf); + +#define ODP_BUFFER_TYPE_INVALID (-1) /**< Buffer type invalid */ +#define ODP_BUFFER_TYPE_RAW 0 /**< Raw buffer */ +#define ODP_BUFFER_TYPE_PACKET 1 /**< Packet buffer */ +#define ODP_BUFFER_TYPE_TIMER 2 /**< Timer buffer */ + +/** + * Tests if buffer is part of a scatter/gather list + * + * @param buf Buffer handle + * + * @return 1 if belongs to a scatter list, otherwise 0 + */ +int odp_buffer_is_scatter(odp_buffer_t buf); + +/** + * Tests if buffer is valid + * + * @param buf Buffer handle + * + * @return 1 if valid, otherwise 0 + */ +int odp_buffer_is_valid(odp_buffer_t buf); + +/** + * Print buffer metadata to STDOUT + * + * @param buf Buffer handle + * + */ +void odp_buffer_print(odp_buffer_t buf); + + +#ifdef __cplusplus +} +#endif + +#endif