From patchwork Wed May 14 17:05:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rosenboim, Leonid" X-Patchwork-Id: 30179 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E15A72055D for ; Wed, 14 May 2014 17:05:38 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id rp18sf10357630iec.5 for ; Wed, 14 May 2014 10:05:38 -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:thread-topic:thread-index :date:message-id:references:in-reply-to:accept-language:mime-version :cc:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-language:content-type; bh=AlvXOZnetUCP3R8veNKIjR9lHBY4AfcZ9N2kcAjrbos=; b=Gp6nEOnZu0q5XzduzTNpoXKdqXna7sNuROoXc80fyPlmdqawM6VcMNIqxmOyPTEff3 GjRw/ok97s5UY1V+zJWZxdI4qpW9Wd1dwBYBdihgdTitrMAcmCrNGIplruhEQH83KXtf nA9+gsdd8BEI41wsTgKa9f1ONy7b0kS1tdTQ3u6cXza6il/tIVzfgPLOtrE30oUwD6Mu KQi3d3SftIoKT66f0hvaj4eGNAHM04am8xMrc8kizc1yaMpQONlxstCsCj6MKhNp+exa RFZvh02obgMebvMXPZVVOjDlokyYPgGVGjv22JftDsz4eCdXm9ZOCSO5Jgfbuy3vpZ9D wpaQ== X-Gm-Message-State: ALoCoQnaNQon9asFti1MhBU++sOojvBY+OuKT+57K960kPnsIgduf9nJD+MgJRWSb2+tBaT9qUkI X-Received: by 10.50.254.1 with SMTP id ae1mr17883005igd.6.1400087138431; Wed, 14 May 2014 10:05:38 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.24.181 with SMTP id 50ls1130499qgr.92.gmail; Wed, 14 May 2014 10:05:38 -0700 (PDT) X-Received: by 10.52.145.211 with SMTP id sw19mr16639vdb.75.1400087138317; Wed, 14 May 2014 10:05:38 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id m2si423590vcx.181.2014.05.14.10.05.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 May 2014 10:05:38 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.177 as permitted sender) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id db11so2748432veb.36 for ; Wed, 14 May 2014 10:05:38 -0700 (PDT) X-Received: by 10.58.188.14 with SMTP id fw14mr4078005vec.14.1400087138117; Wed, 14 May 2014 10:05:38 -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 ib8csp256708vcb; Wed, 14 May 2014 10:05:37 -0700 (PDT) X-Received: by 10.224.67.131 with SMTP id r3mr5468662qai.75.1400087137024; Wed, 14 May 2014 10:05:37 -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 b39si1203870qge.56.2014.05.14.10.05.36 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 14 May 2014 10:05:37 -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 1Wkcbk-0005TW-4P; Wed, 14 May 2014 17:04:44 +0000 Received: from mail-by2on0135.outbound.protection.outlook.com ([207.46.100.135] helo=na01-by2-obe.outbound.protection.outlook.com) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wkcbd-0005TR-Sk for lng-odp@lists.linaro.org; Wed, 14 May 2014 17:04:38 +0000 Received: from BN1PR07MB023.namprd07.prod.outlook.com (10.255.225.41) by BN1PR07MB022.namprd07.prod.outlook.com (10.255.225.40) with Microsoft SMTP Server (TLS) id 15.0.944.11; Wed, 14 May 2014 17:05:23 +0000 Received: from BN1PR07MB023.namprd07.prod.outlook.com ([169.254.8.34]) by BN1PR07MB023.namprd07.prod.outlook.com ([169.254.8.34]) with mapi id 15.00.0944.000; Wed, 14 May 2014 17:05:23 +0000 From: "Rosenboim, Leonid" To: Vincent Hsu , Taras Kondratiuk Thread-Topic: [lng-odp] [PATCH 2/4] extend to 64 bit addressing Thread-Index: AQHPbrrsCrimGDCK+UuU+T7sWUkClZs/ZKCAgADqMw8= Date: Wed, 14 May 2014 17:05:22 +0000 Message-ID: <1400087120499.87673@caviumnetworks.com> References: <1399989949-14234-1-git-send-email-vincent.hsu@linaro.org> <1399989949-14234-3-git-send-email-vincent.hsu@linaro.org> <5372316D.3020204@linaro.org>, In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [64.2.3.195] x-forefront-prvs: 0211965D06 x-forefront-antispam-report: SFV:NSPM; SFS:(10019001)(428001)(199002)(189002)(377454003)(479174003)(24454002)(19580395003)(74502001)(66066001)(81542001)(92566001)(83322001)(19580405001)(76176999)(16236675002)(85852003)(92726001)(36756003)(76482001)(99396002)(19625215002)(50986999)(21056001)(31966008)(54356999)(46102001)(99286001)(80022001)(81342001)(77982001)(74662001)(83072002)(79102001)(20776003)(64706001)(101416001)(87936001)(86362001)(2656002)(4396001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR07MB022; H:BN1PR07MB023.namprd07.prod.outlook.com; FPR:; MLV:sfv; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (: caviumnetworks.com does not designate permitted sender hosts) MIME-Version: 1.0 X-OriginatorOrg: caviumnetworks.com X-Topics: patch Cc: lng-odp-forward Subject: Re: [lng-odp] [PATCH 2/4] extend to 64 bit addressing 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: , 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: leonid.rosenboim@caviumnetworks.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.177 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 Content-Language: en-US ?A common way to define an integer to be the same size as a native pointer is: typedef unsigned long odp_buffer_t; This will make the type capable of containing either an index to a table, or a pointer to an implementation-specific structure. Another, more opaque alternative would be: typedef struct udp_plat_buffer_s *odp_buffer_t; This hides the details of the structure in the application code, but forces the ID type to be a pointer, without allowing the application to de-reference such a pointer and freeing the application of the need to have the definition of the platform-specific structure. Just my 2 cents, - Leo diff --git a/include/odp_buffer.h b/include/odp_buffer.h index d79e76d..8bdd573 100644 --- a/include/odp_buffer.h +++ b/include/odp_buffer.h @@ -29,7 +29,7 @@ extern "C" { /** * ODP buffer */ -typedef uint32_t odp_buffer_t; +typedef uint64_t odp_buffer_t; #define ODP_BUFFER_INVALID (0xffffffff) /**< Invalid buffer */ diff --git a/include/odp_buffer_pool.h b/include/odp_buffer_pool.h index 9112489..0e01f8b 100644 --- a/include/odp_buffer_pool.h +++ b/include/odp_buffer_pool.h @@ -30,7 +30,7 @@ extern "C" { #define ODP_BUFFER_POOL_INVALID (0xffffffff) /** ODP buffer pool */ -typedef uint32_t odp_buffer_pool_t; +typedef uint64_t odp_buffer_pool_t; /** diff --git a/include/odp_packet.h b/include/odp_packet.h index f7014fb..cf5a199 100644 --- a/include/odp_packet.h +++ b/include/odp_packet.h @@ -24,7 +24,7 @@ extern "C" { /** * ODP packet descriptor */ -typedef uint32_t odp_packet_t; +typedef uint64_t odp_packet_t; /** Invalid packet */ #define ODP_PACKET_INVALID ODP_BUFFER_INVALID