From patchwork Wed Mar 14 07:55:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 131560 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp548213ljb; Wed, 14 Mar 2018 00:58:46 -0700 (PDT) X-Google-Smtp-Source: AG47ELuIVW5wR8g2H54g5pm/QnN9uzURr/Bxl/4Nbq1hUo3OyD/qCO+T4gB6uuszfbTP9/x93PB/ X-Received: by 10.28.62.16 with SMTP id l16mr857961wma.54.1521014326702; Wed, 14 Mar 2018 00:58:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521014326; cv=none; d=google.com; s=arc-20160816; b=zEeS2oWYaYqUaWjnf28wtv1G2vUSgrGDVBbI0FIPKd45IkUY0enDpnCgwR0ybliI96 zo9hkWeB2wXEtHEVtJuKlBjLzVXpi4ymT2RZSimj+po9Yh7Y4qCtCOtX0Enkl7ZFnJqI F4/kQnHejaFzQKMB9u950EI8Ob9ClSyYjP1dU2jF6I0w0476y/yEnASrlOmmIwIX5TCI iecXCUDaQQTnJk26DRe4A1prM5pscTRS7lVDE4ePzO35FENyFkNtau041TWSUjJm3Ef1 nPm1ADpG0Gg0WG/fbCapU5BGRNxF7hy2DW8vt+mxnf3/Q/YRqGrVPQKd+qLivgzuVLWa rnig== 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=8g00tP6KBmMb7wyCsq4lOIbgHOCf/MiO0LdfN1w4qDw=; b=hEaRadO9UIV+4kp8J2dTk6c2B0Ad/uUkMfRcPcn23AjVrwtaQSbNi93j/rClXFyceP TIEe3XP3AtF0X4C6mp8J5zqceONXBh+Zx0jGmcAXD3JVUl2HDtPY5MzTa348sbG9sgCS f6z9DCECfqcIW7AgC6bnMNoqtRALONuj1PpTEx/X9WKdofdtt5St9GaLIh/zoX4NNmC7 7GZAJdz67Vkek3E6LFtbALW/iLxm2TxKfh1kNHc8XbW2acPd/P70+BpYrZ1Svbn3Son2 /652ltocRr+SUbsA3t0FBFmJrcQrxNBaYyU3RNBX3atRgVTAaOD2mkATCDtrxbYwwK+/ o3mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=ZZ5b2uAX; 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 y8si1401845wrg.265.2018.03.14.00.58.46; Wed, 14 Mar 2018 00:58:46 -0700 (PDT) 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=ZZ5b2uAX; 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 601C9A48A; Wed, 14 Mar 2018 08:58:08 +0100 (CET) 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 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:FjMR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HW1a0sjhD/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?= vs3VqOQbtFRM1JwHY4O1ouHMMsdC7nVYREMXRePVLpzWvvchhqJ2GGtMoouM5jM8YlNS02vTg/dvp+yteyIsb8sZo1ezrh1sjUpw6CLq71XHFVmb8aVNHOjm20+29TcQ1tVy/KzNAJ8FEy6aY8e4yVlqOgsWvjewtNMWu7KKlHCmuprxQdJsxOg2GA518yYJ8L4+n/gRWk9ktE5Ie1xpxT4SYt1kXeI74GbEGA24ncKWH9sms8zvAbRGs7HGVn3MtFA+DIVg8Nx4lrMl8pd7jH9kcdxU+YN2/FyO769Q4MLM2C9D7TNxXZ/TtNWVOnIBPW8F8F5A3m91SQ6Zr5qxzE6rsi6BgvHeQywNNn0FTbsatmqeKXuNgxd4W0wmLAqXuzf8MpCpoQSf19K+of91tk89pxnvHKnO33LSzQYgFdR4TOd3gVO9SdMei7GcR0MYQTW0kmy4SpQw+ZbD9jz2gChOBkyUVskDgUw8mx2ldXbHxDwu9c7tLyQDlYjUsA+ae/9S/xfOwYe9skfgq45Po1bQXKkCC4ZU6TWpQLfWKkNkwO/a4I5Y8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Zc0pCIyrYoqqgU4XF4n5M6ul3xAIpH+OT4fAkQRlmAIRhMYs/cF2AE8VgvQbYJfgpkaPlsUCVaKe7MU++UpfbRpbW6PxwQ/pHQWCI2KQlsUhII+rWIQsUWBCtXGcc3xagXAp8MY8eU3+xHI0ahKsl1kY=; 5:8M/oC7A8bv3TmedC1YLHeWh31lZ70qwISlcdql09ljAerr3cl4iYxT5P7qK1uxudNSX72FBV6WsbHuEQDho3skqxPD7udkbOF7Dh947Fp0ia0Hl1vC6kaNQf3gLFa/qn1Hsft52ISzUPEmAzifoeL8iwNNzEDMjFDoyTz/Cq2A8=; 24:Y415e2BO4jM770XP/2sYJlOigIStuBfLTZ31tsKCObXCOuhATeWUfvIqbV2P1GtKIZgdwNxA2RWsHJWMisqYYQ/8R3LN/TCmdhzEK+7biBI=; 7:8446EVJM0qTixPwMmKIj3UALeQszOO3BnZEuE0NamuLlWD17tbMj2367B91bQdvQU8aZ5sJqy1LGDvvlB5G6e3Ipvy0L6hpDf4glD39jnyHJ37PrDUufRsmqyzc8Cluq86rRZQETEKZcYIoDiXOM1MpLmCMTPJL+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: , 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 | 19 +++++++++---------- 7 files changed, 33 insertions(+), 35 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..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;