From patchwork Mon Apr 14 11:55:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 28311 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B5A3F20534 for ; Mon, 14 Apr 2014 11:56:08 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id p10sf28056990pdj.7 for ; Mon, 14 Apr 2014 04:56:07 -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=RVSiy1cltsEZHkoAN5I112RLRIj6GfUKB84O34b3T+8=; b=k9PwSf2zQSfW/Q/e4v0Ds1ydxTMzjsXGVoTIjCNbiK6qdB11042XthPfnCPHCsSoZQ ahLaFghf0w1fssFwB8A74mHW8WAlD1uGbYmnnqm7Xi2DQPu+8ocdP0Dzx+TVzzpl/eVz R2ykNGdoJ4bwHKTEUGfRcuQFFZG3oDTXUtoX9d69knblbem1psXDWgjL+zPo9FWqKAEA py2gb4Lg+QVoZX8MvxlJUQmovxjS59v1MSL9xLXvsdZ2JucwIMJqdWEqFTVbDKCEaK7Q wdYJjDhG5eoBMs0MZQjBRcInKoF9AF76433ee4MoD0ytnBmjT7WE134FkPQHCqhKQ9US PHGg== X-Gm-Message-State: ALoCoQlIqSNleU1yapBeoUFOQ1dj0gtMCFHB1GHtrQAFI1ys7zEMln0Tf4ebdTUbaSToxE3s+XUh X-Received: by 10.68.201.7 with SMTP id jw7mr2901498pbc.8.1397476567762; Mon, 14 Apr 2014 04:56:07 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.92.163 with SMTP id b32ls2576664qge.22.gmail; Mon, 14 Apr 2014 04:56:07 -0700 (PDT) X-Received: by 10.220.170.202 with SMTP id e10mr36285688vcz.20.1397476567655; Mon, 14 Apr 2014 04:56:07 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id cb3si2701977vdc.41.2014.04.14.04.56.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 04:56:07 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id ib6so7584502vcb.27 for ; Mon, 14 Apr 2014 04:56:07 -0700 (PDT) X-Received: by 10.220.190.197 with SMTP id dj5mr24906164vcb.19.1397476567570; Mon, 14 Apr 2014 04:56:07 -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 ib8csp141204vcb; Mon, 14 Apr 2014 04:56:07 -0700 (PDT) X-Received: by 10.140.86.168 with SMTP id p37mr47526311qgd.23.1397476567148; Mon, 14 Apr 2014 04:56:07 -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 s6si6588030qaj.62.2014.04.14.04.56.05 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 14 Apr 2014 04:56:07 -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 1WZfUT-0001kO-FV; Mon, 14 Apr 2014 11:55:57 +0000 Received: from mail-lb0-f176.google.com ([209.85.217.176]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WZfUK-0001jZ-8Q for lng-odp@lists.linaro.org; Mon, 14 Apr 2014 11:55:48 +0000 Received: by mail-lb0-f176.google.com with SMTP id 10so5477365lbg.21 for ; Mon, 14 Apr 2014 04:55:49 -0700 (PDT) X-Received: by 10.152.235.3 with SMTP id ui3mr29442641lac.2.1397476549812; Mon, 14 Apr 2014 04:55:49 -0700 (PDT) Received: from uglx0153363.synapse.com ([195.238.92.128]) by mx.google.com with ESMTPSA id bm3sm14022014lbb.12.2014.04.14.04.55.48 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 04:55:49 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Mon, 14 Apr 2014 14:55:21 +0300 Message-Id: <1397476530-20816-2-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397476530-20816-1-git-send-email-taras.kondratiuk@linaro.org> References: <1397476530-20816-1-git-send-email-taras.kondratiuk@linaro.org> Cc: Filip Moerman Subject: [lng-odp] [PATCH 01/10] 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.220.182 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 | 107 +++++++++++++++++++++++ 2 files changed, 107 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..2d2c25a --- /dev/null +++ b/platform/linux-generic/include/api/odp_buffer.h @@ -0,0 +1,107 @@ +/* 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 + + + + + + +