From patchwork Thu Mar 1 07:33:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 130122 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp2481945edc; Wed, 28 Feb 2018 23:35:36 -0800 (PST) X-Google-Smtp-Source: AG47ELvvT5FzXvjRP2XTExB/EpIrqdaUfRJirFME8NlsxKPf9sPez6aY3+UPovn3ZiLFhsTsJZE0 X-Received: by 10.223.176.77 with SMTP id g13mr809587wra.21.1519889736566; Wed, 28 Feb 2018 23:35:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519889736; cv=none; d=google.com; s=arc-20160816; b=RMVxCraSFw3dJqN/O/K694TrlBegJldb3UiIzCoWCP0fN0jXpWm34EP540VooWiD6b fWzDJaYlCCobpvpTWOqNRd7ElnrorMY7oLXLY0+Pajgge9PxOzWYYspZW8BfAXef+U0c hv2BRaBGUgA+i1cNZ2Q4Vg52kPAQWbnEky5B5Nn6YxdwGKgls4nz1kGPkVz5FJJs8lZL XZlD4+0ng4dme/Qe018y1KTiyNnSzLYLsXqfnF7wudxeKTkeiqrEBadC5NBsPhiyWOBq aa9GQtc5uVnEF/x/8GQUmHs0NS/16OacC2R8ylOXU+f0mSLZ3oCGVVeTe0zGtrKqPWvz iv2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=ww0NlpCVN/kzUqKdV7D23a9TIVnTI5AYGEJOZZotE3I=; b=Jl5bEw5otJEI0lpehSN0SKchTMJs/E12kqH2BvfLj+RkXsrzBZkSmBTid5iTWCs3al AWBb9BFFD6P4u0nvCw0km333nm1TRyMe+myKAi4ILUjHU2k7cEjnGmKBqw7NqV4vyMtO oSWgU4xF3FedqZ6ghkUVXzei8JhtDjVKFhxGxcFiuwCIsuA37FkqylQAHlullou/94df CkTmLdTXHDiBnfgmGg5eEKp0MqAwmJm2QJFokKdCasY+2mAzIoC9E9NTjaIz8VPudvWV iwxRlhD+CtrxSykFF0ix0PSQ1AwBHdAFikJHM2amCjlJHmiF45r4sTzwJ3CJAWv3Xg/m 5XVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=YeoBzkdr; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id z5si2273584wrh.291.2018.02.28.23.35.36; Wed, 28 Feb 2018 23:35:36 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=YeoBzkdr; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1DE114CAB; Thu, 1 Mar 2018 08:35:03 +0100 (CET) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0064.outbound.protection.outlook.com [104.47.2.64]) by dpdk.org (Postfix) with ESMTP id 1C6114C9B for ; Thu, 1 Mar 2018 08:35:01 +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=ww0NlpCVN/kzUqKdV7D23a9TIVnTI5AYGEJOZZotE3I=; b=YeoBzkdrtXF8tDjDPadHkNkGCcGRylmpf6lF4obDsGwiOTSpdf1byyzRScYaUTGnQbqPA0Np8s7j+oDG0RG+aCnis6a8z/uVyFbDXmtF1O+gWvxkApyNb2XOMBwYesCTMGjuonMQ+LeGOgwxO/uMp/xfGyYzq/9bxRhrmD9m3oI= 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 AM2PR04MB0753.eurprd04.prod.outlook.com (2a01:111:e400:8411::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Thu, 1 Mar 2018 07:34:58 +0000 From: Hemant Agrawal To: dev@dpdk.org, bruce.richardson@intel.com Cc: thomas@monjalon.net Date: Thu, 1 Mar 2018 13:03:10 +0530 Message-Id: <1519889597-5805-4-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519889597-5805-1-git-send-email-hemant.agrawal@nxp.com> References: <1519752352-15442-1-git-send-email-hemant.agrawal@nxp.com> <1519889597-5805-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR0101CA0043.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:c::29) To AM2PR04MB0753.eurprd04.prod.outlook.com (2a01:111:e400:8411::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d8d29ded-3d6c-45f4-cbd8-08d57f46eff4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM2PR04MB0753; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0753; 3:wi+9LFHv3Iq/15pXxg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xGIdaQ8eB5QbiDDh/gm93PKAU2ftoNVRENX6LIJMSoA8oVXLEU80gkhraXiONwNVKExKNVV58PlG/TxG4xmw58UUjlyLdj16VmF0k3pQbofFzfH+aeq2N/uRChMBb7yCqMBJ28GVAXj/6EnYs+sLvlENoRa98U8JuTHdRyN8dr83rp2uxiivz1pikAjYdARzFGXnIuuZlaD3J29yC8K466YednLOJcE6XLey3Rkv172DL4iK7fvOwds/y272JSBDMjNJ+3GQTAt8vbjUt2EHqAjG5NJxu5vrkfjrTwVhqqKr/BP6f8Z4egT735s9OyfwnCkFg9NLSwWnuMKQnVnDNSfJbY; 4:0dbAt6UdXK2NnqjuqWnUdRSVmZ7oNd6M4ywXhbz86/Oo2HbvNOYhUpM5n7LrFXQGCQZEbdqwhoP6fSALmxRCdvyn9nZJTdCIIrBLKsAffpJquIkDzMyYgm4jkfkL6s2BKCltNQFxXAbPhjoeP0dCHiQKd4yaPRfiCnk6bGZac67q2oWxrOqFuJDRR3WR23PYMSP6A/5zBNx3cE9bveeYzHDNjr04RriBdXTseZO6rPlGNJBVI4JJ0W2eRm9EnHVmfCd76M1NMxFxUC5CXuPL9l7uSUAfDpEw7+n1ykU8Oc3PA44+Mr/XzA4WHyKzJMnQk48jtWQGzdigttZZb3qTYQkn5TSUFumlS0Uwl/cO2EA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(131327999870524)(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040501)(2401047)(8121501046)(5005006)(3002001)(3231220)(944501224)(52105095)(93006095)(93001095)(10201501046)(6055026)(6041288)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:AM2PR04MB0753; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0753; X-Forefront-PRVS: 05986C03E0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(396003)(39380400002)(366004)(346002)(39860400002)(199004)(189003)(7736002)(8676002)(26005)(16526019)(386003)(55236004)(106356001)(81166006)(50226002)(59450400001)(47776003)(81156014)(6506007)(66066001)(8936002)(16586007)(316002)(2906002)(4326008)(25786009)(6116002)(5660300001)(3846002)(186003)(86362001)(305945005)(6512007)(2950100002)(6666003)(97736004)(50466002)(48376002)(478600001)(5009440100003)(52116002)(36756003)(53936002)(68736007)(76176011)(51416003)(6486002)(105586002)(110426004)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0753; 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; AM2PR04MB0753; 23:TiXQlYOQeFoMi/QPz9yOx8yAFKZRoWnL2k5Q8gjo6?= mxHztNzIbts5ddcNCV2mlB4DMxTHIGc2+XYkjB7dNB5wVx8f3OMjd+/ZKQ+2+2DI0RkMJryAt5L2MxujNwoDQ0Br7lmJ3ldIOII5gDSyE50hF7sBW4p7lx+Ow7OkukQ+t7SfDIU+oJ5cWllwvvay4iJgB4ZNX5SB+C6H/hlMajyL/tUAZMEPDxnLzZnruP9vbkuefNNCOnuQ0HjS3WwtVym/R5rk9Pgy/vDMzw7NHhRrF1E43eoeWDNkLCEhrIuti97smQ6tZSEyp7pbBY4zgzLl6OrFZISN0L8KzQX3ESA4Df8PNAK+kVW5yT8yAeP1cYw4QsyHud2RsuP/Cg5BNGfrr5xWFDRXFc5pwnnSBonjN5kktSA9BLmhfcm+CMUYIHS3oeMn904akBcCDpVQnVHEF2I78sd9ts8kCciMvNy5gylYvWZtW9yYctYuXpuncp2Bssl9uIxkRKZ289odGTmVcW+rbHAfiBTK6tDXNfCR93PQIWXMeodWid20ar5WKD7c0tVk+2BtfLBIyjglHk52lvW9kr1cYSTiQRapp7tXHi1Wh2GnJGJYQR8wo7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h7tZBElm6z7VpaSIMQDEQtQUSOiVUTKz5/8o1lNo//fNLJqycC1w9TWdcZzRlphtqIDnqWw6UuTo8jRbgE=; 24:j645bxq1JTJ3OxFB//00zp5Y2Je7RBl6kLfmFmeJ4dE7lzP8staK/i/Vn/b47guCF7/M2HMX9sNgiTZYvOCluhsNu1b9F1Zcj+5Ja8Xfnr8=; 7:DwD8t/vLiAYrXtv+0zpRuBx+URZziVwA9CFTKN23kE2N0y7GMfNFB3ktIWZ2VjNBguZ92aLdZEfjJYth2aX6rt7kufSBODKhqWZUg7CCIK3wIuwA0xY/VtbODHcmRWTEJiHi2b/yOsqWXT1uroYFBZgeXtAIWjjjiv9J/SMblr3Jpm4H9AZOr44JwDRMz8ijpMJoEnvoSTRfQuryK75Bp0rA5JNtuFjPbxtjY+4jFmy4zXt5ALtKStI/RUUB5m3C SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2018 07:34:58.5528 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d8d29ded-3d6c-45f4-cbd8-08d57f46eff4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0753 Subject: [dpdk-dev] [PATCH v2 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 | 17 ++++++++--------- 7 files changed, 32 insertions(+), 34 deletions(-) -- 2.7.4 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..8d53137 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -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;