From patchwork Mon Apr 28 11:41:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 29214 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1D5FD20553 for ; Mon, 28 Apr 2014 11:42:09 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id i57sf1647111yha.10 for ; Mon, 28 Apr 2014 04:42:08 -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=dHtNsO6AULm8+2psCq441Fy2s4P3E6rwT64V2MTypMk=; b=c8+1rOfvzMu17ywWBm67OuHJzwVLcRcldfNLRRHE6qcSPPcFoaZ0uExIzsfkoJ+SS/ QDX91pA3eSCltSBJ3CsbQLP15wEJM44r1T6qDOQYg/dDyY+u3nZ9mOM2DPJkR6L48pXN Db2Ltq2Ism+3vgDkmapU64JJQ4miacTyMH0rqbFTKh02+H/2ssLNEVVhv++/k1cXs1fb 5AXP/duu8FNVeGr8h1Z06nCj3h0BEa/6BnB5IpbGT4dm+O80s9q+mC5sEQF19+jcqWXe AOtBPtY+ZljGVo/WhABgaFWluf7Em6l6Jm9t6N2QjMn013fuekLfWRS0kkAv2IyYjWJO lvYg== X-Gm-Message-State: ALoCoQnqzsonjbjeSCZZzBSVBU0fjKwL6kJZGF3jpiJCcNjtIETuKYL04y060Ura9b2SN0ph2Odq X-Received: by 10.236.137.50 with SMTP id x38mr12327930yhi.9.1398685328860; Mon, 28 Apr 2014 04:42:08 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.102.180 with SMTP id w49ls2595042qge.3.gmail; Mon, 28 Apr 2014 04:42:08 -0700 (PDT) X-Received: by 10.58.220.161 with SMTP id px1mr24023082vec.13.1398685328740; Mon, 28 Apr 2014 04:42:08 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id y10si3551185vei.150.2014.04.28.04.42.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:42:08 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id hy4so1927906vcb.40 for ; Mon, 28 Apr 2014 04:42:08 -0700 (PDT) X-Received: by 10.58.207.74 with SMTP id lu10mr23116237vec.15.1398685328648; Mon, 28 Apr 2014 04:42:08 -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 ib8csp110807vcb; Mon, 28 Apr 2014 04:42:08 -0700 (PDT) X-Received: by 10.224.20.196 with SMTP id g4mr32147371qab.66.1398685328251; Mon, 28 Apr 2014 04:42:08 -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 t9si7607612qct.17.2014.04.28.04.42.07 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:42:08 -0700 (PDT) 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-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WejwJ-0002oJ-GH; Mon, 28 Apr 2014 11:41:39 +0000 Received: from mail-la0-f50.google.com ([209.85.215.50]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wejvr-0002lV-6z for lng-odp@lists.linaro.org; Mon, 28 Apr 2014 11:41:11 +0000 Received: by mail-la0-f50.google.com with SMTP id gl10so1388252lab.9 for ; Mon, 28 Apr 2014 04:41:33 -0700 (PDT) X-Received: by 10.112.89.234 with SMTP id br10mr120871lbb.60.1398685293348; Mon, 28 Apr 2014 04:41:33 -0700 (PDT) Received: from uglx0153363.itg.ti.com ([195.238.92.128]) by mx.google.com with ESMTPSA id x10sm9873857lad.1.2014.04.28.04.41.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:41:32 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Mon, 28 Apr 2014 14:41:04 +0300 Message-Id: <1398685276-4610-6-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398685276-4610-1-git-send-email-taras.kondratiuk@linaro.org> References: <1398685276-4610-1-git-send-email-taras.kondratiuk@linaro.org> X-Topics: patch Cc: linaro-networking@linaro.org Subject: [lng-odp] [RFC PATCH 05/17] Split out platform-specific part of odp_buffer.h 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: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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 --- include/odp_buffer.h | 26 +++++-------------- platform/linux-generic/include/plat/odp_buffer.h | 30 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 19 deletions(-) create mode 100644 platform/linux-generic/include/plat/odp_buffer.h diff --git a/include/odp_buffer.h b/include/odp_buffer.h index 2d2c25a..cc62348 100644 --- a/include/odp_buffer.h +++ b/include/odp_buffer.h @@ -18,21 +18,20 @@ extern "C" { #endif - - #include - - - - +#include /** * ODP buffer */ -typedef uint32_t odp_buffer_t; +typedef plat_odp_buffer_t odp_buffer_t; -#define ODP_BUFFER_INVALID (0xffffffff) /**< Invalid buffer */ +#define ODP_BUFFER_INVALID PLAT_ODP_BUFFER_INVALID /**< Invalid buffer */ +#define ODP_BUFFER_TYPE_INVALID PLAT_ODP_BUFFER_TYPE_INVALID /**< Buffer type invalid */ +#define ODP_BUFFER_TYPE_RAW PLAT_ODP_BUFFER_TYPE_RAW /**< Raw buffer */ +#define ODP_BUFFER_TYPE_PACKET PLAT_ODP_BUFFER_TYPE_PACKET /**< Packet buffer */ +#define ODP_BUFFER_TYPE_TIMER PLAT_ODP_BUFFER_TYPE_TIMER /**< Timer buffer */ /** * Buffer start address @@ -61,10 +60,6 @@ size_t odp_buffer_size(odp_buffer_t buf); */ 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 @@ -98,10 +93,3 @@ void odp_buffer_print(odp_buffer_t buf); #endif #endif - - - - - - - diff --git a/platform/linux-generic/include/plat/odp_buffer.h b/platform/linux-generic/include/plat/odp_buffer.h new file mode 100644 index 0000000..6945325 --- /dev/null +++ b/platform/linux-generic/include/plat/odp_buffer.h @@ -0,0 +1,30 @@ +/* Copyright (c) 2013, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + +/** + * @file + * + * ODP buffer descriptor + */ + +#ifndef ODP_BUFFER_H_ +#error This file should be included only into corresponding top level header +#else + +/** + * ODP buffer + */ +typedef uint32_t plat_odp_buffer_t; + +#define PLAT_ODP_BUFFER_INVALID (0xffffffff) /**< Invalid buffer */ + +#define PLAT_ODP_BUFFER_TYPE_INVALID (-1) /**< Buffer type invalid */ +#define PLAT_ODP_BUFFER_TYPE_RAW 0 /**< Raw buffer */ +#define PLAT_ODP_BUFFER_TYPE_PACKET 1 /**< Packet buffer */ +#define PLAT_ODP_BUFFER_TYPE_TIMER 2 /**< Timer buffer */ + +#endif