From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0044.outbound.protection.outlook.com [104.47.2.44]) by dpdk.org (Postfix) with ESMTP id 00E2C4C97 for ; Thu, 1 Mar 2018 08:35:03 +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=mYJSEZaLn1vRDSx3D2q/bVusplR22NwXzlCiRCKJI6k=; b=tSiyeeA9tDnwmx6tdypR1/SsfXc1wrrTeSXoR+CeBc3p+WMvczWjMUmrUY2oNpXEKjDp2EGySfs6Z+8KZr/u61xXp7yehL/AdBTbBM4kpPT28C7wY/XRCYf17uE4Xrm2J3c79VpmH8C48Nh1yjsXrx3pJFW9FIGHhJYcNHgmko4= 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:59 +0000 From: Hemant Agrawal To: dev@dpdk.org, bruce.richardson@intel.com Cc: thomas@monjalon.net Date: Thu, 1 Mar 2018 13:03:11 +0530 Message-Id: <1519889597-5805-5-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 Content-Type: text/plain 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: 9bc56f3c-59cc-4123-3aea-08d57f46f0a5 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:kN+13dOCuz64pYBI8lrV/8Ynayuxyh/mRKZpqGFrsLfzW+GzndnXlNlUi9HlAJOeQJvaWQi/p4RK9ne9Cg0XTXvm5LJceddVvewG4eXcSotCBxFzlHtQGru2JM0M3wyq/yAnMGYaKniE8E08uER+ly2z12AuN9oOb0SJZJeRu0k79hxfrC6YI+RBuhqjt5fqdkO1zfn5s9fe6oGVpqbXsmdpjpDyB/mliCULP1qexm4H1Cd2HHspC+pmEisyoF7G; 25:yjacD4DhjFkviFCjGZyoxp/GJY4khR9WReJ6rvh/3SBzDTvfvrXV30PfxEv/dhys15nj+YS/YxOlBhFlU5rjE7f2wwasz645lbkV03w8rVtMgzGT67E80ZHdLctxrnON6CC0NclgAvMdVS1lnLiDlsurg7XLBiwFfMjTEJGBdKNr07YbVxd1kaj6Bu83b9TQ/4ftHWDmWI2FsRrNKnI+5vYODVHMyIpqDkl7M2u4kzqjbbfjCAUDAmKGGzwDi0YcNcABzT8QPHuh++pbF4nC2kh1uBHiae61FuaGiCOSWW3AQ5ktnBwVPsHHXzN8ZzSDEKzXnBzRRlCKouNHCpuc0A==; 31:BMotxumgqBmLMeGOCmTzaH6Pw98WZhJG/auL3fmE+gP9q8J6XCJD/OHxx+0+wP2AKHTwgH7H1syZVazKUWX/6PsqLykTttHmfATzNxXZLexRRIh76nX1/8C0lsqm+vzvk8znOrxWm24VJwtXwlOsEskPgv5uphKDx4F/wnLqBq757FXAj581kPCixxcdX4FAZmdEQNsrsQ9qWq2Y8D4BlMxJSVj7MqZ8f0lVfngrLAo= X-MS-TrafficTypeDiagnostic: AM2PR04MB0753: X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0753; 20:pz7iX0+2jy92MBNB+TqtxGATaOtwCg13OTyVQp3ZDvBl7Q4KUkIC49tjiD+jCi37T/o5RCo0RoC+fdQyjt+PnQ5tZnMDbMWm8ubaZO7lLtYBkPxb9a1P70bUR9hfiaq9RlxuhTzYJ2h2uAyN042gItwOq3LAYZb7+OrhwaImlzfaDIxmhe6uPmiJiQMbGjmTq41jL81a1OuPFfU2oRMrwJ1OjPBO2vOBTSVzR8KqeobIBHqRzXMjI8gtugR5/ZJDSqvVLWJTJ6VAPAh+SAcVdjfJwAq54Zg/JcIdluF8L7KU8G1sLBzkU3wJH6lyDWZMqHQSztOU3F4h4s/y2/p4n8mxEBnAYxNTOAhOiZawkEIONTOwbK2AbvBkiET/skUlmUSd+AuHc+8brAaoBjW0dGiA6hk+0/G7VSDMVGnfTbc1GkUQfjlUlN5JdO7HWfrsvXlUzL6y/c4XcsjEIpsTgW1UBza5SMiwfFpByu8x5/kzoByhjbBTeyvEy0OQTnn7; 4:0h5RxdsAUT9jR0muFenxWmGfuzoePDVcPWpwg9YFxAcjAgILfPhVHFRLjinGtqcOZe6UoqeJk4MJjAhn/JfHsMUDzPB8GOtBf78XLRNkRA+qi/2zf8NXkCgoawwcHsa59ymxy3HNRfSfffzNAQ3PTwdkw1hy+MBdpXo+kVIjVIwGlGjjBi8uugNiQTbK80NQUZRpccu6lzklgFMcaC1q3U99F/d8QtFliIjMDpgxSj02nvFFMveR4JubnSBeA0fZq8q7m94Oll4S4Az4/f5O2h79hec4mlGqFX924Ryf4i8DKr2lXyaNMk0yB54cpHtarFjVA5K6MkSJPsxIf3aWmNEX0Q2ymIJmEnErFqCn/Nk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); 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)(575784001)(86362001)(305945005)(6512007)(2950100002)(6666003)(97736004)(53946003)(50466002)(48376002)(478600001)(5009440100003)(52116002)(5890100001)(36756003)(53936002)(68736007)(76176011)(51416003)(6486002)(105586002)(110426004); 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:iyC072w5mn1zXnaEqS/1HNHr8td6XfI9MAO1HKrnw?= =?us-ascii?Q?ISN2UCjmbSzf4L1BAQVNEFZQVipp1rtU4KDQ+bw/85FSbCaQ4i1ke3MgUTTu?= =?us-ascii?Q?eSfgjnFDKF5Faa4ntAGAXUiHsNQ20PNqaP8QjsfDbDWcCXUdpQKohX0Ay0s9?= =?us-ascii?Q?gQFJ4pcdB5pU1j9b9y88GrgPlouhMAQ1uo5stoqImqVoZo6lwhZ82Mr4gnzy?= =?us-ascii?Q?Ri0ohPolv910dMUsl664nvoszJNg4NDU4evb8POIwS61LpH66YaaQ99OFMi5?= =?us-ascii?Q?eYSygDslB7l5lk1e72sJS3etqYsXAemTzWoxAMTL9e7i6t3ymsivxRIlezdU?= =?us-ascii?Q?dJZ8FrEa1wAelLNo/ElkAbGv6+GB/rH7hNMQ5kpZKC/0CTVGZ0+JtGzVHknP?= =?us-ascii?Q?qKZOaYmBpQMtMmwrax7Oyt03Cum6sOxQhC65oA1JojVz9puJu453fYRXfDdx?= =?us-ascii?Q?W5dlMhWlu5JEsGrZM+HHGVaH6R6F+LG9WNNIdry1CH0K9ou7+s9mzvm6U8nW?= =?us-ascii?Q?AjRalcWSz/7RLxtG/0/xhwRowjWCP6I3DKRloGyXn26Fr12cFCVpPmHmxjLT?= =?us-ascii?Q?Hima/lklzns036+o6VAGcObzEINC3kkJDlvtDkfFZCtkDYfo7euDkB0c0PJs?= =?us-ascii?Q?TrjMGuSB4lZyf5iw76WvbXm+B4uILoHfCXrLRCPfBzWK9fm/o3OR+GmLskgz?= =?us-ascii?Q?NG47QzdhFg05NYcuz5vKZFuxA/gme8pyDy8rN0hNyKRGhXniMsOXxCkZFyKP?= =?us-ascii?Q?6wOHOZ7WIkuAsVEXutdr/i28X2cVaCmTHsUJr6a/wTxvoJNWU0bvfi8/qkUo?= =?us-ascii?Q?E+Dq647qvABz198GF32vPjeIzmaAHAHggb9UnZ8fqo4AV9XXDirh1lL7UERw?= =?us-ascii?Q?D6RJYL8SNLHqCqCKFoDhTqTFs3/BCrrP6qiodZUYb2jDD8WMDhFAJLamdhaX?= =?us-ascii?Q?zbgT2sTBnNUau+MbtqzJXO0+v386CEZFpyhg6sCxQpzacZh8VL2uBoSnZVB5?= =?us-ascii?Q?Bl6hTYkKPnjGHmh3lXenV7mhPXrjXqvQy+WD0040EdK9d1SlhNDciUD2i98P?= =?us-ascii?Q?+d/0gFp60O9X5O9jKgVhRC1S4afvzoJR1Hqamirh0tnuYLM9jr6ku91g3aI/?= =?us-ascii?Q?M890cjZVgpvMYQ2sjG47Z8dq0ofUtwV0+lJ2nsG0X6nGcNCN6EbrUaN27VEs?= =?us-ascii?Q?2t7zBqa2G+lNdnHPXzCu8LzBP9Ac/R3dgD6CwvFpGHSj8hGtlYA5OOsC01n9?= =?us-ascii?Q?jkGNga0jAf6V5mzIYo=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0753; 6:I5pkhkJuErFQAvtjRkARMYV1qkQJWczHU3TK0Sz6gpINVh+RM4erlQxw1FZCAHyeqCkuraVkHxzpjt8JmHOJEoWhe/YuFFA/NpUOlSEHAQ/+BKi94I227kkJYl3a2bgvEJ5bq8JdYa7+3gR5CdkCBGyz6D20eJXspBafoG8sHeCkOnnBlvFKwxnIJmMekwNYFYJw7M+++JY1FO57ib1P2EnIx4kBidxbmRahuLaeAp300O7kKI+hZKJydph0Dq0Y5YCgkDdTPckl8dTvd9xdLi+RQsRs+6k/xQt4Zn4J3uOvtgA3IvuPQHsCiOglsox/G3yPYJpYn0xkapKpe0RnOrgsxzSMBBdtBkfJnZYYtk0=; 5:GstwyYh8qko/b0aD2bAKozQ8qopRH/HdksyyKmO0n3oahl0DvYLO7mh9z+Myw81JHa+r5QYku+sQ2fbq/vRaDIttA1NbP3riBkOIYpFGGfoyTp/ufs7Z5HVeV0CvEYFDFkpcIAm0OMim+IkvEp7nRoPpRaGWc0n23NvHXma4zpU=; 24:6iXcyAfPiEb4bJNWhZr5+27CCJSV7IeD2MP1oQIrrxxxhUti9a/OFnnfU3a1X1a/Sq560W5Yvg5ZLv9t/fa8lR+/rFX1tdYYL/Q/2Y3afxU=; 7:h7JsKd75Gi/0106ic0gewd1dPgW6z6W3OYnz4VJMBJpd0CgzRiqX4TIK2ElMXvbjLNsT+9x1oii05BpfH0jOYbCAjnAdAd4iSBgb0p2jgTf34qhMBpwpfl/XYCls3FqC0HQvddx69lT3nYcTs+wKhuq30eL3PEOvFJ+oN2U1qgQLSyTh5imh+SICkxEnB2KRctcpPuLKnAWZc55r+z9bNUlR11D3sQRmno0w4dZiGbTmHitHpQpdsFy/400AXsOQ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2018 07:34:59.7091 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9bc56f3c-59cc-4123-3aea-08d57f46f0a5 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 04/10] dpaa2: 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: Thu, 01 Mar 2018 07:35:03 -0000 This patch prepare the dpaa2 drivers for compilation on 32 bit machine. Signed-off-by: Hemant Agrawal --- drivers/bus/fslmc/fslmc_vfio.c | 10 ++--- drivers/bus/fslmc/mc/fsl_mc_cmd.h | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 4 +- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 37 +++++++++--------- drivers/bus/fslmc/qbman/qbman_portal.c | 14 +++---- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 60 ++++++++++++++--------------- drivers/event/dpaa2/dpaa2_eventdev.c | 6 +-- drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 8 ++-- drivers/net/dpaa2/Makefile | 1 - drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 6 +-- drivers/net/dpaa2/dpaa2_rxtx.c | 38 ++++++++---------- 12 files changed, 90 insertions(+), 98 deletions(-) diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index 1241295..e840ad6 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -76,7 +76,7 @@ fslmc_get_container_group(int *groupid) if (!g_container) { container = getenv("DPRC"); if (container == NULL) { - RTE_LOG(WARNING, EAL, "DPAA2: DPRC not available\n"); + RTE_LOG(DEBUG, EAL, "DPAA2: DPRC not available\n"); return -EINVAL; } @@ -270,7 +270,7 @@ int rte_fslmc_vfio_dmamap(void) static int64_t vfio_map_mcp_obj(struct fslmc_vfio_group *group, char *mcp_obj) { - int64_t v_addr = (int64_t)MAP_FAILED; + intptr_t v_addr = (intptr_t)MAP_FAILED; int32_t ret, mc_fd; struct vfio_device_info d_info = { .argsz = sizeof(d_info) }; @@ -301,7 +301,7 @@ static int64_t vfio_map_mcp_obj(struct fslmc_vfio_group *group, char *mcp_obj) FSLMC_VFIO_LOG(DEBUG, "region offset = %llx , region size = %llx", reg_info.offset, reg_info.size); - v_addr = (uint64_t)mmap(NULL, reg_info.size, + v_addr = (size_t)mmap(NULL, reg_info.size, PROT_WRITE | PROT_READ, MAP_SHARED, mc_fd, reg_info.offset); @@ -469,7 +469,7 @@ fslmc_process_iodevices(struct rte_dpaa2_device *dev) static int fslmc_process_mcp(struct rte_dpaa2_device *dev) { - int64_t v_addr; + intptr_t v_addr; char *dev_name; struct fsl_mc_io dpmng = {0}; struct mc_version mc_ver_info = {0}; @@ -489,7 +489,7 @@ fslmc_process_mcp(struct rte_dpaa2_device *dev) } v_addr = vfio_map_mcp_obj(&vfio_group, dev_name); - if (v_addr == (int64_t)MAP_FAILED) { + if (v_addr == (intptr_t)MAP_FAILED) { FSLMC_VFIO_LOG(ERR, "Error mapping region (errno = %d)", errno); free(rte_mcp_ptr_list); diff --git a/drivers/bus/fslmc/mc/fsl_mc_cmd.h b/drivers/bus/fslmc/mc/fsl_mc_cmd.h index a3c3e79..ac91961 100644 --- a/drivers/bus/fslmc/mc/fsl_mc_cmd.h +++ b/drivers/bus/fslmc/mc/fsl_mc_cmd.h @@ -27,7 +27,7 @@ #define le32_to_cpu rte_le_to_cpu_32 #define le16_to_cpu rte_le_to_cpu_16 -#define BITS_PER_LONG 64 +#define BITS_PER_LONG (__SIZEOF_LONG__ * 8) #define GENMASK(h, l) \ (((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h)))) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index eefde15..9bbc219 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -427,7 +427,7 @@ dpaa2_create_dpio_device(int vdev_fd, } dpio_dev->ce_size = reg_info.size; - dpio_dev->qbman_portal_ce_paddr = (uint64_t)mmap(NULL, reg_info.size, + dpio_dev->qbman_portal_ce_paddr = (size_t)mmap(NULL, reg_info.size, PROT_WRITE | PROT_READ, MAP_SHARED, vdev_fd, reg_info.offset); @@ -439,7 +439,7 @@ dpaa2_create_dpio_device(int vdev_fd, } dpio_dev->ci_size = reg_info.size; - dpio_dev->qbman_portal_ci_paddr = (uint64_t)mmap(NULL, reg_info.size, + dpio_dev->qbman_portal_ci_paddr = (size_t)mmap(NULL, reg_info.size, PROT_WRITE | PROT_READ, MAP_SHARED, vdev_fd, reg_info.offset); diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index d421dbf..3191ead 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -174,7 +174,7 @@ enum qbman_fd_format { }; /*Macros to define operations on FD*/ #define DPAA2_SET_FD_ADDR(fd, addr) do { \ - (fd)->simple.addr_lo = lower_32_bits((uint64_t)(addr)); \ + (fd)->simple.addr_lo = lower_32_bits((size_t)(addr)); \ (fd)->simple.addr_hi = upper_32_bits((uint64_t)(addr)); \ } while (0) #define DPAA2_SET_FD_LEN(fd, length) ((fd)->simple.len = length) @@ -193,33 +193,32 @@ enum qbman_fd_format { #define DPAA2_SET_FD_ASAL(fd, asal) ((fd)->simple.ctrl |= (asal << 16)) #define DPAA2_SET_FD_FLC(fd, addr) do { \ - (fd)->simple.flc_lo = lower_32_bits((uint64_t)(addr)); \ + (fd)->simple.flc_lo = lower_32_bits((size_t)(addr)); \ (fd)->simple.flc_hi = upper_32_bits((uint64_t)(addr)); \ } while (0) #define DPAA2_SET_FLE_INTERNAL_JD(fle, len) ((fle)->frc = (0x80000000 | (len))) #define DPAA2_GET_FLE_ADDR(fle) \ (uint64_t)((((uint64_t)((fle)->addr_hi)) << 32) + (fle)->addr_lo) #define DPAA2_SET_FLE_ADDR(fle, addr) do { \ - (fle)->addr_lo = lower_32_bits((uint64_t)addr); \ - (fle)->addr_hi = upper_32_bits((uint64_t)addr); \ + (fle)->addr_lo = lower_32_bits((size_t)addr); \ + (fle)->addr_hi = upper_32_bits((uint64_t)addr); \ } while (0) #define DPAA2_GET_FLE_CTXT(fle) \ - (uint64_t)((((uint64_t)((fle)->reserved[1])) << 32) + \ - (fle)->reserved[0]) + ((((uint64_t)((fle)->reserved[1])) << 32) + (fle)->reserved[0]) #define DPAA2_FLE_SAVE_CTXT(fle, addr) do { \ - (fle)->reserved[0] = lower_32_bits((uint64_t)addr); \ - (fle)->reserved[1] = upper_32_bits((uint64_t)addr); \ + (fle)->reserved[0] = lower_32_bits((size_t)addr); \ + (fle)->reserved[1] = upper_32_bits((uint64_t)addr); \ } while (0) #define DPAA2_SET_FLE_OFFSET(fle, offset) \ ((fle)->fin_bpid_offset |= (uint32_t)(offset) << 16) -#define DPAA2_SET_FLE_BPID(fle, bpid) ((fle)->fin_bpid_offset |= (uint64_t)bpid) +#define DPAA2_SET_FLE_BPID(fle, bpid) ((fle)->fin_bpid_offset |= (size_t)bpid) #define DPAA2_GET_FLE_BPID(fle) ((fle)->fin_bpid_offset & 0x000000ff) -#define DPAA2_SET_FLE_FIN(fle) ((fle)->fin_bpid_offset |= (uint64_t)1 << 31) +#define DPAA2_SET_FLE_FIN(fle) ((fle)->fin_bpid_offset |= 1 << 31) #define DPAA2_SET_FLE_IVP(fle) (((fle)->fin_bpid_offset |= 0x00004000)) #define DPAA2_SET_FD_COMPOUND_FMT(fd) \ ((fd)->simple.bpid_offset |= (uint32_t)1 << 28) #define DPAA2_GET_FD_ADDR(fd) \ -((uint64_t)((((uint64_t)((fd)->simple.addr_hi)) << 32) + (fd)->simple.addr_lo)) +((size_t)((((uint64_t)((fd)->simple.addr_hi)) << 32) + (fd)->simple.addr_lo)) #define DPAA2_GET_FD_LEN(fd) ((fd)->simple.len) #define DPAA2_GET_FD_BPID(fd) (((fd)->simple.bpid_offset & 0x00003FFF)) @@ -231,7 +230,7 @@ enum qbman_fd_format { (((fle)->fin_bpid_offset & ((uint64_t)1 << 29)) ? 1 : 0) #define DPAA2_INLINE_MBUF_FROM_BUF(buf, meta_data_size) \ - ((struct rte_mbuf *)((uint64_t)(buf) - (meta_data_size))) + ((struct rte_mbuf *)((size_t)(buf) - (meta_data_size))) #define DPAA2_ASAL_VAL (DPAA2_MBUF_HW_ANNOTATION / 64) @@ -265,14 +264,14 @@ static void *dpaa2_mem_ptov(phys_addr_t paddr) int i; if (dpaa2_virt_mode) - return (void *)paddr; + return (void *)(size_t)paddr; memseg = rte_eal_get_physmem_layout(); 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; @@ -295,7 +294,7 @@ static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr) return memseg[i].iova + (vaddr - memseg[i].addr_64); } - return (phys_addr_t)(NULL); + return (size_t)(NULL); } /** @@ -311,18 +310,18 @@ static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr) /** * macro to convert Virtual address to IOVA */ -#define DPAA2_VADDR_TO_IOVA(_vaddr) dpaa2_mem_vtop((uint64_t)(_vaddr)) +#define DPAA2_VADDR_TO_IOVA(_vaddr) dpaa2_mem_vtop((size_t)(_vaddr)) /** * macro to convert IOVA to Virtual address */ -#define DPAA2_IOVA_TO_VADDR(_iova) dpaa2_mem_ptov((phys_addr_t)(_iova)) +#define DPAA2_IOVA_TO_VADDR(_iova) dpaa2_mem_ptov((size_t)(_iova)) /** * macro to convert modify the memory containing IOVA to Virtual address */ #define DPAA2_MODIFY_IOVA_TO_VADDR(_mem, _type) \ - {_mem = (_type)(dpaa2_mem_ptov((phys_addr_t)(_mem))); } + {_mem = (_type)(dpaa2_mem_ptov((size_t)(_mem))); } #else /* RTE_LIBRTE_DPAA2_USE_PHYS_IOVA */ diff --git a/drivers/bus/fslmc/qbman/qbman_portal.c b/drivers/bus/fslmc/qbman/qbman_portal.c index e221733..713ec96 100644 --- a/drivers/bus/fslmc/qbman/qbman_portal.c +++ b/drivers/bus/fslmc/qbman/qbman_portal.c @@ -553,10 +553,9 @@ int qbman_swp_enqueue_multiple(struct qbman_swp *s, /* Flush all the cacheline without load/store in between */ eqcr_pi = s->eqcr.pi; - addr_cena = (uint64_t)s->sys.addr_cena; + addr_cena = (size_t)s->sys.addr_cena; for (i = 0; i < num_enqueued; i++) { - dcbf((uint64_t *)(addr_cena + - QBMAN_CENA_SWP_EQCR(eqcr_pi & 7))); + dcbf((addr_cena + QBMAN_CENA_SWP_EQCR(eqcr_pi & 7))); eqcr_pi++; eqcr_pi &= 0xF; } @@ -620,10 +619,9 @@ int qbman_swp_enqueue_multiple_desc(struct qbman_swp *s, /* Flush all the cacheline without load/store in between */ eqcr_pi = s->eqcr.pi; - addr_cena = (uint64_t)s->sys.addr_cena; + addr_cena = (size_t)s->sys.addr_cena; for (i = 0; i < num_enqueued; i++) { - dcbf((uint64_t *)(addr_cena + - QBMAN_CENA_SWP_EQCR(eqcr_pi & 7))); + dcbf((addr_cena + QBMAN_CENA_SWP_EQCR(eqcr_pi & 7))); eqcr_pi++; eqcr_pi &= 0xF; } @@ -690,7 +688,7 @@ void qbman_pull_desc_set_storage(struct qbman_pull_desc *d, dma_addr_t storage_phys, int stash) { - d->pull.rsp_addr_virt = (uint64_t)storage; + d->pull.rsp_addr_virt = (size_t)storage; if (!storage) { d->pull.verb &= ~(1 << QB_VDQCR_VERB_RLS_SHIFT); @@ -749,7 +747,7 @@ int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d) } d->pull.tok = s->sys.idx + 1; - s->vdq.storage = (void *)d->pull.rsp_addr_virt; + s->vdq.storage = (void *)(size_t)d->pull.rsp_addr_virt; p = qbman_cena_write_start_wo_shadow(&s->sys, QBMAN_CENA_SWP_VDQCR); memcpy(&p[1], &cl[1], 12); diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 9a790dd..a7f3b04 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -77,11 +77,11 @@ build_proto_fd(dpaa2_sec_session *sess, DPAA2_SET_FD_ADDR(fd, DPAA2_MBUF_VADDR_TO_IOVA(sym_op->m_src)); DPAA2_SET_FD_OFFSET(fd, sym_op->m_src->data_off); DPAA2_SET_FD_LEN(fd, sym_op->m_src->pkt_len); - DPAA2_SET_FD_FLC(fd, ((uint64_t)flc)); + DPAA2_SET_FD_FLC(fd, (ptrdiff_t)flc); /* save physical address of mbuf */ op->sym->aead.digest.phys_addr = mbuf->buf_iova; - mbuf->buf_iova = (uint64_t)op; + mbuf->buf_iova = (size_t)op; return 0; } @@ -118,7 +118,7 @@ build_authenc_gcm_sg_fd(dpaa2_sec_session *sess, } memset(fle, 0, FLE_SG_MEM_SIZE); DPAA2_SET_FLE_ADDR(fle, DPAA2_OP_VADDR_TO_IOVA(op)); - DPAA2_FLE_SAVE_CTXT(fle, priv); + DPAA2_FLE_SAVE_CTXT(fle, (size_t)priv); op_fle = fle + 1; ip_fle = fle + 2; @@ -269,7 +269,7 @@ build_authenc_gcm_fd(dpaa2_sec_session *sess, } memset(fle, 0, FLE_POOL_BUF_SIZE); DPAA2_SET_FLE_ADDR(fle, DPAA2_OP_VADDR_TO_IOVA(op)); - DPAA2_FLE_SAVE_CTXT(fle, priv); + DPAA2_FLE_SAVE_CTXT(fle, (ptrdiff_t)priv); fle = fle + 1; sge = fle + 2; if (likely(bpid < MAX_BPID)) { @@ -414,7 +414,7 @@ build_authenc_sg_fd(dpaa2_sec_session *sess, } memset(fle, 0, FLE_SG_MEM_SIZE); DPAA2_SET_FLE_ADDR(fle, DPAA2_OP_VADDR_TO_IOVA(op)); - DPAA2_FLE_SAVE_CTXT(fle, priv); + DPAA2_FLE_SAVE_CTXT(fle, (ptrdiff_t)priv); op_fle = fle + 1; ip_fle = fle + 2; @@ -563,7 +563,7 @@ build_authenc_fd(dpaa2_sec_session *sess, } memset(fle, 0, FLE_POOL_BUF_SIZE); DPAA2_SET_FLE_ADDR(fle, DPAA2_OP_VADDR_TO_IOVA(op)); - DPAA2_FLE_SAVE_CTXT(fle, priv); + DPAA2_FLE_SAVE_CTXT(fle, (ptrdiff_t)priv); fle = fle + 1; sge = fle + 2; if (likely(bpid < MAX_BPID)) { @@ -692,7 +692,7 @@ static inline int build_auth_sg_fd( memset(fle, 0, FLE_SG_MEM_SIZE); /* first FLE entry used to store mbuf and session ctxt */ DPAA2_SET_FLE_ADDR(fle, DPAA2_OP_VADDR_TO_IOVA(op)); - DPAA2_FLE_SAVE_CTXT(fle, priv); + DPAA2_FLE_SAVE_CTXT(fle, (ptrdiff_t)priv); op_fle = fle + 1; ip_fle = fle + 2; sge = fle + 3; @@ -773,7 +773,7 @@ build_auth_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op, * We can have a better approach to use the inline Mbuf */ DPAA2_SET_FLE_ADDR(fle, DPAA2_OP_VADDR_TO_IOVA(op)); - DPAA2_FLE_SAVE_CTXT(fle, priv); + DPAA2_FLE_SAVE_CTXT(fle, (ptrdiff_t)priv); fle = fle + 1; if (likely(bpid < MAX_BPID)) { @@ -865,7 +865,7 @@ build_cipher_sg_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op, memset(fle, 0, FLE_SG_MEM_SIZE); /* first FLE entry used to store mbuf and session ctxt */ DPAA2_SET_FLE_ADDR(fle, DPAA2_OP_VADDR_TO_IOVA(op)); - DPAA2_FLE_SAVE_CTXT(fle, priv); + DPAA2_FLE_SAVE_CTXT(fle, (ptrdiff_t)priv); op_fle = fle + 1; ip_fle = fle + 2; @@ -987,7 +987,7 @@ build_cipher_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op, * We can have a better approach to use the inline Mbuf */ DPAA2_SET_FLE_ADDR(fle, DPAA2_OP_VADDR_TO_IOVA(op)); - DPAA2_FLE_SAVE_CTXT(fle, priv); + DPAA2_FLE_SAVE_CTXT(fle, (ptrdiff_t)priv); fle = fle + 1; sge = fle + 2; @@ -1206,7 +1206,7 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd, __rte_unused uint8_t id) DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)), rte_dpaa2_bpid_info[DPAA2_GET_FD_BPID(fd)].meta_data_size); - op = (struct rte_crypto_op *)mbuf->buf_iova; + op = (struct rte_crypto_op *)(size_t)mbuf->buf_iova; mbuf->buf_iova = op->sym->aead.digest.phys_addr; op->sym->aead.digest.phys_addr = 0L; @@ -1276,7 +1276,7 @@ sec_fd_to_mbuf(const struct qbman_fd *fd, uint8_t driver_id) /* free the fle memory */ if (likely(rte_pktmbuf_is_contiguous(src))) { - priv = (struct ctxt_priv *)DPAA2_GET_FLE_CTXT(fle - 1); + priv = (struct ctxt_priv *)(size_t)DPAA2_GET_FLE_CTXT(fle - 1); rte_mempool_put(priv->fle_pool, (void *)(fle-1)); } else rte_free((void *)(fle-1)); @@ -1455,7 +1455,7 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id, dev->data->queue_pairs[qp_id] = qp; cfg.options = cfg.options | DPSECI_QUEUE_OPT_USER_CTX; - cfg.user_ctx = (uint64_t)(&qp->rx_vq); + cfg.user_ctx = (size_t)(&qp->rx_vq); retcode = dpseci_set_rx_queue(dpseci, CMD_PRI_LOW, priv->token, qp_id, &cfg); return retcode; @@ -1536,7 +1536,7 @@ dpaa2_sec_cipher_init(struct rte_cryptodev *dev, memcpy(session->cipher_key.data, xform->cipher.key.data, xform->cipher.key.length); - cipherdata.key = (uint64_t)session->cipher_key.data; + cipherdata.key = (size_t)session->cipher_key.data; cipherdata.keylen = session->cipher_key.length; cipherdata.key_enc_flags = 0; cipherdata.key_type = RTA_DATA_IMM; @@ -1595,10 +1595,10 @@ dpaa2_sec_cipher_init(struct rte_cryptodev *dev, flc->word1_sdl = (uint8_t)bufsize; flc->word2_rflc_31_0 = lower_32_bits( - (uint64_t)&(((struct dpaa2_sec_qp *) + (size_t)&(((struct dpaa2_sec_qp *) dev->data->queue_pairs[0])->rx_vq)); flc->word3_rflc_63_32 = upper_32_bits( - (uint64_t)&(((struct dpaa2_sec_qp *) + (size_t)&(((struct dpaa2_sec_qp *) dev->data->queue_pairs[0])->rx_vq)); session->ctxt = priv; @@ -1651,7 +1651,7 @@ dpaa2_sec_auth_init(struct rte_cryptodev *dev, memcpy(session->auth_key.data, xform->auth.key.data, xform->auth.key.length); - authdata.key = (uint64_t)session->auth_key.data; + authdata.key = (size_t)session->auth_key.data; authdata.keylen = session->auth_key.length; authdata.key_enc_flags = 0; authdata.key_type = RTA_DATA_IMM; @@ -1720,10 +1720,10 @@ dpaa2_sec_auth_init(struct rte_cryptodev *dev, flc->word1_sdl = (uint8_t)bufsize; flc->word2_rflc_31_0 = lower_32_bits( - (uint64_t)&(((struct dpaa2_sec_qp *) + (size_t)&(((struct dpaa2_sec_qp *) dev->data->queue_pairs[0])->rx_vq)); flc->word3_rflc_63_32 = upper_32_bits( - (uint64_t)&(((struct dpaa2_sec_qp *) + (size_t)&(((struct dpaa2_sec_qp *) dev->data->queue_pairs[0])->rx_vq)); session->ctxt = priv; for (i = 0; i < bufsize; i++) @@ -1786,7 +1786,7 @@ dpaa2_sec_aead_init(struct rte_cryptodev *dev, session->aead_key.length = aead_xform->key.length; ctxt->auth_only_len = aead_xform->aad_length; - aeaddata.key = (uint64_t)session->aead_key.data; + aeaddata.key = (size_t)session->aead_key.data; aeaddata.keylen = session->aead_key.length; aeaddata.key_enc_flags = 0; aeaddata.key_type = RTA_DATA_IMM; @@ -1840,10 +1840,10 @@ dpaa2_sec_aead_init(struct rte_cryptodev *dev, session->digest_length); flc->word1_sdl = (uint8_t)bufsize; flc->word2_rflc_31_0 = lower_32_bits( - (uint64_t)&(((struct dpaa2_sec_qp *) + (size_t)&(((struct dpaa2_sec_qp *) dev->data->queue_pairs[0])->rx_vq)); flc->word3_rflc_63_32 = upper_32_bits( - (uint64_t)&(((struct dpaa2_sec_qp *) + (size_t)&(((struct dpaa2_sec_qp *) dev->data->queue_pairs[0])->rx_vq)); session->ctxt = priv; for (i = 0; i < bufsize; i++) @@ -1928,7 +1928,7 @@ dpaa2_sec_aead_chain_init(struct rte_cryptodev *dev, memcpy(session->auth_key.data, auth_xform->key.data, auth_xform->key.length); - authdata.key = (uint64_t)session->auth_key.data; + authdata.key = (size_t)session->auth_key.data; authdata.keylen = session->auth_key.length; authdata.key_enc_flags = 0; authdata.key_type = RTA_DATA_IMM; @@ -1988,7 +1988,7 @@ dpaa2_sec_aead_chain_init(struct rte_cryptodev *dev, auth_xform->algo); goto error_out; } - cipherdata.key = (uint64_t)session->cipher_key.data; + cipherdata.key = (size_t)session->cipher_key.data; cipherdata.keylen = session->cipher_key.length; cipherdata.key_enc_flags = 0; cipherdata.key_type = RTA_DATA_IMM; @@ -2066,10 +2066,10 @@ dpaa2_sec_aead_chain_init(struct rte_cryptodev *dev, flc->word1_sdl = (uint8_t)bufsize; flc->word2_rflc_31_0 = lower_32_bits( - (uint64_t)&(((struct dpaa2_sec_qp *) + (size_t)&(((struct dpaa2_sec_qp *) dev->data->queue_pairs[0])->rx_vq)); flc->word3_rflc_63_32 = upper_32_bits( - (uint64_t)&(((struct dpaa2_sec_qp *) + (size_t)&(((struct dpaa2_sec_qp *) dev->data->queue_pairs[0])->rx_vq)); session->ctxt = priv; for (i = 0; i < bufsize; i++) @@ -2202,7 +2202,7 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, memcpy(session->auth_key.data, auth_xform->key.data, auth_xform->key.length); - authdata.key = (uint64_t)session->auth_key.data; + authdata.key = (size_t)session->auth_key.data; authdata.keylen = session->auth_key.length; authdata.key_enc_flags = 0; authdata.key_type = RTA_DATA_IMM; @@ -2261,7 +2261,7 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, auth_xform->algo); goto out; } - cipherdata.key = (uint64_t)session->cipher_key.data; + cipherdata.key = (size_t)session->cipher_key.data; cipherdata.keylen = session->cipher_key.length; cipherdata.key_enc_flags = 0; cipherdata.key_type = RTA_DATA_IMM; @@ -2345,10 +2345,10 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, /* Enable the stashing control bit */ DPAA2_SET_FLC_RSC(flc); flc->word2_rflc_31_0 = lower_32_bits( - (uint64_t)&(((struct dpaa2_sec_qp *) + (size_t)&(((struct dpaa2_sec_qp *) dev->data->queue_pairs[0])->rx_vq) | 0x14); flc->word3_rflc_63_32 = upper_32_bits( - (uint64_t)&(((struct dpaa2_sec_qp *) + (size_t)&(((struct dpaa2_sec_qp *) dev->data->queue_pairs[0])->rx_vq)); /* Set EWS bit i.e. enable write-safe */ diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index c3e6fbf..9bdc014 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -126,7 +126,7 @@ dpaa2_eventdev_enqueue_burst(void *port, const struct rte_event ev[], goto send_partial; } rte_memcpy(ev_temp, event, sizeof(struct rte_event)); - DPAA2_SET_FD_ADDR((&fd_arr[loop]), ev_temp); + DPAA2_SET_FD_ADDR((&fd_arr[loop]), (size_t)ev_temp); DPAA2_SET_FD_LEN((&fd_arr[loop]), sizeof(struct rte_event)); } @@ -258,7 +258,7 @@ dpaa2_eventdev_dequeue_burst(void *port, struct rte_event ev[], qbman_swp_prefetch_dqrr_next(swp); fd = qbman_result_DQ_fd(dq); - rxq = (struct dpaa2_queue *)qbman_result_DQ_fqd_ctx(dq); + rxq = (struct dpaa2_queue *)(size_t)qbman_result_DQ_fqd_ctx(dq); if (rxq) { rxq->cb(swp, fd, dq, rxq, &ev[num_pkts]); } else { @@ -736,7 +736,7 @@ dpaa2_eventdev_setup_dpci(struct dpaa2_dpci_dev *dpci_dev, dpaa2_eventdev_process_atomic; for (i = 0 ; i < DPAA2_EVENT_DPCI_MAX_QUEUES; i++) { - rx_queue_cfg.user_ctx = (uint64_t)(&dpci_dev->queue[i]); + rx_queue_cfg.user_ctx = (size_t)(&dpci_dev->queue[i]); ret = dpci_set_rx_queue(&dpci_dev->dpci, CMD_PRI_LOW, dpci_dev->token, i, diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c index 2bd62e8..1a618ae 100644 --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c @@ -242,7 +242,7 @@ rte_dpaa2_mbuf_alloc_bulk(struct rte_mempool *pool, #endif struct qbman_swp *swp; uint16_t bpid; - uint64_t bufs[DPAA2_MBUF_MAX_ACQ_REL]; + size_t bufs[DPAA2_MBUF_MAX_ACQ_REL]; int i, ret; unsigned int n = 0; struct dpaa2_bp_info *bp_info; @@ -270,10 +270,10 @@ rte_dpaa2_mbuf_alloc_bulk(struct rte_mempool *pool, * then the remainder. */ if ((count - n) > DPAA2_MBUF_MAX_ACQ_REL) { - ret = qbman_swp_acquire(swp, bpid, bufs, + ret = qbman_swp_acquire(swp, bpid, (void *)bufs, DPAA2_MBUF_MAX_ACQ_REL); } else { - ret = qbman_swp_acquire(swp, bpid, bufs, + ret = qbman_swp_acquire(swp, bpid, (void *)bufs, count - n); } /* In case of less than requested number of buffers available @@ -290,7 +290,7 @@ rte_dpaa2_mbuf_alloc_bulk(struct rte_mempool *pool, } /* assigning mbuf from the acquired objects */ for (i = 0; (i < ret) && bufs[i]; i++) { - DPAA2_MODIFY_IOVA_TO_VADDR(bufs[i], uint64_t); + DPAA2_MODIFY_IOVA_TO_VADDR(bufs[i], size_t); obj_table[n] = (struct rte_mbuf *) (bufs[i] - bp_info->meta_data_size); PMD_TX_LOG(DEBUG, "Acquired %p address %p from BMAN", diff --git a/drivers/net/dpaa2/Makefile b/drivers/net/dpaa2/Makefile index 5a93a0b..068e9d3 100644 --- a/drivers/net/dpaa2/Makefile +++ b/drivers/net/dpaa2/Makefile @@ -25,7 +25,6 @@ CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc/qbman/include CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc/mc CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc/portal CFLAGS += -I$(RTE_SDK)/drivers/mempool/dpaa2 -CFLAGS += -I$(RTE_SDK)/drivers/event/dpaa2 CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal # versioning export map diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c index b93376d..4b60f56 100644 --- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c +++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c @@ -50,7 +50,7 @@ dpaa2_setup_flow_dist(struct rte_eth_dev *eth_dev, ret = dpaa2_distset_to_dpkg_profile_cfg(req_dist_set, &kg_cfg); if (ret) { - PMD_INIT_LOG(ERR, "given rss_hf (%lx) not supported", + PMD_INIT_LOG(ERR, "given rss_hf (%" PRIx64 ") not supported", req_dist_set); rte_free(p_params); return ret; diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 09a11d6..fd5897e 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -445,7 +445,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev, memset(&cfg, 0, sizeof(struct dpni_queue)); options = options | DPNI_QUEUE_OPT_USER_CTX; - cfg.user_context = (uint64_t)(dpaa2_q); + cfg.user_context = (size_t)(dpaa2_q); /*if ls2088 or rev2 device, enable the stashing */ @@ -560,7 +560,7 @@ dpaa2_dev_tx_queue_setup(struct rte_eth_dev *dev, */ cong_notif_cfg.threshold_exit = CONG_EXIT_TX_THRESHOLD; cong_notif_cfg.message_ctx = 0; - cong_notif_cfg.message_iova = (uint64_t)dpaa2_q->cscn; + cong_notif_cfg.message_iova = (size_t)dpaa2_q->cscn; cong_notif_cfg.dest_cfg.dest_type = DPNI_DEST_NONE; cong_notif_cfg.notification_mode = DPNI_CONG_OPT_WRITE_MEM_ON_ENTER | @@ -1702,7 +1702,7 @@ int dpaa2_eth_eventq_attach(const struct rte_eth_dev *dev, } options |= DPNI_QUEUE_OPT_USER_CTX; - cfg.user_context = (uint64_t)(dpaa2_ethq); + cfg.user_context = (size_t)(dpaa2_ethq); ret = dpni_set_queue(dpni, CMD_PRI_LOW, eth_priv->token, DPNI_QUEUE_RX, dpaa2_ethq->tc_index, flow_id, options, &cfg); diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 183293c..f33b1fd 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "dpaa2_ethdev.h" #include "base/dpaa2_hw_dpni_annot.h" @@ -104,11 +103,9 @@ dpaa2_dev_rx_parse_frc(struct rte_mbuf *m, uint16_t frc) } static inline uint32_t __attribute__((hot)) -dpaa2_dev_rx_parse_slow(uint64_t hw_annot_addr) +dpaa2_dev_rx_parse_slow(struct dpaa2_annot_hdr *annotation) { uint32_t pkt_type = RTE_PTYPE_UNKNOWN; - struct dpaa2_annot_hdr *annotation = - (struct dpaa2_annot_hdr *)hw_annot_addr; PMD_RX_LOG(DEBUG, "annotation = 0x%lx ", annotation->word4); if (BIT_ISSET_AT_POS(annotation->word3, L2_ARP_PRESENT)) { @@ -167,7 +164,7 @@ dpaa2_dev_rx_parse_slow(uint64_t hw_annot_addr) } static inline uint32_t __attribute__((hot)) -dpaa2_dev_rx_parse(struct rte_mbuf *mbuf, uint64_t hw_annot_addr) +dpaa2_dev_rx_parse(struct rte_mbuf *mbuf, void *hw_annot_addr) { struct dpaa2_annot_hdr *annotation = (struct dpaa2_annot_hdr *)hw_annot_addr; @@ -207,25 +204,24 @@ dpaa2_dev_rx_parse(struct rte_mbuf *mbuf, uint64_t hw_annot_addr) break; } - return dpaa2_dev_rx_parse_slow(hw_annot_addr); + return dpaa2_dev_rx_parse_slow(annotation); } static inline struct rte_mbuf *__attribute__((hot)) eth_sg_fd_to_mbuf(const struct qbman_fd *fd) { struct qbman_sge *sgt, *sge; - dma_addr_t sg_addr; + size_t sg_addr, fd_addr; int i = 0; - uint64_t fd_addr; struct rte_mbuf *first_seg, *next_seg, *cur_seg, *temp; - fd_addr = (uint64_t)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)); + fd_addr = (size_t)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)); /* Get Scatter gather table address */ sgt = (struct qbman_sge *)(fd_addr + DPAA2_GET_FD_OFFSET(fd)); sge = &sgt[i++]; - sg_addr = (uint64_t)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FLE_ADDR(sge)); + sg_addr = (size_t)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FLE_ADDR(sge)); /* First Scatter gather entry */ first_seg = DPAA2_INLINE_MBUF_FROM_BUF(sg_addr, @@ -243,14 +239,14 @@ eth_sg_fd_to_mbuf(const struct qbman_fd *fd) DPAA2_GET_FD_FRC_PARSE_SUM(fd)); else first_seg->packet_type = dpaa2_dev_rx_parse(first_seg, - (uint64_t)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)) - + DPAA2_FD_PTA_SIZE); + (void *)((size_t)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)) + + DPAA2_FD_PTA_SIZE)); rte_mbuf_refcnt_set(first_seg, 1); cur_seg = first_seg; while (!DPAA2_SG_IS_FINAL(sge)) { sge = &sgt[i++]; - sg_addr = (uint64_t)DPAA2_IOVA_TO_VADDR( + sg_addr = (size_t)DPAA2_IOVA_TO_VADDR( DPAA2_GET_FLE_ADDR(sge)); next_seg = DPAA2_INLINE_MBUF_FROM_BUF(sg_addr, rte_dpaa2_bpid_info[DPAA2_GET_FLE_BPID(sge)].meta_data_size); @@ -299,8 +295,8 @@ eth_fd_to_mbuf(const struct qbman_fd *fd) dpaa2_dev_rx_parse_frc(mbuf, DPAA2_GET_FD_FRC_PARSE_SUM(fd)); else mbuf->packet_type = dpaa2_dev_rx_parse(mbuf, - (uint64_t)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)) - + DPAA2_FD_PTA_SIZE); + (void *)((size_t)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)) + + DPAA2_FD_PTA_SIZE)); PMD_RX_LOG(DEBUG, "to mbuf - mbuf =%p, mbuf->buf_addr =%p, off = %d," "fd_off=%d fd =%lx, meta = %d bpid =%d, len=%d\n", @@ -340,7 +336,7 @@ eth_mbuf_to_sg_fd(struct rte_mbuf *mbuf, DPAA2_FD_SET_FORMAT(fd, qbman_fd_sg); /*Set Scatter gather table and Scatter gather entries*/ sgt = (struct qbman_sge *)( - (uint64_t)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)) + (size_t)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)) + DPAA2_GET_FD_OFFSET(fd)); for (i = 0; i < mbuf->nb_segs; i++) { @@ -523,8 +519,8 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) } dq_storage = q_storage->active_dqs; - rte_prefetch0((void *)((uint64_t)(dq_storage))); - rte_prefetch0((void *)((uint64_t)(dq_storage + 1))); + rte_prefetch0((void *)(size_t)(dq_storage)); + rte_prefetch0((void *)(size_t)(dq_storage + 1)); /* Prepare next pull descriptor. This will give space for the * prefething done on DQRR entries @@ -554,7 +550,7 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) */ while (!qbman_check_new_result(dq_storage)) ; - rte_prefetch0((void *)((uint64_t)(dq_storage + 2))); + rte_prefetch0((void *)((size_t)(dq_storage + 2))); /* Check whether Last Pull command is Expired and * setting Condition for Loop termination */ @@ -569,7 +565,7 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) next_fd = qbman_result_DQ_fd(dq_storage + 1); /* Prefetch Annotation address for the parse results */ - rte_prefetch0((void *)(DPAA2_GET_FD_ADDR(next_fd) + rte_prefetch0((void *)(size_t)(DPAA2_GET_FD_ADDR(next_fd) + DPAA2_FD_PTA_SIZE + 16)); if (unlikely(DPAA2_FD_GET_FORMAT(fd) == qbman_fd_sg)) @@ -726,7 +722,7 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) fd_arr[loop].simple.frc = 0; DPAA2_RESET_FD_CTRL((&fd_arr[loop])); - DPAA2_SET_FD_FLC((&fd_arr[loop]), NULL); + DPAA2_SET_FD_FLC((&fd_arr[loop]), (size_t)NULL); if (likely(RTE_MBUF_DIRECT(*bufs))) { mp = (*bufs)->pool; /* Check the basic scenario and set -- 2.7.4