From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40054.outbound.protection.outlook.com [40.107.4.54]) by dpdk.org (Postfix) with ESMTP id 6E4B15F5F for ; Wed, 14 Mar 2018 08:58:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=8g00tP6KBmMb7wyCsq4lOIbgHOCf/MiO0LdfN1w4qDw=; b=ZZ5b2uAXOy2uPSU7rNlWe1MPJHthuKSXyBOY2W0eEYZIHYMYuMUvN6t1qN90Z2erggx6AYUUyainsq5PDl1GIZX8DC+KNN2Ua/VAxCfN9i+5ohUEh/RNjS/OY5olXJT1cdNAqihTAgF5T4+aQsdQ9bXOvvKIdXokwz1s+PpkEjs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by AM2PR04MB0754.eurprd04.prod.outlook.com (2a01:111:e400:8411::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Wed, 14 Mar 2018 07:58:02 +0000 From: Hemant Agrawal To: dev@dpdk.org, bruce.richardson@intel.com Cc: thomas@monjalon.net Date: Wed, 14 Mar 2018 13:25:59 +0530 Message-Id: <1521014166-3201-4-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521014166-3201-1-git-send-email-hemant.agrawal@nxp.com> References: <1519889597-5805-1-git-send-email-hemant.agrawal@nxp.com> <1521014166-3201-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: BM1PR0101CA0008.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:18::18) To AM2PR04MB0754.eurprd04.prod.outlook.com (2a01:111:e400:8411::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d7d30e6f-1c5f-40c7-d384-08d589815006 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0754; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0754; 3:FjMRwKPXtRxo/BXYf3t7OkTkLe2pDUf6SXNSsUUQBVwryxSJZiowx/l8ZsEoycYOvaQ9+hQvTvQLpMO+cQrFiiTHvAi3HZIhxxrwlRt8hlYUN+KctEG4og7ISToJpYVS58ke8v4lkg7YZzjUf+m3UbpD5BiC3d/O74rmQlKFXdUqYhWQ7baAIsi8qlDqIkvPOVOAXnZIGvYNpdAdR6xxyrGO1vjdPTUvIDTw8jr8GvjwTC3mKsQs6o3TP8tqfvy6; 25:05v4usM0yVh8idP89wpqB+qV/CfG3iN8azXS7W2wuBvmVDB93q+B4RFA1OYUKD1I2nqwtCiEB51h70CgywzHjNaeQrNnQzDyWCguj24EgNGLfq/Rhr0sMrLeBILNKdINJbj8yWZAQYW0Ayz5YmqwDoC9drVYTtubxWrAoXTJvQUBzbfwSOQkCCNjTAt1ZmEv8oqWCglSOD6NJxaY5vUrStKjG1ov8XGP+wYumPIkz2+k+gVUXRfGsE4CthzKBWqlY51f8BGpodh7yL+bSgFxfUgZJ27FXdgSnBbkEg6ie4LqLcRM/MwSw53QOXnOnWALSPws2+SRlTzo6gZkikEhcw==; 31:07b0FnQ9jVq63bzbX8z+F4fECcAbDepYKaiz0IK0V9KFSIO0hpmq6O6RPD0qyPBO2cDlNls2W3GlOCwguQv4ZH6Dl3AvkYx1tMh+GhVzTnh/6bAEKbhpf7B5rZH5emYOAtqJkJ0nZ59LtDPEY88hGiu/z9+LbvXJUrSL2yH5OV66udVlwgrxYSqHn+2FYNLOXNonAPBb/0aA5m8t1BkRsKSY6rosbvYaKyaRK2DUVN0= X-MS-TrafficTypeDiagnostic: AM2PR04MB0754: X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0754; 20:4ds2aHXWRDoTu6f4rmfTSdPPr8E3WWlY194AGU2L/2fGKU+Tz9A0icjQAT7dfjFekT3zD7cnrXgMhazaEzYkRhC8RXYw6UgrDJ2gX+TdQQakovHoZp/vyfWDzvV6422YIlCAqlj2Yw88oadIgfOCPSOG8ZLyRymApetmHW1a0sjhD/RLyH5GcoAEts6wtww0wQKxmkMhtAGf4Bzc7zMcm7d9eX0wQ08L+bNjvI9lZ1o39fUKY5aeClEx+HZR+3TQxNDiy1kksoJ9gvOlwQ16Dfni8S2bARP/bNxGz/z2f3egVbKHArC6+kOHxjG/Pdh7MjMsVVS6W0g5WoRRabiUpqVejoCLOyK/NPssKEaC4Aw74CWGGUOs9RT6d09wlRceD2xCge2NUFIhnuPmokraA/7LCZ13bXomoHMln1hKWsfj5/98QTzQca0shgX28AS/J4GbQHruxw0/zn+FrrbvFXBZYaI7HVa8VD3Rc1j75kZ2F5VUUcfCFI4Ij6fEqcv0; 4:JhmfsVM2K6h1RZ5umYZJmNBLP0WQOLTm7Af8hB/pQR4gp/xlxc8n9+8t/soC48LHUPAGAZm31GZd0PuX2vHDLwi23ywvKKxqgNKxBPbG3XKORH+JkDXdsUB8z/Xel5uGUQhKMV64bIMns3GI/jZ03UvrqY3RUvjEOk3ZIBAVC5wD7zrXR2h9vh53ZfFvMKi8+IP8SnHxO5t7/OIvs3FAnzg7R4Euu4OLnQPSc3RcsIGs+3940jw9+rLicKcogLdZysPLfzq4dzQWRKzUspSMVTfvUUBC8ejU9ZUzujAk/Oihc+0wygauarT6TrfC6ugVS0vOw2dxUoEHQS9CB+ezP+biH+jN8dskiR8KTCIw5GI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(131327999870524)(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501244)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM2PR04MB0754; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0754; X-Forefront-PRVS: 0611A21987 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(346002)(39380400002)(396003)(366004)(199004)(189003)(316002)(4326008)(16526019)(47776003)(6506007)(66066001)(186003)(52116002)(86362001)(386003)(55236004)(59450400001)(48376002)(2906002)(97736004)(68736007)(26005)(5660300001)(25786009)(105586002)(76176011)(51416003)(6512007)(50466002)(5009440100003)(6666003)(36756003)(16586007)(81166006)(6486002)(8936002)(106356001)(305945005)(7736002)(50226002)(6116002)(53936002)(81156014)(8676002)(2950100002)(3846002)(478600001)(110426004)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0754; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0754; 23:blrWbFOWWXzMeK8sr4cHql4V4a53NAK3xWpOf4oZe?= =?us-ascii?Q?vs3VqOQbtFRM1JwHY4O1ouHMMsdC7nVYREMXRePVLpzWvvchhqJ2GGtMoouM?= =?us-ascii?Q?5jM8YlNS02vTg/dvp+yteyIsb8sZo1ezrh1sjUpw6CLq71XHFVmb8aVNHOjm?= =?us-ascii?Q?20+29TcQ1tVy/KzNAJ8FEy6aY8e4yVlqOgsWvjewtNMWu7KKlHCmuprxQdJs?= =?us-ascii?Q?xOg2GA518yYJ8L4+n/gRWk9ktE5Ie1xpxT4SYt1kXeI74GbEGA24ncKWH9sm?=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G6e3Ipvy0L6hpDf4glD39jnyHJ37PrDUufRsmqyzc8Cluq86rRZQETEKZcYIoDiXOM1MpLmCMTPJL+2I7zoioHc4nf80rNc1lh1NDBK45hUfOnvUcT4DlA77uo4xeFKPw7+wdqNbdtBV7nlDVkd0jxBQTCY6xhtfh7dfzPl8XQoRte SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2018 07:58:02.1703 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d7d30e6f-1c5f-40c7-d384-08d589815006 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0754 Subject: [dpdk-dev] [PATCH v3 03/10] dpaa: prepare for 32 bit compilation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 07:58:04 -0000 This patch prepares the dpaa drivers for compilation on 32 bit machine. Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/base/fman/fman.c | 2 +- drivers/bus/dpaa/base/qbman/bman_driver.c | 2 +- drivers/bus/dpaa/dpaa_bus.c | 3 +-- drivers/crypto/dpaa_sec/dpaa_sec.c | 30 +++++++++++++++--------------- drivers/mempool/dpaa/dpaa_mempool.c | 10 +++++----- drivers/mempool/dpaa/dpaa_mempool.h | 2 +- drivers/net/dpaa/dpaa_rxtx.c | 19 +++++++++---------- 7 files changed, 33 insertions(+), 35 deletions(-) diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c index bda62e0..e6fd5f3 100644 --- a/drivers/bus/dpaa/base/fman/fman.c +++ b/drivers/bus/dpaa/base/fman/fman.c @@ -300,7 +300,7 @@ fman_if_init(const struct device_node *dpa_node) _errno = fman_get_mac_index(regs_addr_host, &__if->__if.mac_idx); if (_errno) { - FMAN_ERR(-EINVAL, "Invalid register address: %lu", + FMAN_ERR(-EINVAL, "Invalid register address: %" PRIx64, regs_addr_host); goto err; } diff --git a/drivers/bus/dpaa/base/qbman/bman_driver.c b/drivers/bus/dpaa/base/qbman/bman_driver.c index a1ef392..1381da3 100644 --- a/drivers/bus/dpaa/base/qbman/bman_driver.c +++ b/drivers/bus/dpaa/base/qbman/bman_driver.c @@ -161,7 +161,7 @@ int bman_init_ccsr(const struct device_node *node) PROT_WRITE, MAP_SHARED, ccsr_map_fd, phys_addr); if (bman_ccsr_map == MAP_FAILED) { pr_err("Can not map BMan CCSR base Bman: " - "0x%x Phys: 0x%lx size 0x%lx", + "0x%x Phys: 0x%" PRIx64 " size 0x%" PRIu64, *bman_addr, phys_addr, regs_size); return -EINVAL; } diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index f2bb3b1..3535da5 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -235,7 +234,7 @@ int rte_dpaa_portal_init(void *arg) BUS_INIT_FUNC_TRACE(); - if ((uint64_t)arg == 1 || cpu == LCORE_ID_ANY) + if ((size_t)arg == 1 || cpu == LCORE_ID_ANY) cpu = rte_get_master_lcore(); /* if the core id is not supported */ else diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 18681cf..c5191ce 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -84,7 +84,7 @@ dpaa_sec_alloc_ctx(dpaa_sec_session *ses) dcbz_64(&ctx->job.sg[SG_CACHELINE_3]); ctx->ctx_pool = ses->ctx_pool; - ctx->vtop_offset = (uint64_t) ctx + ctx->vtop_offset = (size_t) ctx - rte_mempool_virt2iova(ctx); return ctx; @@ -97,7 +97,7 @@ dpaa_mem_vtop(void *vaddr) uint64_t vaddr_64, paddr; int i; - vaddr_64 = (uint64_t)vaddr; + vaddr_64 = (size_t)vaddr; for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) { if (vaddr_64 >= memseg[i].addr_64 && vaddr_64 < memseg[i].addr_64 + memseg[i].len) { @@ -107,14 +107,14 @@ dpaa_mem_vtop(void *vaddr) return (rte_iova_t)paddr; } } - return (rte_iova_t)(NULL); + return (size_t)NULL; } /* virtual address conversin when mempool support is available for ctx */ static inline phys_addr_t dpaa_mem_vtop_ctx(struct dpaa_sec_op_ctx *ctx, void *vaddr) { - return (uint64_t)vaddr - ctx->vtop_offset; + return (size_t)vaddr - ctx->vtop_offset; } static inline void * @@ -125,8 +125,8 @@ dpaa_mem_ptov(rte_iova_t paddr) for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) { if (paddr >= memseg[i].iova && - (char *)paddr < (char *)memseg[i].iova + memseg[i].len) - return (void *)(memseg[i].addr_64 + + paddr < memseg[i].iova + memseg[i].len) + return (void *)(size_t)(memseg[i].addr_64 + (paddr - memseg[i].iova)); } return NULL; @@ -406,7 +406,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) return -ENOTSUP; } - alginfo_c.key = (uint64_t)ses->cipher_key.data; + alginfo_c.key = (size_t)ses->cipher_key.data; alginfo_c.keylen = ses->cipher_key.length; alginfo_c.key_enc_flags = 0; alginfo_c.key_type = RTA_DATA_IMM; @@ -424,7 +424,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) return -ENOTSUP; } - alginfo_a.key = (uint64_t)ses->auth_key.data; + alginfo_a.key = (size_t)ses->auth_key.data; alginfo_a.keylen = ses->auth_key.length; alginfo_a.key_enc_flags = 0; alginfo_a.key_type = RTA_DATA_IMM; @@ -439,7 +439,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) PMD_TX_LOG(ERR, "not supported aead alg\n"); return -ENOTSUP; } - alginfo.key = (uint64_t)ses->aead_key.data; + alginfo.key = (size_t)ses->aead_key.data; alginfo.keylen = ses->aead_key.length; alginfo.key_enc_flags = 0; alginfo.key_type = RTA_DATA_IMM; @@ -463,7 +463,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) return -ENOTSUP; } - alginfo_c.key = (uint64_t)ses->cipher_key.data; + alginfo_c.key = (size_t)ses->cipher_key.data; alginfo_c.keylen = ses->cipher_key.length; alginfo_c.key_enc_flags = 0; alginfo_c.key_type = RTA_DATA_IMM; @@ -474,7 +474,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) return -ENOTSUP; } - alginfo_a.key = (uint64_t)ses->auth_key.data; + alginfo_a.key = (size_t)ses->auth_key.data; alginfo_a.keylen = ses->auth_key.length; alginfo_a.key_enc_flags = 0; alginfo_a.key_type = RTA_DATA_IMM; @@ -493,15 +493,15 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) if (cdb->sh_desc[2] & 1) alginfo_c.key_type = RTA_DATA_IMM; else { - alginfo_c.key = (uint64_t)dpaa_mem_vtop( - (void *)alginfo_c.key); + alginfo_c.key = (size_t)dpaa_mem_vtop( + (void *)(size_t)alginfo_c.key); alginfo_c.key_type = RTA_DATA_PTR; } if (cdb->sh_desc[2] & (1<<1)) alginfo_a.key_type = RTA_DATA_IMM; else { - alginfo_a.key = (uint64_t)dpaa_mem_vtop( - (void *)alginfo_a.key); + alginfo_a.key = (size_t)dpaa_mem_vtop( + (void *)(size_t)alginfo_a.key); alginfo_a.key_type = RTA_DATA_PTR; } cdb->sh_desc[0] = 0; diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c index fb3b6ba..7b82f4b 100644 --- a/drivers/mempool/dpaa/dpaa_mempool.c +++ b/drivers/mempool/dpaa/dpaa_mempool.c @@ -115,7 +115,8 @@ dpaa_buf_free(struct dpaa_bp_info *bp_info, uint64_t addr) struct bm_buffer buf; int ret; - DPAA_MEMPOOL_DEBUG("Free 0x%lx to bpid: %d", addr, bp_info->bpid); + DPAA_MEMPOOL_DEBUG("Free 0x%" PRIx64 " to bpid: %d", + addr, bp_info->bpid); bm_buffer_set64(&buf, addr); retry: @@ -154,8 +155,7 @@ dpaa_mbuf_free_bulk(struct rte_mempool *pool, if (unlikely(!bp_info->ptov_off)) { /* buffers are from single mem segment */ if (bp_info->flags & DPAA_MPOOL_SINGLE_SEGMENT) { - bp_info->ptov_off - = (uint64_t)obj_table[i] - phy; + bp_info->ptov_off = (size_t)obj_table[i] - phy; rte_dpaa_bpid_info[bp_info->bpid].ptov_off = bp_info->ptov_off; } @@ -282,8 +282,8 @@ dpaa_register_memory_area(const struct rte_mempool *mp, bp_info = DPAA_MEMPOOL_TO_POOL_INFO(mp); total_elt_sz = mp->header_size + mp->elt_size + mp->trailer_size; - DPAA_MEMPOOL_DEBUG("Req size %lu vs Available %u\n", - len, total_elt_sz * mp->size); + DPAA_MEMPOOL_DEBUG("Req size %" PRIx64 " vs Available %u\n", + (uint64_t)len, total_elt_sz * mp->size); /* Detect pool area has sufficient space for elements in this memzone */ if (len >= total_elt_sz * mp->size) diff --git a/drivers/mempool/dpaa/dpaa_mempool.h b/drivers/mempool/dpaa/dpaa_mempool.h index 9435dd2..092f326 100644 --- a/drivers/mempool/dpaa/dpaa_mempool.h +++ b/drivers/mempool/dpaa/dpaa_mempool.h @@ -46,7 +46,7 @@ static inline void * DPAA_MEMPOOL_PTOV(struct dpaa_bp_info *bp_info, uint64_t addr) { if (bp_info->ptov_off) - return ((void *)(addr + bp_info->ptov_off)); + return ((void *) (size_t)(addr + bp_info->ptov_off)); return rte_dpaa_mem_ptov(addr); } diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index 0dea8e7..bdb7f66 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -59,7 +59,7 @@ } while (0) #if (defined RTE_LIBRTE_DPAA_DEBUG_DRIVER) -void dpaa_display_frame(const struct qm_fd *fd) +static void dpaa_display_frame(const struct qm_fd *fd) { int ii; char *ptr; @@ -90,11 +90,10 @@ static inline void dpaa_slow_parsing(struct rte_mbuf *m __rte_unused, /*TBD:XXX: to be implemented*/ } -static inline void dpaa_eth_packet_info(struct rte_mbuf *m, - uint64_t fd_virt_addr) +static inline void dpaa_eth_packet_info(struct rte_mbuf *m, void *fd_virt_addr) { struct annotations_t *annot = GET_ANNOTATIONS(fd_virt_addr); - uint64_t prs = *((uint64_t *)(&annot->parse)) & DPAA_PARSE_MASK; + uint64_t prs = *((uintptr_t *)(&annot->parse)) & DPAA_PARSE_MASK; DPAA_DP_LOG(DEBUG, " Parsing mbuf: %p with annotations: %p", m, annot); @@ -351,7 +350,7 @@ dpaa_eth_sg_to_mbuf(const struct qm_fd *fd, uint32_t ifid) prev_seg = cur_seg; } - dpaa_eth_packet_info(first_seg, (uint64_t)vaddr); + dpaa_eth_packet_info(first_seg, vaddr); rte_pktmbuf_free_seg(temp); return first_seg; @@ -394,7 +393,7 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid) mbuf->ol_flags = 0; mbuf->next = NULL; rte_mbuf_refcnt_set(mbuf, 1); - dpaa_eth_packet_info(mbuf, (uint64_t)mbuf->buf_addr); + dpaa_eth_packet_info(mbuf, mbuf->buf_addr); return mbuf; } @@ -455,7 +454,7 @@ dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr, mbuf->ol_flags = 0; mbuf->next = NULL; rte_mbuf_refcnt_set(mbuf, 1); - dpaa_eth_packet_info(mbuf, (uint64_t)mbuf->buf_addr); + dpaa_eth_packet_info(mbuf, mbuf->buf_addr); } } @@ -593,7 +592,7 @@ uint16_t dpaa_eth_queue_rx(void *q, static void *dpaa_get_pktbuf(struct dpaa_bp_info *bp_info) { int ret; - uint64_t buf = 0; + size_t buf = 0; struct bm_buffer bufs; ret = bman_acquire(bp_info->bp, &bufs, 1, 0); @@ -602,10 +601,10 @@ static void *dpaa_get_pktbuf(struct dpaa_bp_info *bp_info) return (void *)buf; } - DPAA_DP_LOG(DEBUG, "got buffer 0x%lx from pool %d", + DPAA_DP_LOG(DEBUG, "got buffer 0x%" PRIx64 " from pool %d", (uint64_t)bufs.addr, bufs.bpid); - buf = (uint64_t)DPAA_MEMPOOL_PTOV(bp_info, bufs.addr) + buf = (size_t)DPAA_MEMPOOL_PTOV(bp_info, bufs.addr) - bp_info->meta_data_size; if (!buf) goto out; -- 2.7.4