From patchwork Mon Apr 28 11:41:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 29215 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A5FF920553 for ; Mon, 28 Apr 2014 11:42:15 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id jy13sf27151182veb.2 for ; Mon, 28 Apr 2014 04:42:15 -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=mDT4Td+8NYg6Dobpj4rntvlmU9Pg3tburrih1DhmYjw=; b=gVrcW3T9uV2ZbV0XyJhNaxF0e2ErKE2x1JiyH3kr3lPe4VnojAzj+dN7pMYkH1aqQi R3DMYDzuXYIl2bOrMICQqNYocZf8K1H1bY31W9v30Fj9bIkYnX+KGrNHsPs8gWjWRsXq BZwM1TaagiLUnnxfwVohUiXqR0BIzpz1dCcOhdgC+3L0PE8lLFJKh5eUcSgdJlPUX4bV wNJ/R3KcRBRGUXdNIV2ejoJK+6jjpX6/yzHmox+vMgNcr7zskt0ZdJpMSOnrPQmjzQYx /OsRBf+wJqngdPnVZ5E4X6J++/1xqtBxkCXvRfS0vO1QU47xQ5hcSbKckd694pXrLfgu xIlw== X-Gm-Message-State: ALoCoQnfx3z1CNMr2eExMf3yTamlmjreP1Q76hmTyQEFOK2K5tNSOFX5bY6mrrqQkvcqZntU7r97 X-Received: by 10.58.112.1 with SMTP id im1mr12079578veb.33.1398685335378; Mon, 28 Apr 2014 04:42:15 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.105.54 with SMTP id b51ls794325qgf.48.gmail; Mon, 28 Apr 2014 04:42:15 -0700 (PDT) X-Received: by 10.58.220.161 with SMTP id px1mr24023547vec.13.1398685335208; Mon, 28 Apr 2014 04:42:15 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id v2si3548760vet.142.2014.04.28.04.42.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:42:15 -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.128.182; Received: by mail-ve0-f182.google.com with SMTP id jw12so8054463veb.27 for ; Mon, 28 Apr 2014 04:42:15 -0700 (PDT) X-Received: by 10.52.251.199 with SMTP id zm7mr20267006vdc.21.1398685335129; Mon, 28 Apr 2014 04:42:15 -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 ib8csp110814vcb; Mon, 28 Apr 2014 04:42:14 -0700 (PDT) X-Received: by 10.140.80.209 with SMTP id c75mr30292405qgd.79.1398685334732; Mon, 28 Apr 2014 04:42:14 -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 u10si7603214qcz.58.2014.04.28.04.42.14 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:42:14 -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 1WejwP-0002ow-Pm; Mon, 28 Apr 2014 11:41:45 +0000 Received: from mail-lb0-f177.google.com ([209.85.217.177]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wejvv-0002le-41 for lng-odp@lists.linaro.org; Mon, 28 Apr 2014 11:41:15 +0000 Received: by mail-lb0-f177.google.com with SMTP id z11so4845017lbi.36 for ; Mon, 28 Apr 2014 04:41:37 -0700 (PDT) X-Received: by 10.112.186.98 with SMTP id fj2mr679228lbc.54.1398685297227; Mon, 28 Apr 2014 04:41:37 -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.33 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:41:34 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Mon, 28 Apr 2014 14:41:05 +0300 Message-Id: <1398685276-4610-7-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 06/17] Split out platform-specific part of odp_buffer_pool.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_pool.h | 20 +++------------ .../linux-generic/include/plat/odp_buffer_pool.h | 26 ++++++++++++++++++++ 2 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 platform/linux-generic/include/plat/odp_buffer_pool.h diff --git a/include/odp_buffer_pool.h b/include/odp_buffer_pool.h index 8ac744a..767aa08 100644 --- a/include/odp_buffer_pool.h +++ b/include/odp_buffer_pool.h @@ -18,20 +18,18 @@ extern "C" { #endif - - #include #include +#include /** Maximum queue name lenght in chars */ -#define ODP_BUFFER_POOL_NAME_LEN 32 +#define ODP_BUFFER_POOL_NAME_LEN PLAT_ODP_BUFFER_POOL_NAME_LEN /** Invalid buffer pool */ -#define ODP_BUFFER_POOL_INVALID (0xffffffff) +#define ODP_BUFFER_POOL_INVALID PLAT_ODP_BUFFER_POOL_INVALID /** ODP buffer pool */ -typedef uint32_t odp_buffer_pool_t; - +typedef plat_odp_buffer_pool_t odp_buffer_pool_t; /** * Create a buffer pool @@ -89,18 +87,8 @@ odp_buffer_t odp_buffer_alloc(odp_buffer_pool_t pool); */ void odp_buffer_free(odp_buffer_t buf); - - - #ifdef __cplusplus } #endif #endif - - - - - - - diff --git a/platform/linux-generic/include/plat/odp_buffer_pool.h b/platform/linux-generic/include/plat/odp_buffer_pool.h new file mode 100644 index 0000000..7f68142 --- /dev/null +++ b/platform/linux-generic/include/plat/odp_buffer_pool.h @@ -0,0 +1,26 @@ +/* Copyright (c) 2013, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + +/** + * @file + * + * ODP buffer pool + */ + +#ifndef ODP_BUFFER_POOL_H_ +#error This file should be included only into corresponding top level header +#else + +/** Maximum queue name lenght in chars */ +#define PLAT_ODP_BUFFER_POOL_NAME_LEN 32 + +/** Invalid buffer pool */ +#define PLAT_ODP_BUFFER_POOL_INVALID (0xffffffff) + +/** ODP buffer pool */ +typedef uint32_t plat_odp_buffer_pool_t; +#endif