From patchwork Tue Feb 27 17:25:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 129836 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp539757edc; Tue, 27 Feb 2018 09:27:57 -0800 (PST) X-Google-Smtp-Source: AG47ELtLK2CeGeFAmPdRiKrECnqNp5JApoQONI5X3Adg8LFZcniF26jSyLxy7X9wpIByX9Tcqcqj X-Received: by 10.223.190.15 with SMTP id n15mr1579533wrh.82.1519752477503; Tue, 27 Feb 2018 09:27:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519752477; cv=none; d=google.com; s=arc-20160816; b=kToUZAbP0/cYEFIPSQizRX4XdPydI/9Y/sUd4WUt4PC5ttRaQ8hBcgTEgOXR+M00cP Bu7M0Om2evxJrG0DRRMj9RgZ9H7uJXtQdvkvFUEnaKZzVVPBV1qrm93iEXGEPgvI9xgr AefHN6P+FDFROZkZD2oRo2tpIj0Ck620Gp5mEuuHqmzTvcAzS9jVu59vZFZiVTW+H7NW VgZOhsg/IrZKhkZR2mA4pGvVMYdN5QkXoP/3v+5P4Bnc1ib/hlksjawUZWuJ/irCvANZ 1GofKe9Sv8P5V8vW2riLqxrjLrWOSYLnLGOQu2RT8BVirZS3FwoDaaY7wiyztRTi+XEI ZWxw== 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=mCq0UQwpUUNv4jx8chxdsRTrPUl5UxsR8vpqI3tLcP4=; b=V7wEwRDwpwKdnqGUHoJk68MI41VKTa66cOBjOeO8tiHofkzn9mzS1DlDRenJuDu6Mw Zaio/6whlgiZDZQh+bl9ZYwCnqipXcIUTg7XbtiJlMt1i6r4WViE+BhGwsKxwzv73B4y LbZakJ6B4KaVpY68a8X++4Z3h116QXsENBDLLAt+2s76it5enSB83/32b4V3GEaEdv06 +Map1ZRXjB3hGAAUNKn4gofWgDgawvgGSFa8eJ4XfGFrr+AeP6dHMzQKwIgDye1ra7H6 sUoF1BVkBqcwT1mE/AUA96NZv4uEXiDmbDHtshKrkbJK8Suq1XXkl8R+D1RwtJjBxCVW lXTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=CyVokOKb; 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 k51si9457150wrf.11.2018.02.27.09.27.57; Tue, 27 Feb 2018 09:27:57 -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=CyVokOKb; 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 A5FC34CBB; Tue, 27 Feb 2018 18:27:37 +0100 (CET) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0079.outbound.protection.outlook.com [104.47.0.79]) by dpdk.org (Postfix) with ESMTP id 7BF2E101B for ; Tue, 27 Feb 2018 18:27:34 +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=mCq0UQwpUUNv4jx8chxdsRTrPUl5UxsR8vpqI3tLcP4=; b=CyVokOKbvvyIDOQj4nZn5s85fhKYNWMf3B7xqQxEZ8oF45UtRqtGEjQ50wtwS7jRV7C6OmYyDyT/9MUTMfk0kTNP0MpPKGxEgFnuoAX1+N/CSA3LB+QQpttee65PPrGndASUsVcEsvV4bnnfjd5oGbq0Ur/h3gAYiS7Uq1Bglkc= Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by DB4PR04MB0768.eurprd04.prod.outlook.com (2a01:111:e400:984d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Tue, 27 Feb 2018 17:27:31 +0000 From: Hemant Agrawal To: dev@dpdk.org, bruce.richardson@intel.com Cc: thomas@monjalon.net, shreyansh.jain@nxp.com Date: Tue, 27 Feb 2018 22:55:47 +0530 Message-Id: <1519752352-15442-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519752352-15442-1-git-send-email-hemant.agrawal@nxp.com> References: <1519752352-15442-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: BM1PR0101CA0017.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:18::27) To DB4PR04MB0768.eurprd04.prod.outlook.com (2a01:111:e400:984d::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ad88178a-c95c-4956-c8db-08d57e0762ad X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:DB4PR04MB0768; X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 3:PZuA/9j9yftF2jGz4hnr1MXRlrzFYmMUtWlp4a36SuoiX1GBoKoskm7ckKWxxlTnWtxA5ZCX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FqrezpJ+AbCm2bKeSRMAMBnjo42PJaNKbFvSA5Gf/ZY4X3Ojt58GFWjZ3tzv0cbmkKNWBnJ2zdGzPNgkcI9NYmuuJEWnoJE86qT9dmdKUHvw9dFmKnZ0F2AnrBH3O81RgUIDS+qyfAfmJx0RLbsS0MQZiFXYTUHwpwLQMTl24D7/4A3zUe6k6mFTwNDeIcdnAKsX4ZMpDWJD/o2j64cbd5qMfb3S1GiQEojyM8ltMTlemHvxm56GtK7bNZmh0jZR8JKk7kU9U1bmFgaw; 4:DPwLkjtqjLglOGt0p6N+5pgzzxMnL2odtcyGB6KwJ8pZhwdwVOdwFVp58GUcYRZVYBFvnKPjXnyDHM6Xkn2cRUL87bxqhq9ID0y5wJfPyjnJyqsQOEEruJaDSR3vAV1OAyCPrNKhvCwcdWhf4mWTQHiO22jeUESSMeDGDkFsaXc8DnwCxl5IUFAOpEVlrhgn101Olwc5ECQlp34yggUhBQvGMyJoGbVBFVrcsyU9S5m++6sRa0elNZJzgAJrf20mekw9P7HrQRA7I513nn4QvBvqGemuiPxelIgOPSiMHbpn07pkpu5u6odnpH+/SBfyFYHfSxTzeNUag6JA8LMHNuV9dWpZ9PwqIbq0vXCzFGE= 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)(944501198)(52105095)(93006095)(93001095)(10201501046)(6055026)(6041288)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:DB4PR04MB0768; BCL:0; PCL:0; RULEID:; SRVR:DB4PR04MB0768; X-Forefront-PRVS: 05961EBAFC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(396003)(376002)(39860400002)(39380400002)(346002)(199004)(189003)(26005)(316002)(68736007)(105586002)(16586007)(6512007)(36756003)(66066001)(2906002)(47776003)(386003)(6346003)(4326008)(53936002)(6486002)(8676002)(55236004)(8936002)(97736004)(81156014)(76176011)(59450400001)(3846002)(5009440100003)(7736002)(5660300001)(6116002)(25786009)(50226002)(6506007)(305945005)(478600001)(81166006)(51416003)(52116002)(6666003)(106356001)(86362001)(2950100002)(16526019)(48376002)(50466002)(186003)(110426004)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR04MB0768; 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) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB4PR04MB0768; 23:M9ZRRL4G9yfHE4GjQfQ/8zaSSl401vE9HK4o37IDK?= fe5VBSI6bfsZCgIM6HUk/wUUP47CqYkVtNCtE37BMs5PemZk7mamArL1hhYoLEkRIeLGzgZ3RMI7XqQs1/z71kFIwbbXgyu9/Kp9HonIMccmPW38vAqdKghFOyVD3lrVCMJ13WhnQMvWAqJ/nqfjTPggsz/JU4knxJxqfZtaVsvaSgM3PBph/HHBKt06GuL8rifzi7aIudZ8yzQZhIDQxNunTAF4QgHaorOWwqaD2RKOPP31ITjQ0s05C2WPuhzB7HL3AcxFt9vCXNYX8FSwj+ATeNm4rp+otvnGa0/DhV3u1u4WlTA3sfjeITLXlVq0ox70/FHDyRFc3Z/J98Pi8C3ShLH9a3Y/Q/S764UALJasdAN6vlc77Pbsn3RtEqPRsfyCGPQeu5gPZomTWrCA7Iczp1aldssxXQla9yszhy5YojhARdVMuvynoinRv5cRty4vKtmdrjh3MuOkJjOuOYRBgHjT3wpzjdGsWsyk12o6PQK0WClTxpSA2N+DkRPNuSlnJTaaXJOE7uTLBc3LRbD4kluewzjvsKRYS/JlZserRYhoq05vCn9u97DuloWmhDYAyy5hvcg2jmcy+WR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h4z+4IzvBeNqVwQndADOySDtSbGrnAgq0i9d/cK3V6YiFbR8UmcAO9PMAVJkFLEAhJeovAdSwkuGQUVx6+6gySh+VzEIqU8=; 24:s/sQTi8NUuTobsimC1WfCOsc/g8kjEv/sYq/kQGdy2+fLl/kqL+/UgqGIzVqHuHH7Taa4wWSED92mHrKI7HSniVMJj5UuxuwIbdrXReEEfQ=; 7:LqD+dDTeFA49XK1I+jFzwsGdyL7dY9L27N+pDuXyuVvDimRH6hT+8NyhSWv4aK3peGi1HKfvPLTC5l20jPgO/8x5uUpW5+Nxey0BivQIGhbXFBxBiIX0DZTxuNS7bkvFfgyVXKlqzxs6c71QqrWHVkhlUUjYoBMGJlmNYeN63eA1YQ2nzpTuHUwPmLbQgEBF5QZ0Hgl9PKeoHahFvTjwwI7r9/wi8pjjjCoNZCMdREZNwuS8WZnk2yHs84nc6Ojj SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2018 17:27:31.9314 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ad88178a-c95c-4956-c8db-08d57e0762ad X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB0768 Subject: [dpdk-dev] [PATCH 2/7] 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/base/qbman/qman.c | 5 +++-- drivers/bus/dpaa/base/qbman/qman_driver.c | 5 +---- drivers/bus/dpaa/dpaa_bus.c | 2 +- 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 ++++++++--------- 9 files changed, 36 insertions(+), 39 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/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index 2b97671..2810fdd 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -1087,7 +1087,7 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit, shadow[rx_number]->fd.opaque = be32_to_cpu(dq[rx_number]->fd.opaque); #else - shadow = dq; + shadow[rx_number] = dq[rx_number]; #endif /* SDQCR: context_b points to the FQ */ @@ -1095,7 +1095,8 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit, fq[rx_number] = qman_fq_lookup_table[be32_to_cpu( dq[rx_number]->contextB)]; #else - fq[rx_number] = (void *)(uintptr_t)be32_to_cpu(dq->contextB); + fq[rx_number] = (void *)be32_to_cpu( + dq[rx_number]->contextB); #endif fq[rx_number]->cb.dqrr_prepare(shadow[rx_number], &bufs[rx_number]); diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c index 7cfa8ee..66838d2 100644 --- a/drivers/bus/dpaa/base/qbman/qman_driver.c +++ b/drivers/bus/dpaa/base/qbman/qman_driver.c @@ -246,7 +246,6 @@ int fsl_qman_portal_destroy(struct qman_portal *qp) int qman_global_init(void) { const struct device_node *dt_node; - int ret = 0; size_t lenp; const u32 *chanid; static int ccsr_map_fd; @@ -352,9 +351,7 @@ int qman_global_init(void) qman_clk = be32_to_cpu(*clk); #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP - ret = qman_setup_fq_lookup_table(CONFIG_FSL_QMAN_FQ_LOOKUP_MAX); - if (ret) - return ret; + return qman_setup_fq_lookup_table(CONFIG_FSL_QMAN_FQ_LOOKUP_MAX); #endif return 0; } diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index f2bb3b1..c643da5 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -235,7 +235,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;