From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02hn0232.outbound.protection.outlook.com [104.47.36.232]) by dpdk.org (Postfix) with ESMTP id 6F1F73989 for ; Tue, 5 Sep 2017 12:32:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=BxhOwBJgdGJ72V+zhfzRMitAhM/hA/oyhQyeb48l2n0=; b=eBTEhxUey+wp58mLyTZwg8SycsltKkzvCSc6mwC7uPAk6IKwiqR4xJQb3WkJbwcvXCZKbl0aQSc0cmPgDeBx8Zq7BgOYPvAk+cH2NP3aRJrJEPUipZ6U2JGEWjdM2+jrMsi8yCdJfaWvHgOk/oJR7ecz4Bqzix7ChOnfBqd3Etk= Received: from localhost.localdomain (14.140.2.178) by MWHPR07MB3102.namprd07.prod.outlook.com (10.172.95.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Tue, 5 Sep 2017 10:31:57 +0000 From: Santosh Shukla To: dev@dpdk.org Cc: thomas@monjalon.net, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, olivier.matz@6wind.com, Santosh Shukla Date: Tue, 5 Sep 2017 16:01:15 +0530 Message-Id: <20170905103119.20511-2-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170905103119.20511-1-santosh.shukla@caviumnetworks.com> References: <20170814151537.29454-1-santosh.shukla@caviumnetworks.com> <20170905103119.20511-1-santosh.shukla@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: PN1PR01CA0073.INDPRD01.PROD.OUTLOOK.COM (10.174.144.141) To MWHPR07MB3102.namprd07.prod.outlook.com (10.172.95.8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3890b441-a4d5-416c-f32f-08d4f44956fa X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:MWHPR07MB3102; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3102; 3:ZcyiZW+NXn8S8ErseJ+T1OP4awau3KHpxnZ+ymnfrkOUJVdKdxParp0vmOOBAw5kXCL8M7Fqak6X2SGqCRW270EZIZedDahMK3k+f4nafXOJmlXuE16WGqSk/HAZdksmqf/wm0mZcnIZrnuW/wWjc5lcCG7Tg6APV+NksKr+raZI5ceXped7EJomh/9p488xSHZ0e+AvGz7HSR8J+ldLsnmwsbJ94BAv6VZV4BfAu9WQf1PJUT0OY2buwnicYbhj; 25:5JAe6DL0OzIgXWBc525FsuYhV6utgvh76/XVMX19/V3NCZL7TBvA5tyTx7WSlMZ8CQFVC48V6yvXNR/YQ4tukQNafiDU/q9xpHPkyJO/MjVNhUnwt3dgXhA8Zm+nCBIgYtgfW8+PB6QVoD1+4RdFBwm3wqb2lc9axfqDJDnqObc27XNsl3u3D2mLlmbuJ1s5qZqYMIueDZdOi2yJ0Q0/Ly8jSeb9kmYbVI/CVhQuuQB6b4IspUBZfoI27oOznyb9BDkqtXYuXjf6I5/kC2ZBXbyIegJvctgDbdAyRgd3HP59+aAYDJdP/8f0fUADxnz9eMrpO3twmkimMfhOmjmEoQ==; 31:H9pEQ3tSVvKh3CvpwLtzOy0WfAiw1vE90Gr42c5tXCN40Eaq9Gof+qgEaAqxRaGBLUJo5uS1nblqQaAyOxzZlItutFlaUn5f4qKbISmv7VRi5B1t2sAkMCnG35ChjONlYZ7qzshp9tlurmhqOEt/DjyuPTjZhj2f5iPxLFf4xKIGYborMU8/0pPt5BGbJD+IgH0WdeqAVRGx9Usau5lnOZcnp0jv0ZF6VJtyHPCS35s= X-MS-TrafficTypeDiagnostic: MWHPR07MB3102: X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3102; 20:6lUk6h0WKvcMIw5dEy55O2rs8f+HVMcM+wpYKTp3fKDAU1VU3Bzki8cJ8WodOQbb/2pW63nbzEBqDHC+cX+aLHCd2EMlU+nV4sTDyey2h0BpAtuSHmr75Y+wMKI+RfrvzFFcAk8UCc/SDxD2Kj1w1JAdXsqttrKZZxEkglGvp92FOMd2E/0rhlLCnMzVf2WqlflMuTK+nEe2HWr+fkAjvfSwjVYLZxd8JJV8wlNrF05MedeEUubYSRD81C4cBXc6Hl4ZzON7Xa3tcz66sll/P9NiOgcG17ND+6ANPI2ahjmvT+RXxLraBVbL/LPeU7QPipegaWxbFkQXyYlBtV/+bbn8BWmh5z62U/QFHp+Jxy6+KhswvRjBduWp9MLyHPy4JejfhUQkujuxsGtJyzlLBpIjvvkQw2Rg1TJHyJfE1pwbchaZ4aqKC6alwpLruTuOFmlSeOBTe/bfb/hfXUawSixqACxhEIFCsW0KeNpB802RhxXnN6Mmm2fZ4MNrsV3SMASFjBvnsIPATu83yWdeAMm13WSf1pjPjc5VEhs74U2iUrkHscjDrlwrMdD5zDo9YBWLrVqzxAP8RuQc+9WW96qhGMbhH4N0fhZ2z9Re5mQ= X-Exchange-Antispam-Report-Test: UriScan:(131327999870524)(275809806118684); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(6041248)(20161123558100)(20161123555025)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR07MB3102; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR07MB3102; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3102; 4:jQMHTLzNwotogKOoC5yv+iIpjRx097JiuBWqU+sK7IKny9OVhWCO5wLaC/W+heEj6C8mNAczfDzrefy2eRnuy0G9/9xx6IElI4aFz1LZ/6Aq00aGzHEdPxm25wnxNqn2Hv1DMzyuSINpeJd31v97phC1D31oljyhObM7+KUQ8tl4p6kBf9Dt6iGhT+4kXaafaZnoTXGOKuzniom+WVXx58LpsvMyaOxKV9rFrRBS/YvxnFzUEAO/filXLyH9uPLhQkG5vJF/VdCgbzChzQfqiZtRP4WOad1m2vyiHUwnVEdi7fAf+Cv/q3bpqREohqac4VPwaV/b6NTTW2SvgmwyqA== X-Forefront-PRVS: 0421BF7135 X-Forefront-Antispam-Report: SFV:SPM; SFS:(10009020)(6009001)(6069001)(189002)(199003)(8676002)(6116002)(7736002)(101416001)(50986999)(5003940100001)(48376002)(53936002)(8936002)(305945005)(107886003)(110136004)(50466002)(97736004)(1076002)(6916009)(3846002)(2906002)(81156014)(81166006)(50226002)(2950100002)(42882006)(105586002)(4326008)(6506006)(6666003)(8656003)(25786009)(5660300001)(5009440100003)(68736007)(6486002)(72206003)(2361001)(33646002)(2351001)(36756003)(575784001)(16200700003)(6512007)(76176999)(66066001)(478600001)(47776003)(53946003)(189998001)(106356001)(42186005)(547174002)(110426004)(21314002); DIR:OUT; SFP:1501; SCL:5; SRVR:MWHPR07MB3102; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR07MB3102; 23:q6DIGOi+CzMCdIHXe5lA+fxzRu7B3ORbOQJob+Bgt?= =?us-ascii?Q?TEZehQHSLJGysU1CTGbZMNEXxnG92J1caSc4votbalJkpUSyu8d1X4O7xDUx?= =?us-ascii?Q?NDk6RzYlk4CXNXoRaWtsFTpSbw2Tv+9Cvh9VSYpNduUrFAP90gd/75guI4KU?= =?us-ascii?Q?gk5nuW4wxxZs37jVvuXxrjKYjN0CYjZq/MEtKooEjxHIY+Hdsx4NZN7zhKcL?= =?us-ascii?Q?GqZkKuFm0GrZl3w8Me2uvP8kPL8op1KhopVYL9RI3xZYwzqw3Wy3qDO77uLV?= =?us-ascii?Q?H3JsxI1cx3zlBZzfOlQ170x3uMpQul9J0eXH2Ao8MKL53lTpJqPfHNn7CLTc?= =?us-ascii?Q?n4JE+wzWHN3EdVfmbLLVaBWxkIg59LPDQOqfCUvPfCXKgUGcl0ju8wk793CV?= =?us-ascii?Q?ckryjwDLYAgvdVgXfqZAZrq924Nou2A6gBj7yC6yXeIGcrTDSAOlU9gj8ioN?= =?us-ascii?Q?IQOjbRFWLMqCSBEJYKpMWcQb33ntoEUWKD7Z2wxDhgkFsmq407dmPtCcSLoN?= =?us-ascii?Q?0tL9z+H0l357CxezKpQPLgLNzAXfKAcfOQBi1/4Up9ganfnktD+9nWxfHVBX?= =?us-ascii?Q?+eMXFODEQ2WK5TLeAHyAItl8e2Z2drOzVpUPrlSvGyKr4tAezIbiNC9x2EI1?= =?us-ascii?Q?m5QF6qjcRdOv+K2NvqtYC0qOulPV0txOLuYKA2DSm438HZFEDq0HLnlrzhB4?= =?us-ascii?Q?A/lBL/8AuBBZt3s5fZGyuz0MvXBoxVwh9Ib0YwuC0/jK9x7x4Mw9ETwEZkNP?= =?us-ascii?Q?itKBlcx39ENMGW7MQN4z2Zs4Xwdyu+1AM5NmtrKtxoZJkM2gcWd/EKSI0JTU?= =?us-ascii?Q?5lxwAg+VB+cXOVo8QNdfRaOFJgiMlk6TIV0VirENcn/s4RWVwoBv21Ikvq+q?= =?us-ascii?Q?dRMN7QEgzuYk/SQPH6FySXbiSIejn5aJWInnVbLYn2f1M2UrTVyrqF9vjhhU?= =?us-ascii?Q?nCdvlxaa+gDuWYf/il1wRZSQS5wpI9af5FCy5x1P4umFI2WHjNN5Ebf1WiPp?= =?us-ascii?Q?HzfA1SPdbMD0+Vj4T3ulLa+xlypcx0TJHnSoFSahJdsjIqv1pL2k8sOmfo7L?= =?us-ascii?Q?SbEk2qLUbNcHv1FDhXPFnFhKkPtW//ZWHnJFn5Vum2U7exkl7qS2lrnRWlQE?= =?us-ascii?Q?DO9XsI6mY3AxdWTFoYETxg5pN7QdXu2t19hTsB5iwg7k1pXWv8mb9trFw1Kc?= =?us-ascii?Q?Am3BEzmocg2iacQCbB+HxsISeLr/b5zLj6k6Z/wrsSWyBGIZEg5s94aH0k9k?= =?us-ascii?Q?s4QNhut1aPMNDEyJY+ExCxZT1pk6WNBOMJkfXoSB+1+QgX0Yeb0uI7HH8O/x?= =?us-ascii?Q?9z57/mddjqp3tErm1wwtw/bsn89+YRdhYQGyECFDPVYCqzdnUqqb4ypzNYl6?= =?us-ascii?Q?h6FVQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3102; 6:DCnT/EQIPjk6OFKYFiVklDzPTNMC9TNrtVQAzg6J/Iv8YoEu7aBIicVytUD0lBK96Rzvj+sq0+JUfk2Xa9txLi/EJg3xeaJ38d7kWTSXMVh8/XfOle5j980Xj8ALP1GrXcdSBKBV60yOOs82Q/qj4+bqGYMUNJdcDWTLo9EUQYuF/JLQaL289vToMQL4aDq6TTY1xI3LPDBvjw8/CfigTql7NRFG7hRAhMVp94v9V4FxVOYTAL4WrTtBk4vYy6PXxVL8rQkJ0WuuUZIP1MGfbSEv+AIUfag+YoxwXHlaZL50cfPoSyB9i3prFqWL0P7H4U3LYVAQ2S9ofvsC4v0Ryg==; 5:R694WFnJbPm/uYBeLJFJnj9hJ1L6qwB4b1hekMTtzmuNdrT+3rkXvhQxySitmcooEWdb6jKHudq6g2Y7LODw1Y6aGw02Mc9Cw4zwwVOYfeaKBelWxoShrXPbpO7T4H+UWevvKO+VaNOSdjc0bQ6i/g==; 24:pnUCWgJSGDwCZeP/RW23YMHAWvV6oKujyTLyS1nSWU+wfnRmsn9dBL3Do1R0nekO/IzjBQc36d6TxFTPN4+8Og==; 7:WBVYz3Kw5I4CcZoBRSR3ss/0zzA1/JL32shPNBREMCnG9HukmV35sVTi8m+7pOLs583fzSRJCmNrjVkPv2ZlchyNo8ADSsCfa63hsSVW7Q7ghcCX2NgGmv6QRo3dTK5i02KjoccxbkAyJDzsKG5G3BAdUiM0OOqVCdgnqeS0LQMcxPoGwnYEe0LL34jEOHk9fQ8ZnwcpdiUQfk4TFgXmZy7f53Zlcm7t0dJ9gCBhvk8= SpamDiagnosticOutput: 1:22 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2017 10:31:57.0627 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3102 Subject: [dpdk-dev] [PATCH v2 1/5] eal: rename phys_addr_t to iova_addr_t 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: Tue, 05 Sep 2017 10:32:03 -0000 Renamed data type from phys_addr_t to iova_addr_t. Signed-off-by: Santosh Shukla --- v1 --> v2: - clang build fix for v1 for linuxapp. v1 note: - As changes percolate to all possible dpdk subsystem.. so its difficult to tag subject with one common title, but since, core of changeset is at eal layer so keeping 'eal:' as title. app/test-crypto-perf/cperf_test_vectors.h | 4 +-- doc/guides/contributing/documentation.rst | 4 +-- doc/guides/prog_guide/cryptodev_lib.rst | 6 ++-- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 14 ++++---- drivers/crypto/qat/qat_adf/qat_algs.h | 6 ++-- drivers/crypto/qat/qat_crypto.h | 2 +- drivers/mempool/dpaa2/dpaa2_hw_mempool.h | 2 +- drivers/net/ark/ark_ddm.c | 2 +- drivers/net/ark/ark_ddm.h | 4 +-- drivers/net/ark/ark_ethdev_rx.c | 12 +++---- drivers/net/ark/ark_ethdev_tx.c | 2 +- drivers/net/ark/ark_mpu.c | 2 +- drivers/net/ark/ark_mpu.h | 4 +-- drivers/net/ark/ark_udm.c | 2 +- drivers/net/ark/ark_udm.h | 4 +-- drivers/net/avp/avp_ethdev.c | 2 +- drivers/net/avp/rte_avp_common.h | 20 +++++------ drivers/net/bnx2x/bnx2x.c | 40 +++++++++++----------- drivers/net/bnx2x/bnx2x.h | 22 ++++++------ drivers/net/bnx2x/bnx2x_rxtx.c | 4 +-- drivers/net/bnx2x/bnx2x_stats.c | 2 +- drivers/net/bnx2x/bnx2x_vfpf.c | 2 +- drivers/net/bnx2x/ecore_sp.h | 2 +- drivers/net/bnxt/bnxt.h | 10 +++--- drivers/net/bnxt/bnxt_cpr.h | 4 +-- drivers/net/bnxt/bnxt_ethdev.c | 2 +- drivers/net/bnxt/bnxt_ring.c | 2 +- drivers/net/bnxt/bnxt_ring.h | 2 +- drivers/net/bnxt/bnxt_rxr.h | 4 +-- drivers/net/bnxt/bnxt_txr.h | 2 +- drivers/net/bnxt/bnxt_vnic.c | 2 +- drivers/net/bnxt/bnxt_vnic.h | 6 ++-- drivers/net/liquidio/lio_rxtx.c | 2 +- drivers/net/liquidio/lio_rxtx.h | 4 +-- drivers/net/qede/base/bcm_osal.h | 2 +- drivers/net/sfc/efsys.h | 2 +- drivers/net/sfc/sfc_ef10_rx.c | 2 +- drivers/net/sfc/sfc_ef10_tx.c | 4 +-- drivers/net/thunderx/base/nicvf_hw.c | 2 +- drivers/net/thunderx/base/nicvf_hw.h | 2 +- drivers/net/thunderx/base/nicvf_hw_defs.h | 6 ++-- drivers/net/thunderx/nicvf_ethdev.c | 4 +-- drivers/net/thunderx/nicvf_ethdev.h | 4 +-- drivers/net/thunderx/nicvf_struct.h | 6 ++-- drivers/net/virtio/virtio_rxtx.h | 4 +-- drivers/net/virtio/virtqueue.h | 2 +- drivers/net/xenvirt/rte_eth_xenvirt.c | 2 +- drivers/net/xenvirt/rte_mempool_gntalloc.c | 6 ++-- drivers/net/xenvirt/rte_xen_lib.c | 6 ++-- drivers/net/xenvirt/rte_xen_lib.h | 8 ++--- examples/l2fwd-crypto/main.c | 2 +- lib/librte_cryptodev/rte_crypto.h | 2 +- lib/librte_cryptodev/rte_crypto_sym.h | 6 ++-- lib/librte_cryptodev/rte_cryptodev.h | 2 +- lib/librte_eal/bsdapp/eal/eal_memory.c | 4 +-- lib/librte_eal/common/include/rte_malloc.h | 2 +- lib/librte_eal/common/include/rte_memory.h | 18 +++++----- lib/librte_eal/common/include/rte_memzone.h | 2 +- lib/librte_eal/common/rte_malloc.c | 2 +- lib/librte_eal/linuxapp/eal/eal_memory.c | 8 ++--- lib/librte_eal/linuxapp/eal/eal_xen_memory.c | 4 +-- .../linuxapp/eal/include/exec-env/rte_kni_common.h | 20 ++++++----- lib/librte_mbuf/rte_mbuf.h | 8 ++--- lib/librte_mempool/rte_mempool.c | 18 +++++----- lib/librte_mempool/rte_mempool.h | 14 ++++---- lib/librte_vhost/vhost.h | 2 +- test/test/test_cryptodev.h | 2 +- test/test/test_memzone.c | 8 ++--- 68 files changed, 197 insertions(+), 193 deletions(-) diff --git a/app/test-crypto-perf/cperf_test_vectors.h b/app/test-crypto-perf/cperf_test_vectors.h index 85955703c..a203272cf 100644 --- a/app/test-crypto-perf/cperf_test_vectors.h +++ b/app/test-crypto-perf/cperf_test_vectors.h @@ -78,13 +78,13 @@ struct cperf_test_vector { struct { uint8_t *data; - phys_addr_t phys_addr; + iova_addr_t phys_addr; uint16_t length; } aad; struct { uint8_t *data; - phys_addr_t phys_addr; + iova_addr_t phys_addr; uint16_t length; } digest; diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst index cddbd7bb8..719007b9f 100644 --- a/doc/guides/contributing/documentation.rst +++ b/doc/guides/contributing/documentation.rst @@ -712,7 +712,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati /**< Virtual address of the first mempool object. */ uintptr_t elt_va_end; /**< Virtual address of the mempool object. */ - phys_addr_t elt_pa[MEMPOOL_PG_NUM_DEFAULT]; + iova_addr_t elt_pa[MEMPOOL_PG_NUM_DEFAULT]; /**< Array of physical page addresses for the mempool buffer. */ This doesn't have an effect on the rendered documentation but it is confusing for the developer reading the code. @@ -731,7 +731,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati /** Virtual address of the mempool object. */ uintptr_t elt_va_end; /** Array of physical page addresses for the mempool buffer. */ - phys_addr_t elt_pa[MEMPOOL_PG_NUM_DEFAULT]; + iova_addr_t elt_pa[MEMPOOL_PG_NUM_DEFAULT]; * Check for Doxygen warnings in new code by checking the API documentation build:: diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst index 75ae085f6..248038f64 100644 --- a/doc/guides/prog_guide/cryptodev_lib.rst +++ b/doc/guides/prog_guide/cryptodev_lib.rst @@ -539,12 +539,12 @@ chain. struct { uint8_t *data; - phys_addr_t phys_addr; + iova_addr_t phys_addr; } digest; /**< Digest parameters */ struct { uint8_t *data; - phys_addr_t phys_addr; + iova_addr_t phys_addr; } aad; /**< Additional authentication parameters */ } aead; @@ -566,7 +566,7 @@ chain. struct { uint8_t *data; - phys_addr_t phys_addr; + iova_addr_t phys_addr; } digest; /**< Digest parameters */ } auth; }; diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index 5d7a82823..184c7069d 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -271,9 +271,9 @@ enum qbman_fd_format { #define DPAA2_EQ_RESP_ALWAYS 1 #ifdef RTE_LIBRTE_DPAA2_USE_PHYS_IOVA -static void *dpaa2_mem_ptov(phys_addr_t paddr) __attribute__((unused)); +static void *dpaa2_mem_ptov(iova_addr_t paddr) __attribute__((unused)); /* todo - this is costly, need to write a fast coversion routine */ -static void *dpaa2_mem_ptov(phys_addr_t paddr) +static void *dpaa2_mem_ptov(iova_addr_t paddr) { const struct rte_memseg *memseg = rte_eal_get_physmem_layout(); int i; @@ -287,8 +287,8 @@ static void *dpaa2_mem_ptov(phys_addr_t paddr) return NULL; } -static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr) __attribute__((unused)); -static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr) +static iova_addr_t dpaa2_mem_vtop(uint64_t vaddr) __attribute__((unused)); +static iova_addr_t dpaa2_mem_vtop(uint64_t vaddr) { const struct rte_memseg *memseg = rte_eal_get_physmem_layout(); int i; @@ -299,7 +299,7 @@ static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr) return memseg[i].phys_addr + (vaddr - memseg[i].addr_64); } - return (phys_addr_t)(NULL); + return (iova_addr_t)(NULL); } /** @@ -320,13 +320,13 @@ static phys_addr_t dpaa2_mem_vtop(uint64_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((iova_addr_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((iova_addr_t)(_mem))); } #else /* RTE_LIBRTE_DPAA2_USE_PHYS_IOVA */ diff --git a/drivers/crypto/qat/qat_adf/qat_algs.h b/drivers/crypto/qat/qat_adf/qat_algs.h index 2c8e03c0a..c53ebd7ed 100644 --- a/drivers/crypto/qat/qat_adf/qat_algs.h +++ b/drivers/crypto/qat/qat_adf/qat_algs.h @@ -104,8 +104,8 @@ struct qat_alg_buf_list { struct qat_crypto_op_cookie { struct qat_alg_buf_list qat_sgl_list_src; struct qat_alg_buf_list qat_sgl_list_dst; - phys_addr_t qat_sgl_src_phys_addr; - phys_addr_t qat_sgl_dst_phys_addr; + iova_addr_t qat_sgl_src_phys_addr; + iova_addr_t qat_sgl_dst_phys_addr; }; /* Common content descriptor */ @@ -124,7 +124,7 @@ struct qat_session { void *bpi_ctx; struct qat_alg_cd cd; uint8_t *cd_cur_ptr; - phys_addr_t cd_paddr; + iova_addr_t cd_paddr; struct icp_qat_fw_la_bulk_req fw_req; uint8_t aad_len; struct qat_crypto_instance *inst; diff --git a/drivers/crypto/qat/qat_crypto.h b/drivers/crypto/qat/qat_crypto.h index 3f35a00e7..037805633 100644 --- a/drivers/crypto/qat/qat_crypto.h +++ b/drivers/crypto/qat/qat_crypto.h @@ -63,7 +63,7 @@ enum qat_device_gen { struct qat_queue { char memz_name[RTE_MEMZONE_NAMESIZE]; void *base_addr; /* Base address */ - phys_addr_t base_phys_addr; /* Queue physical address */ + iova_addr_t base_phys_addr; /* Queue physical address */ uint32_t head; /* Shadow copy of the head */ uint32_t tail; /* Shadow copy of the tail */ uint32_t modulo; diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.h b/drivers/mempool/dpaa2/dpaa2_hw_mempool.h index 56b71bede..835fe9ef7 100644 --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.h +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.h @@ -39,7 +39,7 @@ struct buf_pool_cfg { void *addr; /**< The address from where DPAA2 will carve out the buffers */ - phys_addr_t phys_addr; + iova_addr_t phys_addr; /**< Physical address of the memory provided in addr */ uint32_t num; /**< Number of buffers */ diff --git a/drivers/net/ark/ark_ddm.c b/drivers/net/ark/ark_ddm.c index 221460c78..7c78ab75c 100644 --- a/drivers/net/ark/ark_ddm.c +++ b/drivers/net/ark/ark_ddm.c @@ -93,7 +93,7 @@ ark_ddm_reset(struct ark_ddm_t *ddm) } void -ark_ddm_setup(struct ark_ddm_t *ddm, phys_addr_t cons_addr, uint32_t interval) +ark_ddm_setup(struct ark_ddm_t *ddm, iova_addr_t cons_addr, uint32_t interval) { ddm->setup.cons_write_index_addr = cons_addr; ddm->setup.write_index_interval = interval / 4; /* 4 ns period */ diff --git a/drivers/net/ark/ark_ddm.h b/drivers/net/ark/ark_ddm.h index de61926c3..3381cb9e2 100644 --- a/drivers/net/ark/ark_ddm.h +++ b/drivers/net/ark/ark_ddm.h @@ -127,7 +127,7 @@ struct ark_ddm_cpld_ps_t { #define ARK_DDM_SETUP 0x00e0 struct ark_ddm_setup_t { - phys_addr_t cons_write_index_addr; + iova_addr_t cons_write_index_addr; uint32_t write_index_interval; /* 4ns each */ volatile uint32_t cons_index; }; @@ -165,7 +165,7 @@ void ark_ddm_start(struct ark_ddm_t *ddm); int ark_ddm_stop(struct ark_ddm_t *ddm, const int wait); void ark_ddm_reset(struct ark_ddm_t *ddm); void ark_ddm_stats_reset(struct ark_ddm_t *ddm); -void ark_ddm_setup(struct ark_ddm_t *ddm, phys_addr_t cons_addr, +void ark_ddm_setup(struct ark_ddm_t *ddm, iova_addr_t cons_addr, uint32_t interval); void ark_ddm_dump_stats(struct ark_ddm_t *ddm, const char *msg); void ark_ddm_dump(struct ark_ddm_t *ddm, const char *msg); diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c index f39e6f68a..1cbda01a7 100644 --- a/drivers/net/ark/ark_ethdev_rx.c +++ b/drivers/net/ark/ark_ethdev_rx.c @@ -62,7 +62,7 @@ struct ark_rx_queue { struct rte_mbuf **reserve_q; /* array of physical addresses of the mbuf data pointer */ /* This point is a virtual address */ - phys_addr_t *paddress_q; + iova_addr_t *paddress_q; struct rte_mempool *mb_pool; struct ark_udm_t *udm; @@ -96,9 +96,9 @@ eth_ark_rx_hw_setup(struct rte_eth_dev *dev, struct ark_rx_queue *queue, uint16_t rx_queue_id __rte_unused, uint16_t rx_queue_idx) { - phys_addr_t queue_base; - phys_addr_t phys_addr_q_base; - phys_addr_t phys_addr_prod_index; + iova_addr_t queue_base; + iova_addr_t phys_addr_q_base; + iova_addr_t phys_addr_prod_index; queue_base = rte_malloc_virt2phy(queue); phys_addr_prod_index = queue_base + @@ -107,7 +107,7 @@ eth_ark_rx_hw_setup(struct rte_eth_dev *dev, phys_addr_q_base = rte_malloc_virt2phy(queue->paddress_q); /* Verify HW */ - if (ark_mpu_verify(queue->mpu, sizeof(phys_addr_t))) { + if (ark_mpu_verify(queue->mpu, sizeof(iova_addr_t))) { PMD_DRV_LOG(ERR, "Illegal configuration rx queue\n"); return -1; } @@ -205,7 +205,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev, socket_id); queue->paddress_q = rte_zmalloc_socket("Ark_rx_queue paddr", - nb_desc * sizeof(phys_addr_t), + nb_desc * sizeof(iova_addr_t), 64, socket_id); diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c index 9ae7ae0e6..578cb09b8 100644 --- a/drivers/net/ark/ark_ethdev_tx.c +++ b/drivers/net/ark/ark_ethdev_tx.c @@ -311,7 +311,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev, static int eth_ark_tx_hw_queue_config(struct ark_tx_queue *queue) { - phys_addr_t queue_base, ring_base, cons_index_addr; + iova_addr_t queue_base, ring_base, cons_index_addr; uint32_t write_interval_ns; /* Verify HW -- MPU */ diff --git a/drivers/net/ark/ark_mpu.c b/drivers/net/ark/ark_mpu.c index cd2c0788f..23575c8e3 100644 --- a/drivers/net/ark/ark_mpu.c +++ b/drivers/net/ark/ark_mpu.c @@ -118,7 +118,7 @@ ark_mpu_reset_stats(struct ark_mpu_t *mpu) } int -ark_mpu_configure(struct ark_mpu_t *mpu, phys_addr_t ring, uint32_t ring_size, +ark_mpu_configure(struct ark_mpu_t *mpu, iova_addr_t ring, uint32_t ring_size, int is_tx) { ark_mpu_reset(mpu); diff --git a/drivers/net/ark/ark_mpu.h b/drivers/net/ark/ark_mpu.h index a0171dbd6..a42e242b7 100644 --- a/drivers/net/ark/ark_mpu.h +++ b/drivers/net/ark/ark_mpu.h @@ -75,7 +75,7 @@ struct ark_mpu_hw_t { #define ARK_MPU_CFG 0x040 struct ark_mpu_cfg_t { - phys_addr_t ring_base; /* phys_addr_t is a uint64_t */ + iova_addr_t ring_base; /* iova_addr_t is a uint64_t */ uint32_t ring_size; uint32_t ring_mask; uint32_t min_host_move; @@ -137,7 +137,7 @@ int ark_mpu_verify(struct ark_mpu_t *mpu, uint32_t obj_size); void ark_mpu_stop(struct ark_mpu_t *mpu); void ark_mpu_start(struct ark_mpu_t *mpu); int ark_mpu_reset(struct ark_mpu_t *mpu); -int ark_mpu_configure(struct ark_mpu_t *mpu, phys_addr_t ring, +int ark_mpu_configure(struct ark_mpu_t *mpu, iova_addr_t ring, uint32_t ring_size, int is_tx); void ark_mpu_dump(struct ark_mpu_t *mpu, const char *msg, uint16_t idx); diff --git a/drivers/net/ark/ark_udm.c b/drivers/net/ark/ark_udm.c index 1ba7d26d4..1c04d92d9 100644 --- a/drivers/net/ark/ark_udm.c +++ b/drivers/net/ark/ark_udm.c @@ -122,7 +122,7 @@ ark_udm_configure(struct ark_udm_t *udm, } void -ark_udm_write_addr(struct ark_udm_t *udm, phys_addr_t addr) +ark_udm_write_addr(struct ark_udm_t *udm, iova_addr_t addr) { udm->rt_cfg.hw_prod_addr = addr; } diff --git a/drivers/net/ark/ark_udm.h b/drivers/net/ark/ark_udm.h index 29bf1e8f7..1be45e2d9 100644 --- a/drivers/net/ark/ark_udm.h +++ b/drivers/net/ark/ark_udm.h @@ -137,7 +137,7 @@ struct ark_udm_tlp_ps_t { #define ARK_UDM_RT_CFG 0x00e0 struct ark_udm_rt_cfg_t { - phys_addr_t hw_prod_addr; + iova_addr_t hw_prod_addr; uint32_t write_interval; /* 4ns cycles */ volatile uint32_t prod_idx; /* RO */ }; @@ -171,7 +171,7 @@ void ark_udm_configure(struct ark_udm_t *udm, uint32_t headroom, uint32_t dataroom, uint32_t write_interval_ns); -void ark_udm_write_addr(struct ark_udm_t *udm, phys_addr_t addr); +void ark_udm_write_addr(struct ark_udm_t *udm, iova_addr_t addr); void ark_udm_stats_reset(struct ark_udm_t *udm); void ark_udm_dump_stats(struct ark_udm_t *udm, const char *msg); void ark_udm_dump_queue_stats(struct ark_udm_t *udm, const char *msg, diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c index c746a0e2c..76f5acae4 100644 --- a/drivers/net/avp/avp_ethdev.c +++ b/drivers/net/avp/avp_ethdev.c @@ -387,7 +387,7 @@ avp_dev_translate_buffer(struct avp_dev *avp, void *host_mbuf_address) /* translate from host physical address to guest virtual address */ static void * avp_dev_translate_address(struct rte_eth_dev *eth_dev, - phys_addr_t host_phys_addr) + iova_addr_t host_phys_addr) { struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); struct rte_mem_resource *resource; diff --git a/drivers/net/avp/rte_avp_common.h b/drivers/net/avp/rte_avp_common.h index 488d72168..791d2f1b6 100644 --- a/drivers/net/avp/rte_avp_common.h +++ b/drivers/net/avp/rte_avp_common.h @@ -243,7 +243,7 @@ struct rte_avp_desc { */ struct rte_avp_memmap { void *addr; - phys_addr_t phys_addr; + iova_addr_t phys_addr; uint64_t length; }; @@ -345,7 +345,7 @@ RTE_AVP_MAKE_VERSION(RTE_AVP_RELEASE_VERSION_1, \ */ struct rte_avp_mempool_info { void *addr; - phys_addr_t phys_addr; + iova_addr_t phys_addr; uint64_t length; }; @@ -359,10 +359,10 @@ struct rte_avp_device_info { char ifname[RTE_AVP_NAMESIZE]; /**< Network device name for AVP */ - phys_addr_t tx_phys; - phys_addr_t rx_phys; - phys_addr_t alloc_phys; - phys_addr_t free_phys; + iova_addr_t tx_phys; + iova_addr_t rx_phys; + iova_addr_t alloc_phys; + iova_addr_t free_phys; uint32_t features; /**< Supported feature bitmap */ uint8_t min_rx_queues; /**< Minimum supported receive/free queues */ @@ -379,14 +379,14 @@ struct rte_avp_device_info { uint32_t free_size; /**< Size of each free queue */ /* Used by Ethtool */ - phys_addr_t req_phys; - phys_addr_t resp_phys; - phys_addr_t sync_phys; + iova_addr_t req_phys; + iova_addr_t resp_phys; + iova_addr_t sync_phys; void *sync_va; /* mbuf mempool (used when a single memory area is supported) */ void *mbuf_va; - phys_addr_t mbuf_phys; + iova_addr_t mbuf_phys; /* mbuf mempools */ struct rte_avp_mempool_info pool[RTE_AVP_MAX_MEMPOOLS]; diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index 06733d153..70ccbf642 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -419,7 +419,7 @@ void bnx2x_read_dmae(struct bnx2x_softc *sc, uint32_t src_addr, uint32_t len32) } void -bnx2x_write_dmae(struct bnx2x_softc *sc, phys_addr_t dma_addr, uint32_t dst_addr, +bnx2x_write_dmae(struct bnx2x_softc *sc, iova_addr_t dma_addr, uint32_t dst_addr, uint32_t len32) { struct dmae_command dmae; @@ -447,7 +447,7 @@ bnx2x_write_dmae(struct bnx2x_softc *sc, phys_addr_t dma_addr, uint32_t dst_addr } static void -bnx2x_write_dmae_phys_len(struct bnx2x_softc *sc, phys_addr_t phys_addr, +bnx2x_write_dmae_phys_len(struct bnx2x_softc *sc, iova_addr_t phys_addr, uint32_t addr, uint32_t len) { uint32_t dmae_wr_max = DMAE_LEN32_WR_MAX(sc); @@ -823,14 +823,14 @@ bnx2x_fw_command(struct bnx2x_softc *sc, uint32_t command, uint32_t param) static void __storm_memset_dma_mapping(struct bnx2x_softc *sc, uint32_t addr, - phys_addr_t mapping) + iova_addr_t mapping) { REG_WR(sc, addr, U64_LO(mapping)); REG_WR(sc, (addr + 4), U64_HI(mapping)); } static void -storm_memset_spq_addr(struct bnx2x_softc *sc, phys_addr_t mapping, +storm_memset_spq_addr(struct bnx2x_softc *sc, iova_addr_t mapping, uint16_t abs_fid) { uint32_t addr = (XSEM_REG_FAST_MEMORY + @@ -1498,7 +1498,7 @@ bnx2x_set_q_rx_mode(struct bnx2x_softc *sc, uint8_t cl_id, ramrod_param.rdata = BNX2X_SP(sc, rx_mode_rdata); ramrod_param.rdata_mapping = - (phys_addr_t)BNX2X_SP_MAPPING(sc, rx_mode_rdata), + (iova_addr_t)BNX2X_SP_MAPPING(sc, rx_mode_rdata), bnx2x_set_bit(ECORE_FILTER_RX_MODE_PENDING, &sc->sp_state); ramrod_param.ramrod_flags = ramrod_flags; @@ -4599,9 +4599,9 @@ static void bnx2x_init_func_obj(struct bnx2x_softc *sc) ecore_init_func_obj(sc, &sc->func_obj, BNX2X_SP(sc, func_rdata), - (phys_addr_t)BNX2X_SP_MAPPING(sc, func_rdata), + (iova_addr_t)BNX2X_SP_MAPPING(sc, func_rdata), BNX2X_SP(sc, func_afex_rdata), - (phys_addr_t)BNX2X_SP_MAPPING(sc, func_afex_rdata), + (iova_addr_t)BNX2X_SP_MAPPING(sc, func_afex_rdata), &bnx2x_func_sp_drv); } @@ -4772,7 +4772,7 @@ static void bnx2x_map_sb_state_machines(struct hc_index_data *index_data) } static void -bnx2x_init_sb(struct bnx2x_softc *sc, phys_addr_t busaddr, int vfid, +bnx2x_init_sb(struct bnx2x_softc *sc, iova_addr_t busaddr, int vfid, uint8_t vf_valid, int fw_sb_id, int igu_sb_id) { struct hc_status_block_data_e2 sb_data_e2; @@ -4918,7 +4918,7 @@ static void bnx2x_init_eth_fp(struct bnx2x_softc *sc, int idx) sc->max_cos, SC_FUNC(sc), BNX2X_SP(sc, q_rdata), - (phys_addr_t)BNX2X_SP_MAPPING(sc, q_rdata), + (iova_addr_t)BNX2X_SP_MAPPING(sc, q_rdata), q_type); /* configure classification DBs */ @@ -4928,7 +4928,7 @@ static void bnx2x_init_eth_fp(struct bnx2x_softc *sc, int idx) idx, SC_FUNC(sc), BNX2X_SP(sc, mac_rdata), - (phys_addr_t)BNX2X_SP_MAPPING(sc, mac_rdata), + (iova_addr_t)BNX2X_SP_MAPPING(sc, mac_rdata), ECORE_FILTER_MAC_PENDING, &sc->sp_state, ECORE_OBJ_TYPE_RX_TX, &sc->macs_pool); } @@ -5028,7 +5028,7 @@ static void bnx2x_init_tx_rings(struct bnx2x_softc *sc) static void bnx2x_init_def_sb(struct bnx2x_softc *sc) { struct host_sp_status_block *def_sb = sc->def_sb; - phys_addr_t mapping = sc->def_sb_dma.paddr; + iova_addr_t mapping = sc->def_sb_dma.paddr; int igu_sp_sb_index; int igu_seg_id; int port = SC_PORT(sc); @@ -5700,7 +5700,7 @@ static void bnx2x_init_objs(struct bnx2x_softc *sc) SC_FUNC(sc), SC_FUNC(sc), BNX2X_SP(sc, mcast_rdata), - (phys_addr_t)BNX2X_SP_MAPPING(sc, mcast_rdata), + (iova_addr_t)BNX2X_SP_MAPPING(sc, mcast_rdata), ECORE_FILTER_MCAST_PENDING, &sc->sp_state, o_type); @@ -5724,7 +5724,7 @@ static void bnx2x_init_objs(struct bnx2x_softc *sc) SC_FUNC(sc), SC_FUNC(sc), BNX2X_SP(sc, rss_rdata), - (phys_addr_t)BNX2X_SP_MAPPING(sc, rss_rdata), + (iova_addr_t)BNX2X_SP_MAPPING(sc, rss_rdata), ECORE_FILTER_RSS_CONF_PENDING, &sc->sp_state, ECORE_OBJ_TYPE_RX); } @@ -6445,9 +6445,9 @@ bnx2x_pf_rx_q_prep(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp, pause->pri_map = 1; /* rxq setup */ - rxq_init->dscr_map = (phys_addr_t)rxq->rx_ring_phys_addr; - rxq_init->rcq_map = (phys_addr_t)rxq->cq_ring_phys_addr; - rxq_init->rcq_np_map = (phys_addr_t)(rxq->cq_ring_phys_addr + + rxq_init->dscr_map = (iova_addr_t)rxq->rx_ring_phys_addr; + rxq_init->rcq_map = (iova_addr_t)rxq->cq_ring_phys_addr; + rxq_init->rcq_np_map = (iova_addr_t)(rxq->cq_ring_phys_addr + BNX2X_PAGE_SIZE); /* @@ -6486,7 +6486,7 @@ bnx2x_pf_tx_q_prep(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp, PMD_TX_LOG(ERR, "ERROR: TX queue is NULL"); return; } - txq_init->dscr_map = (phys_addr_t)txq->tx_ring_phys_addr; + txq_init->dscr_map = (iova_addr_t)txq->tx_ring_phys_addr; txq_init->sb_cq_index = HC_INDEX_ETH_FIRST_TX_CQ_CONS + cos; txq_init->traffic_type = LLFC_TRAFFIC_TYPE_NW; txq_init->fw_sb_id = fp->fw_sb_id; @@ -11059,7 +11059,7 @@ static int bnx2x_init_hw_func(struct bnx2x_softc *sc) for (i = 0; i < L2_ILT_LINES(sc); i++) { ilt->lines[cdu_ilt_start + i].page = sc->context[i].vcxt; ilt->lines[cdu_ilt_start + i].page_mapping = - (phys_addr_t)sc->context[i].vcxt_dma.paddr; + (iova_addr_t)sc->context[i].vcxt_dma.paddr; ilt->lines[cdu_ilt_start + i].size = sc->context[i].size; } ecore_ilt_init_op(sc, INITOP_SET); @@ -11357,7 +11357,7 @@ static void bnx2x_reset_port(struct bnx2x_softc *sc) } } -static void bnx2x_ilt_wr(struct bnx2x_softc *sc, uint32_t index, phys_addr_t addr) +static void bnx2x_ilt_wr(struct bnx2x_softc *sc, uint32_t index, iova_addr_t addr) { int reg; uint32_t wb_write[2]; @@ -11587,7 +11587,7 @@ static int ecore_gunzip(struct bnx2x_softc *sc, const uint8_t * zbuf, int len) } static void -ecore_write_dmae_phys_len(struct bnx2x_softc *sc, phys_addr_t phys_addr, +ecore_write_dmae_phys_len(struct bnx2x_softc *sc, iova_addr_t phys_addr, uint32_t addr, uint32_t len) { bnx2x_write_dmae_phys_len(sc, phys_addr, addr, len); diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h index 91c5aec21..b81327a66 100644 --- a/drivers/net/bnx2x/bnx2x.h +++ b/drivers/net/bnx2x/bnx2x.h @@ -317,7 +317,7 @@ struct bnx2x_bar { /* Used to manage DMA allocations. */ struct bnx2x_dma { struct bnx2x_softc *sc; - phys_addr_t paddr; + iova_addr_t paddr; void *vaddr; int nseg; char msg[RTE_MEMZONE_NAMESIZE - 6]; @@ -370,10 +370,10 @@ struct bnx2x_fastpath { struct bnx2x_dma sb_dma; union bnx2x_host_hc_status_block status_block; - phys_addr_t tx_desc_mapping; + iova_addr_t tx_desc_mapping; - phys_addr_t rx_desc_mapping; - phys_addr_t rx_comp_mapping; + iova_addr_t rx_desc_mapping; + iova_addr_t rx_comp_mapping; uint16_t *sb_index_values; uint16_t *sb_running_index; @@ -468,7 +468,7 @@ union cdu_context { struct hw_context { struct bnx2x_dma vcxt_dma; union cdu_context *vcxt; - //phys_addr_t cxt_mapping; + //iova_addr_t cxt_mapping; size_t size; }; @@ -1242,7 +1242,7 @@ struct bnx2x_softc { uint32_t gz_outlen; #define GUNZIP_BUF(sc) (sc->gz_buf) #define GUNZIP_OUTLEN(sc) (sc->gz_outlen) -#define GUNZIP_PHYS(sc) (phys_addr_t)(sc->gz_buf_dma.paddr) +#define GUNZIP_PHYS(sc) (iova_addr_t)(sc->gz_buf_dma.paddr) #define FW_BUF_SIZE 0x40000 struct raw_op *init_ops; @@ -1310,14 +1310,14 @@ struct bnx2x_softc { */ int fw_stats_req_size; struct bnx2x_fw_stats_req *fw_stats_req; - phys_addr_t fw_stats_req_mapping; + iova_addr_t fw_stats_req_mapping; /* * FW statistics data shortcut (points at the beginning of fw_stats * buffer + fw_stats_req_size). */ int fw_stats_data_size; struct bnx2x_fw_stats_data *fw_stats_data; - phys_addr_t fw_stats_data_mapping; + iova_addr_t fw_stats_data_mapping; /* tracking a pending STAT_QUERY ramrod */ uint16_t stats_pending; @@ -1402,8 +1402,8 @@ union bnx2x_stats_show_data { #define FUNC_FLG_LEADING 0x0020 /* PF only */ struct bnx2x_func_init_params { - phys_addr_t fw_stat_map; /* (dma) valid if FUNC_FLG_STATS */ - phys_addr_t spq_map; /* (dma) valid if FUNC_FLG_SPQ */ + iova_addr_t fw_stat_map; /* (dma) valid if FUNC_FLG_STATS */ + iova_addr_t spq_map; /* (dma) valid if FUNC_FLG_SPQ */ uint16_t func_flgs; uint16_t func_id; /* abs function id */ uint16_t pf_id; @@ -1748,7 +1748,7 @@ uint32_t bnx2x_dmae_opcode(struct bnx2x_softc *sc, uint8_t src_type, uint8_t comp_type); void bnx2x_post_dmae(struct bnx2x_softc *sc, struct dmae_command *dmae, int idx); void bnx2x_read_dmae(struct bnx2x_softc *sc, uint32_t src_addr, uint32_t len32); -void bnx2x_write_dmae(struct bnx2x_softc *sc, phys_addr_t dma_addr, +void bnx2x_write_dmae(struct bnx2x_softc *sc, iova_addr_t dma_addr, uint32_t dst_addr, uint32_t len32); void bnx2x_set_ctx_validation(struct bnx2x_softc *sc, struct eth_context *cxt, uint32_t cid); diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c index 5dd4aee7f..7336124fc 100644 --- a/drivers/net/bnx2x/bnx2x_rxtx.c +++ b/drivers/net/bnx2x/bnx2x_rxtx.c @@ -71,8 +71,8 @@ bnx2x_dev_rx_queue_setup(struct rte_eth_dev *dev, struct bnx2x_softc *sc = dev->data->dev_private; struct bnx2x_fastpath *fp = &sc->fp[queue_idx]; struct eth_rx_cqe_next_page *nextpg; - phys_addr_t *rx_bd; - phys_addr_t busaddr; + iova_addr_t *rx_bd; + iova_addr_t busaddr; /* First allocate the rx queue data structure */ rxq = rte_zmalloc_socket("ethdev RX queue", sizeof(struct bnx2x_rx_queue), diff --git a/drivers/net/bnx2x/bnx2x_stats.c b/drivers/net/bnx2x/bnx2x_stats.c index 6223cfef1..03625810e 100644 --- a/drivers/net/bnx2x/bnx2x_stats.c +++ b/drivers/net/bnx2x/bnx2x_stats.c @@ -1338,7 +1338,7 @@ bnx2x_prep_fw_stats_req(struct bnx2x_softc *sc) int i; int first_queue_query_index; struct stats_query_header *stats_hdr = &sc->fw_stats_req->hdr; - phys_addr_t cur_data_offset; + iova_addr_t cur_data_offset; struct stats_query_entry *cur_query_entry; stats_hdr->cmd_num = sc->fw_stats_num; diff --git a/drivers/net/bnx2x/bnx2x_vfpf.c b/drivers/net/bnx2x/bnx2x_vfpf.c index 0ca0df876..855dafaa6 100644 --- a/drivers/net/bnx2x/bnx2x_vfpf.c +++ b/drivers/net/bnx2x/bnx2x_vfpf.c @@ -113,7 +113,7 @@ bnx2x_vf_finalize(struct bnx2x_softc *sc, #define BNX2X_VF_CHANNEL_TRIES 100 static int -bnx2x_do_req4pf(struct bnx2x_softc *sc, phys_addr_t phys_addr) +bnx2x_do_req4pf(struct bnx2x_softc *sc, iova_addr_t phys_addr) { uint8_t *status = &sc->vf2pf_mbox->resp.common_reply.status; uint8_t i; diff --git a/drivers/net/bnx2x/ecore_sp.h b/drivers/net/bnx2x/ecore_sp.h index e7ec96e94..cd7c5e41e 100644 --- a/drivers/net/bnx2x/ecore_sp.h +++ b/drivers/net/bnx2x/ecore_sp.h @@ -36,7 +36,7 @@ #include "ecore_reg.h" struct bnx2x_softc; -typedef phys_addr_t ecore_dma_addr_t; /* expected to be 64 bit wide */ +typedef iova_addr_t ecore_dma_addr_t; /* expected to be 64 bit wide */ typedef volatile int ecore_atomic_t; diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index 405d94deb..0c42d99ed 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -132,7 +132,7 @@ struct bnxt_pf_info { uint16_t max_vfs; uint32_t func_cfg_flags; void *vf_req_buf; - phys_addr_t vf_req_buf_dma_addr; + iova_addr_t vf_req_buf_dma_addr; uint32_t vf_req_fwd[8]; uint16_t total_vnics; struct bnxt_child_vf_info *vf_info; @@ -194,14 +194,14 @@ struct bnxt { struct bnxt_rx_queue **rx_queues; const void *rx_mem_zone; struct rx_port_stats *hw_rx_port_stats; - phys_addr_t hw_rx_port_stats_map; + iova_addr_t hw_rx_port_stats_map; unsigned int tx_nr_rings; unsigned int tx_cp_nr_rings; struct bnxt_tx_queue **tx_queues; const void *tx_mem_zone; struct tx_port_stats *hw_tx_port_stats; - phys_addr_t hw_tx_port_stats_map; + iova_addr_t hw_tx_port_stats_map; /* Default completion ring */ struct bnxt_cp_ring_info *def_cp_ring; @@ -227,9 +227,9 @@ struct bnxt { uint16_t hwrm_cmd_seq; void *hwrm_cmd_resp_addr; - phys_addr_t hwrm_cmd_resp_dma_addr; + iova_addr_t hwrm_cmd_resp_dma_addr; void *hwrm_short_cmd_req_addr; - phys_addr_t hwrm_short_cmd_req_dma_addr; + iova_addr_t hwrm_short_cmd_req_dma_addr; rte_spinlock_t hwrm_lock; uint16_t max_req_len; uint16_t max_resp_len; diff --git a/drivers/net/bnxt/bnxt_cpr.h b/drivers/net/bnxt/bnxt_cpr.h index a6e87858a..1f95c85f2 100644 --- a/drivers/net/bnxt/bnxt_cpr.h +++ b/drivers/net/bnxt/bnxt_cpr.h @@ -82,10 +82,10 @@ struct bnxt_cp_ring_info { struct cmpl_base *cp_desc_ring; - phys_addr_t cp_desc_mapping; + iova_addr_t cp_desc_mapping; struct ctx_hw_stats *hw_stats; - phys_addr_t hw_stats_map; + iova_addr_t hw_stats_map; uint32_t hw_stats_ctx_id; struct bnxt_ring *cp_ring_struct; diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index c9d11228b..cb2ce334b 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1628,7 +1628,7 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev) const struct rte_memzone *mz = NULL; static int version_printed; uint32_t total_alloc_len; - phys_addr_t mz_phys_addr; + iova_addr_t mz_phys_addr; struct bnxt *bp; int rc; diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c index 9d0ae277e..8e83e4704 100644 --- a/drivers/net/bnxt/bnxt_ring.c +++ b/drivers/net/bnxt/bnxt_ring.c @@ -98,7 +98,7 @@ int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx, struct rte_pci_device *pdev = bp->pdev; const struct rte_memzone *mz = NULL; char mz_name[RTE_MEMZONE_NAMESIZE]; - phys_addr_t mz_phys_addr; + iova_addr_t mz_phys_addr; int sz; int stats_len = (tx_ring_info || rx_ring_info) ? diff --git a/drivers/net/bnxt/bnxt_ring.h b/drivers/net/bnxt/bnxt_ring.h index 6d1eb5888..09042cb80 100644 --- a/drivers/net/bnxt/bnxt_ring.h +++ b/drivers/net/bnxt/bnxt_ring.h @@ -70,7 +70,7 @@ struct bnxt_ring { void *bd; - phys_addr_t bd_dma; + iova_addr_t bd_dma; uint32_t ring_size; uint32_t ring_mask; diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h index f8d6dc80a..7f97e7af7 100644 --- a/drivers/net/bnxt/bnxt_rxr.h +++ b/drivers/net/bnxt/bnxt_rxr.h @@ -85,8 +85,8 @@ struct bnxt_rx_ring_info { struct bnxt_sw_rx_bd *rx_buf_ring; /* sw ring */ struct bnxt_sw_rx_bd *ag_buf_ring; /* sw ring */ - phys_addr_t rx_desc_mapping; - phys_addr_t ag_desc_mapping; + iova_addr_t rx_desc_mapping; + iova_addr_t ag_desc_mapping; struct bnxt_ring *rx_ring_struct; struct bnxt_ring *ag_ring_struct; diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h index 5b0971141..8d23b3386 100644 --- a/drivers/net/bnxt/bnxt_txr.h +++ b/drivers/net/bnxt/bnxt_txr.h @@ -49,7 +49,7 @@ struct bnxt_tx_ring_info { struct tx_bd_long *tx_desc_ring; struct bnxt_sw_tx_bd *tx_buf_ring; - phys_addr_t tx_desc_mapping; + iova_addr_t tx_desc_mapping; #define BNXT_DEV_STATE_CLOSING 0x1 uint32_t dev_state; diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c index db9fb0796..90809f0f5 100644 --- a/drivers/net/bnxt/bnxt_vnic.c +++ b/drivers/net/bnxt/bnxt_vnic.c @@ -174,7 +174,7 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp) BNXT_MAX_MC_ADDRS * ETHER_ADDR_LEN); uint16_t max_vnics; int i; - phys_addr_t mz_phys_addr; + iova_addr_t mz_phys_addr; max_vnics = bp->max_vnics; snprintf(mz_name, RTE_MEMZONE_NAMESIZE, diff --git a/drivers/net/bnxt/bnxt_vnic.h b/drivers/net/bnxt/bnxt_vnic.h index 993f22127..9d3dccea0 100644 --- a/drivers/net/bnxt/bnxt_vnic.h +++ b/drivers/net/bnxt/bnxt_vnic.h @@ -53,11 +53,11 @@ struct bnxt_vnic_info { uint16_t dflt_ring_grp; uint16_t mru; uint16_t hash_type; - phys_addr_t rss_table_dma_addr; + iova_addr_t rss_table_dma_addr; uint16_t *rss_table; - phys_addr_t rss_hash_key_dma_addr; + iova_addr_t rss_hash_key_dma_addr; void *rss_hash_key; - phys_addr_t mc_list_dma_addr; + iova_addr_t mc_list_dma_addr; char *mc_list; uint32_t mc_addr_cnt; #define BNXT_MAX_MC_ADDRS 16 diff --git a/drivers/net/liquidio/lio_rxtx.c b/drivers/net/liquidio/lio_rxtx.c index 2bbb893c2..5156ac08d 100644 --- a/drivers/net/liquidio/lio_rxtx.c +++ b/drivers/net/liquidio/lio_rxtx.c @@ -1744,7 +1744,7 @@ lio_dev_xmit_pkts(void *tx_queue, struct rte_mbuf **pkts, uint16_t nb_pkts) } else { struct lio_buf_free_info *finfo; struct lio_gather *g; - phys_addr_t phyaddr; + iova_addr_t phyaddr; int i, frags; finfo = (struct lio_buf_free_info *)rte_malloc(NULL, diff --git a/drivers/net/liquidio/lio_rxtx.h b/drivers/net/liquidio/lio_rxtx.h index 85685dc7d..b0977f17b 100644 --- a/drivers/net/liquidio/lio_rxtx.h +++ b/drivers/net/liquidio/lio_rxtx.h @@ -686,7 +686,7 @@ lio_swap_8B_data(uint64_t *data, uint32_t blocks) static inline uint64_t lio_map_ring(void *buf) { - phys_addr_t dma_addr; + iova_addr_t dma_addr; dma_addr = rte_mbuf_data_dma_addr_default(((struct rte_mbuf *)buf)); @@ -696,7 +696,7 @@ lio_map_ring(void *buf) static inline uint64_t lio_map_ring_info(struct lio_droq *droq, uint32_t i) { - phys_addr_t dma_addr; + iova_addr_t dma_addr; dma_addr = droq->info_list_dma + (i * LIO_DROQ_INFO_SIZE); diff --git a/drivers/net/qede/base/bcm_osal.h b/drivers/net/qede/base/bcm_osal.h index 3acf8f7c4..b45cec282 100644 --- a/drivers/net/qede/base/bcm_osal.h +++ b/drivers/net/qede/base/bcm_osal.h @@ -60,7 +60,7 @@ typedef u32 OSAL_BE32; #define osal_uintptr_t uintptr_t -typedef phys_addr_t dma_addr_t; +typedef iova_addr_t dma_addr_t; typedef rte_spinlock_t osal_spinlock_t; diff --git a/drivers/net/sfc/efsys.h b/drivers/net/sfc/efsys.h index 0405d02bb..5a6625008 100644 --- a/drivers/net/sfc/efsys.h +++ b/drivers/net/sfc/efsys.h @@ -253,7 +253,7 @@ typedef struct __efsys_identifier_s efsys_identifier_t; /* DMA */ -typedef phys_addr_t efsys_dma_addr_t; +typedef iova_addr_t efsys_dma_addr_t; typedef struct efsys_mem_s { const struct rte_memzone *esm_mz; diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c index 60812cbe0..007af1f35 100644 --- a/drivers/net/sfc/sfc_ef10_rx.c +++ b/drivers/net/sfc/sfc_ef10_rx.c @@ -177,7 +177,7 @@ sfc_ef10_rx_qrefill(struct sfc_ef10_rxq *rxq) ++i, ++id) { struct rte_mbuf *m = objs[i]; struct sfc_ef10_rx_sw_desc *rxd; - phys_addr_t phys_addr; + iova_addr_t phys_addr; SFC_ASSERT((id & ~ptr_mask) == 0); rxd = &rxq->sw_ring[id]; diff --git a/drivers/net/sfc/sfc_ef10_tx.c b/drivers/net/sfc/sfc_ef10_tx.c index da2b5edbc..0e26a1d7f 100644 --- a/drivers/net/sfc/sfc_ef10_tx.c +++ b/drivers/net/sfc/sfc_ef10_tx.c @@ -177,7 +177,7 @@ sfc_ef10_tx_reap(struct sfc_ef10_txq *txq) } static void -sfc_ef10_tx_qdesc_dma_create(phys_addr_t addr, uint16_t size, bool eop, +sfc_ef10_tx_qdesc_dma_create(iova_addr_t addr, uint16_t size, bool eop, efx_qword_t *edp) { EFX_POPULATE_QWORD_4(*edp, @@ -323,7 +323,7 @@ sfc_ef10_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) pkt_len = m_seg->pkt_len; do { - phys_addr_t seg_addr = rte_mbuf_data_dma_addr(m_seg); + iova_addr_t seg_addr = rte_mbuf_data_dma_addr(m_seg); unsigned int seg_len = rte_pktmbuf_data_len(m_seg); SFC_ASSERT(seg_len <= SFC_EF10_TX_DMA_DESC_LEN_MAX); diff --git a/drivers/net/thunderx/base/nicvf_hw.c b/drivers/net/thunderx/base/nicvf_hw.c index 2634285eb..dc0af1ca0 100644 --- a/drivers/net/thunderx/base/nicvf_hw.c +++ b/drivers/net/thunderx/base/nicvf_hw.c @@ -509,7 +509,7 @@ nicvf_qset_rbdr_precharge(void *dev, struct nicvf *nic, struct rbdr_entry_t *desc, *desc0; struct nicvf_rbdr *rbdr = nic->rbdr; uint32_t count; - nicvf_phys_addr_t phy; + nicvf_iova_addr_t phy; assert(rbdr != NULL); desc = rbdr->desc; diff --git a/drivers/net/thunderx/base/nicvf_hw.h b/drivers/net/thunderx/base/nicvf_hw.h index b7d0a3dc5..698aa4878 100644 --- a/drivers/net/thunderx/base/nicvf_hw.h +++ b/drivers/net/thunderx/base/nicvf_hw.h @@ -88,7 +88,7 @@ enum nicvf_err_e { NICVF_ERR_RSS_GET_SZ, /* -8171 */ }; -typedef nicvf_phys_addr_t (*rbdr_pool_get_handler)(void *dev, void *opaque); +typedef nicvf_iova_addr_t (*rbdr_pool_get_handler)(void *dev, void *opaque); struct nicvf_hw_rx_qstats { uint64_t q_rx_bytes; diff --git a/drivers/net/thunderx/base/nicvf_hw_defs.h b/drivers/net/thunderx/base/nicvf_hw_defs.h index 0fe673e6d..e7e092b61 100644 --- a/drivers/net/thunderx/base/nicvf_hw_defs.h +++ b/drivers/net/thunderx/base/nicvf_hw_defs.h @@ -213,7 +213,7 @@ #define NICVF_STATIC_ASSERT(s) _Static_assert(s, #s) #define assert_primary(nic) assert((nic)->sqs_mode == 0) -typedef uint64_t nicvf_phys_addr_t; +typedef uint64_t nicvf_iova_addr_t; /* vNIC HW Enumerations */ @@ -840,7 +840,7 @@ struct rbdr_entry_t { uint64_t buf_addr:42; uint64_t cache_align:7; }; - nicvf_phys_addr_t full_addr; + nicvf_iova_addr_t full_addr; }; #else union { @@ -849,7 +849,7 @@ struct rbdr_entry_t { uint64_t buf_addr:42; uint64_t rsvd0:15; }; - nicvf_phys_addr_t full_addr; + nicvf_iova_addr_t full_addr; }; #endif }; diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index edc17f1d4..11259808a 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -677,7 +677,7 @@ nicvf_qset_rbdr_alloc(struct rte_eth_dev *dev, struct nicvf *nic, static void nicvf_rbdr_release_mbuf(struct rte_eth_dev *dev, struct nicvf *nic, - nicvf_phys_addr_t phy) + nicvf_iova_addr_t phy) { uint16_t qidx; void *obj; @@ -1419,7 +1419,7 @@ nicvf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) }; } -static nicvf_phys_addr_t +static nicvf_iova_addr_t rbdr_rte_mempool_get(void *dev, void *opaque) { uint16_t qidx; diff --git a/drivers/net/thunderx/nicvf_ethdev.h b/drivers/net/thunderx/nicvf_ethdev.h index 3734430f5..6909082f5 100644 --- a/drivers/net/thunderx/nicvf_ethdev.h +++ b/drivers/net/thunderx/nicvf_ethdev.h @@ -104,7 +104,7 @@ nicvf_netdev_qidx(struct nicvf *nic, uint8_t local_qidx) * P = V - offset */ static inline uintptr_t -nicvf_mbuff_phy2virt(phys_addr_t phy, uint64_t mbuf_phys_off) +nicvf_mbuff_phy2virt(iova_addr_t phy, uint64_t mbuf_phys_off) { return (uintptr_t)(phy + mbuf_phys_off); } @@ -112,7 +112,7 @@ nicvf_mbuff_phy2virt(phys_addr_t phy, uint64_t mbuf_phys_off) static inline uintptr_t nicvf_mbuff_virt2phy(uintptr_t virt, uint64_t mbuf_phys_off) { - return (phys_addr_t)(virt - mbuf_phys_off); + return (iova_addr_t)(virt - mbuf_phys_off); } static inline void diff --git a/drivers/net/thunderx/nicvf_struct.h b/drivers/net/thunderx/nicvf_struct.h index 4ee6c3bb0..edd2587d9 100644 --- a/drivers/net/thunderx/nicvf_struct.h +++ b/drivers/net/thunderx/nicvf_struct.h @@ -46,7 +46,7 @@ struct nicvf_rbdr { uintptr_t rbdr_status; uintptr_t rbdr_door; struct rbdr_entry_t *desc; - nicvf_phys_addr_t phys; + nicvf_iova_addr_t phys; uint32_t buffsz; uint32_t tail; uint32_t next_tail; @@ -56,7 +56,7 @@ struct nicvf_rbdr { struct nicvf_txq { union sq_entry_t *desc; - nicvf_phys_addr_t phys; + nicvf_iova_addr_t phys; struct rte_mbuf **txbuffs; uintptr_t sq_head; uintptr_t sq_door; @@ -87,7 +87,7 @@ struct nicvf_rxq { uintptr_t cq_status; uintptr_t cq_door; union mbuf_initializer mbuf_initializer; - nicvf_phys_addr_t phys; + nicvf_iova_addr_t phys; union cq_entry_t *desc; struct nicvf_rbdr *shared_rbdr; struct nicvf *nic; diff --git a/drivers/net/virtio/virtio_rxtx.h b/drivers/net/virtio/virtio_rxtx.h index 28f82d6a8..b072a8c39 100644 --- a/drivers/net/virtio/virtio_rxtx.h +++ b/drivers/net/virtio/virtio_rxtx.h @@ -66,7 +66,7 @@ struct virtnet_tx { struct virtqueue *vq; /**< memzone to populate hdr. */ const struct rte_memzone *virtio_net_hdr_mz; - phys_addr_t virtio_net_hdr_mem; /**< hdr for each xmit packet */ + iova_addr_t virtio_net_hdr_mem; /**< hdr for each xmit packet */ uint16_t queue_id; /**< DPDK queue index. */ uint8_t port_id; /**< Device port identifier. */ @@ -81,7 +81,7 @@ struct virtnet_ctl { struct virtqueue *vq; /**< memzone to populate hdr. */ const struct rte_memzone *virtio_net_hdr_mz; - phys_addr_t virtio_net_hdr_mem; /**< hdr for each xmit packet */ + iova_addr_t virtio_net_hdr_mem; /**< hdr for each xmit packet */ uint8_t port_id; /**< Device port identifier. */ const struct rte_memzone *mz; /**< mem zone to populate RX ring. */ }; diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h index 2e1208615..cb1b2a6e9 100644 --- a/drivers/net/virtio/virtqueue.h +++ b/drivers/net/virtio/virtqueue.h @@ -204,7 +204,7 @@ struct virtqueue { struct virtnet_ctl cq; }; - phys_addr_t vq_ring_mem; /**< physical address of vring, + iova_addr_t vq_ring_mem; /**< physical address of vring, * or virtual address for virtio_user. */ /** diff --git a/drivers/net/xenvirt/rte_eth_xenvirt.c b/drivers/net/xenvirt/rte_eth_xenvirt.c index e404b7755..8818e39ef 100644 --- a/drivers/net/xenvirt/rte_eth_xenvirt.c +++ b/drivers/net/xenvirt/rte_eth_xenvirt.c @@ -378,7 +378,7 @@ gntalloc_vring_create(int queue_type, uint32_t size, int vtidx) int pg_size; uint32_t pg_num; uint32_t *gref_arr = NULL; - phys_addr_t *pa_arr = NULL; + iova_addr_t *pa_arr = NULL; uint64_t start_index; int rv; diff --git a/drivers/net/xenvirt/rte_mempool_gntalloc.c b/drivers/net/xenvirt/rte_mempool_gntalloc.c index 73e82f808..80aebd564 100644 --- a/drivers/net/xenvirt/rte_mempool_gntalloc.c +++ b/drivers/net/xenvirt/rte_mempool_gntalloc.c @@ -49,7 +49,7 @@ struct _gntarr { uint32_t gref; - phys_addr_t pa; + iova_addr_t pa; uint64_t index; void *va; }; @@ -58,7 +58,7 @@ struct _mempool_gntalloc_info { struct rte_mempool *mp; uint32_t pg_num; uint32_t *gref_arr; - phys_addr_t *pa_arr; + iova_addr_t *pa_arr; void *va; uint32_t mempool_idx; uint64_t start_index; @@ -94,7 +94,7 @@ _create_mempool(const char *name, unsigned elt_num, unsigned elt_size, * gnt_arr: stores all meta dat */ uint32_t *gref_arr = NULL; - phys_addr_t *pa_arr = NULL; + iova_addr_t *pa_arr = NULL; struct _gntarr *gnt_arr = NULL; /* start index of the grant referances, used for dealloc*/ uint64_t start_index; diff --git a/drivers/net/xenvirt/rte_xen_lib.c b/drivers/net/xenvirt/rte_xen_lib.c index 6c9a1d49e..0e330a8e4 100644 --- a/drivers/net/xenvirt/rte_xen_lib.c +++ b/drivers/net/xenvirt/rte_xen_lib.c @@ -102,7 +102,7 @@ get_xen_virtual(size_t size, size_t page_sz) * Get the physical address for virtual memory starting at va. */ int -get_phys_map(void *va, phys_addr_t pa[], uint32_t pg_num, uint32_t pg_sz) +get_phys_map(void *va, iova_addr_t pa[], uint32_t pg_num, uint32_t pg_sz) { int32_t fd, rc = 0; uint32_t i, nb; @@ -355,7 +355,7 @@ xenstore_write(const char *key_str, const char *val_str) } int -grant_node_create(uint32_t pg_num, uint32_t *gref_arr, phys_addr_t *pa_arr, char *val_str, size_t str_size) +grant_node_create(uint32_t pg_num, uint32_t *gref_arr, iova_addr_t *pa_arr, char *val_str, size_t str_size) { uint64_t start_index; int pg_size; @@ -419,7 +419,7 @@ grant_node_create(uint32_t pg_num, uint32_t *gref_arr, phys_addr_t *pa_arr, char int -grant_gntalloc_mbuf_pool(struct rte_mempool *mpool, uint32_t pg_num, uint32_t *gref_arr, phys_addr_t *pa_arr, int mempool_idx) +grant_gntalloc_mbuf_pool(struct rte_mempool *mpool, uint32_t pg_num, uint32_t *gref_arr, iova_addr_t *pa_arr, int mempool_idx) { char key_str[PATH_MAX] = {0}; char val_str[PATH_MAX] = {0}; diff --git a/drivers/net/xenvirt/rte_xen_lib.h b/drivers/net/xenvirt/rte_xen_lib.h index d973eacbb..3b487c305 100644 --- a/drivers/net/xenvirt/rte_xen_lib.h +++ b/drivers/net/xenvirt/rte_xen_lib.h @@ -62,7 +62,7 @@ * Documentation). */ #define PAGEMAP_PFN_BITS 54 -#define PAGEMAP_PFN_MASK RTE_LEN2MASK(PAGEMAP_PFN_BITS, phys_addr_t) +#define PAGEMAP_PFN_MASK RTE_LEN2MASK(PAGEMAP_PFN_BITS, iova_addr_t) #define MAP_FLAG 0xA5 @@ -99,7 +99,7 @@ int xenstore_write(const char *key_str, const char *val_str); int -get_phys_map(void *va, phys_addr_t pa[], uint32_t pg_num, uint32_t pg_sz); +get_phys_map(void *va, iova_addr_t pa[], uint32_t pg_num, uint32_t pg_sz); void * get_xen_virtual(size_t size, size_t page_sz); @@ -108,9 +108,9 @@ int grefwatch_from_alloc(uint32_t *gref, void **pptr); -int grant_node_create(uint32_t pg_num, uint32_t *gref_arr, phys_addr_t *pa_arr, char *val_str, size_t str_size); +int grant_node_create(uint32_t pg_num, uint32_t *gref_arr, iova_addr_t *pa_arr, char *val_str, size_t str_size); int -grant_gntalloc_mbuf_pool(struct rte_mempool *mpool, uint32_t pg_num, uint32_t *gref_arr, phys_addr_t *pa_arr, int mempool_idx); +grant_gntalloc_mbuf_pool(struct rte_mempool *mpool, uint32_t pg_num, uint32_t *gref_arr, iova_addr_t *pa_arr, int mempool_idx); #endif diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index f020be32d..985baaf51 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -139,7 +139,7 @@ enum l2fwd_crypto_xform_chain { struct l2fwd_key { uint8_t *data; uint32_t length; - phys_addr_t phys_addr; + iova_addr_t phys_addr; }; struct l2fwd_iv { diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h index 10fe0804b..363d1a7e5 100644 --- a/lib/librte_cryptodev/rte_crypto.h +++ b/lib/librte_cryptodev/rte_crypto.h @@ -117,7 +117,7 @@ struct rte_crypto_op { struct rte_mempool *mempool; /**< crypto operation mempool which operation is allocated from */ - phys_addr_t phys_addr; + iova_addr_t phys_addr; /**< physical address of crypto operation */ RTE_STD_C11 diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h index 0ceaa9176..ddb68246c 100644 --- a/lib/librte_cryptodev/rte_crypto_sym.h +++ b/lib/librte_cryptodev/rte_crypto_sym.h @@ -543,7 +543,7 @@ struct rte_crypto_sym_op { * For GCM (@ref RTE_CRYPTO_AEAD_AES_GCM), for * "digest result" read "authentication tag T". */ - phys_addr_t phys_addr; + iova_addr_t phys_addr; /**< Physical address of digest */ } digest; /**< Digest parameters */ struct { @@ -579,7 +579,7 @@ struct rte_crypto_sym_op { * of the block size (16 bytes). * */ - phys_addr_t phys_addr; /**< physical address */ + iova_addr_t phys_addr; /**< physical address */ } aad; /**< Additional authentication parameters */ } aead; @@ -676,7 +676,7 @@ struct rte_crypto_sym_op { * will overwrite any data at this location. * */ - phys_addr_t phys_addr; + iova_addr_t phys_addr; /**< Physical address of digest */ } digest; /**< Digest parameters */ } auth; diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index 7ec9c4bc4..cfa32cbbc 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -111,7 +111,7 @@ extern const char **rte_cyptodev_names; * to calculate address from. */ #define rte_crypto_op_ctophys_offset(c, o) \ - (phys_addr_t)((c)->phys_addr + (o)) + (iova_addr_t)((c)->phys_addr + (o)) /** * Crypto parameters range description diff --git a/lib/librte_eal/bsdapp/eal/eal_memory.c b/lib/librte_eal/bsdapp/eal/eal_memory.c index 3614da8db..10c2e121f 100644 --- a/lib/librte_eal/bsdapp/eal/eal_memory.c +++ b/lib/librte_eal/bsdapp/eal/eal_memory.c @@ -50,7 +50,7 @@ /* * Get physical address of any mapped virtual address in the current process. */ -phys_addr_t +iova_addr_t rte_mem_virt2phy(const void *virtaddr) { /* XXX not implemented. This function is only used by @@ -73,7 +73,7 @@ rte_eal_hugepage_init(void) /* for debug purposes, hugetlbfs can be disabled */ if (internal_config.no_hugetlbfs) { addr = malloc(internal_config.memory); - mcfg->memseg[0].phys_addr = (phys_addr_t)(uintptr_t)addr; + mcfg->memseg[0].phys_addr = (iova_addr_t)(uintptr_t)addr; mcfg->memseg[0].addr = addr; mcfg->memseg[0].hugepage_sz = RTE_PGSIZE_4K; mcfg->memseg[0].len = internal_config.memory; diff --git a/lib/librte_eal/common/include/rte_malloc.h b/lib/librte_eal/common/include/rte_malloc.h index 3d37f79b8..491b479b1 100644 --- a/lib/librte_eal/common/include/rte_malloc.h +++ b/lib/librte_eal/common/include/rte_malloc.h @@ -332,7 +332,7 @@ rte_malloc_set_limit(const char *type, size_t max); * RTE_BAD_PHYS_ADDR on error * otherwise return physical address of the buffer */ -phys_addr_t +iova_addr_t rte_malloc_virt2phy(const void *addr); #ifdef __cplusplus diff --git a/lib/librte_eal/common/include/rte_memory.h b/lib/librte_eal/common/include/rte_memory.h index 4aa5d1f77..5face8c86 100644 --- a/lib/librte_eal/common/include/rte_memory.h +++ b/lib/librte_eal/common/include/rte_memory.h @@ -98,14 +98,14 @@ enum rte_page_sizes { */ #define __rte_cache_min_aligned __rte_aligned(RTE_CACHE_LINE_MIN_SIZE) -typedef uint64_t phys_addr_t; /**< Physical address definition. */ -#define RTE_BAD_PHYS_ADDR ((phys_addr_t)-1) +typedef uint64_t iova_addr_t; /**< Physical address definition. */ +#define RTE_BAD_PHYS_ADDR ((iova_addr_t)-1) /** * Physical memory segment descriptor. */ struct rte_memseg { - phys_addr_t phys_addr; /**< Start physical address. */ + iova_addr_t phys_addr; /**< Start physical address. */ RTE_STD_C11 union { void *addr; /**< Start virtual address. */ @@ -142,7 +142,7 @@ int rte_mem_lock_page(const void *virt); * @return * The physical address or RTE_BAD_PHYS_ADDR on error. */ -phys_addr_t rte_mem_virt2phy(const void *virt); +iova_addr_t rte_mem_virt2phy(const void *virt); /** * Get the layout of the available physical memory. @@ -201,7 +201,7 @@ unsigned rte_memory_get_nrank(void); int rte_xen_dom0_supported(void); /**< Internal use only - phys to virt mapping for xen */ -phys_addr_t rte_xen_mem_phy2mch(int32_t, const phys_addr_t); +iova_addr_t rte_xen_mem_phy2mch(int32_t, const iova_addr_t); /** * Return the physical address of elt, which is an element of the pool mp. @@ -215,8 +215,8 @@ phys_addr_t rte_xen_mem_phy2mch(int32_t, const phys_addr_t); * @return * The physical address or RTE_BAD_PHYS_ADDR on error. */ -static inline phys_addr_t -rte_mem_phy2mch(int32_t memseg_id, const phys_addr_t phy_addr) +static inline iova_addr_t +rte_mem_phy2mch(int32_t memseg_id, const iova_addr_t phy_addr) { if (rte_xen_dom0_supported()) return rte_xen_mem_phy2mch(memseg_id, phy_addr); @@ -251,8 +251,8 @@ static inline int rte_xen_dom0_supported(void) return 0; } -static inline phys_addr_t -rte_mem_phy2mch(int32_t memseg_id __rte_unused, const phys_addr_t phy_addr) +static inline iova_addr_t +rte_mem_phy2mch(int32_t memseg_id __rte_unused, const iova_addr_t phy_addr) { return phy_addr; } diff --git a/lib/librte_eal/common/include/rte_memzone.h b/lib/librte_eal/common/include/rte_memzone.h index 1d0827f46..89b2adb6e 100644 --- a/lib/librte_eal/common/include/rte_memzone.h +++ b/lib/librte_eal/common/include/rte_memzone.h @@ -78,7 +78,7 @@ struct rte_memzone { #define RTE_MEMZONE_NAMESIZE 32 /**< Maximum length of memory zone name.*/ char name[RTE_MEMZONE_NAMESIZE]; /**< Name of the memory zone. */ - phys_addr_t phys_addr; /**< Start physical address. */ + iova_addr_t phys_addr; /**< Start physical address. */ RTE_STD_C11 union { void *addr; /**< Start virtual address. */ diff --git a/lib/librte_eal/common/rte_malloc.c b/lib/librte_eal/common/rte_malloc.c index 5c0627bf4..3ce6034bf 100644 --- a/lib/librte_eal/common/rte_malloc.c +++ b/lib/librte_eal/common/rte_malloc.c @@ -248,7 +248,7 @@ rte_malloc_set_limit(__rte_unused const char *type, /* * Return the physical address of a virtual address obtained through rte_malloc */ -phys_addr_t +iova_addr_t rte_malloc_virt2phy(const void *addr) { const struct malloc_elem *elem = malloc_elem_from_data(addr); diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index 52791282f..405c15bcd 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c @@ -104,7 +104,7 @@ static void test_phys_addrs_available(void) { uint64_t tmp; - phys_addr_t physaddr; + iova_addr_t physaddr; /* For dom0, phys addresses can always be available */ if (rte_xen_dom0_supported()) @@ -130,7 +130,7 @@ test_phys_addrs_available(void) /* * Get physical address of any mapped virtual address in the current process. */ -phys_addr_t +iova_addr_t rte_mem_virt2phy(const void *virtaddr) { int fd, retval; @@ -219,7 +219,7 @@ static int find_physaddrs(struct hugepage_file *hugepg_tbl, struct hugepage_info *hpi) { unsigned int i; - phys_addr_t addr; + iova_addr_t addr; for (i = 0; i < hpi->num_pages[0]; i++) { addr = rte_mem_virt2phy(hugepg_tbl[i].orig_va); @@ -237,7 +237,7 @@ static int set_physaddrs(struct hugepage_file *hugepg_tbl, struct hugepage_info *hpi) { unsigned int i; - static phys_addr_t addr; + static iova_addr_t addr; for (i = 0; i < hpi->num_pages[0]; i++) { hugepg_tbl[i].physaddr = addr; diff --git a/lib/librte_eal/linuxapp/eal/eal_xen_memory.c b/lib/librte_eal/linuxapp/eal/eal_xen_memory.c index 19db1cb5f..b2edd3ee1 100644 --- a/lib/librte_eal/linuxapp/eal/eal_xen_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_xen_memory.c @@ -153,8 +153,8 @@ get_xen_memory_size(void) /** * Based on physical address to caculate MFN in Xen Dom0. */ -phys_addr_t -rte_xen_mem_phy2mch(int32_t memseg_id, const phys_addr_t phy_addr) +iova_addr_t +rte_xen_mem_phy2mch(int32_t memseg_id, const iova_addr_t phy_addr) { int mfn_id, i; uint64_t mfn, mfn_offset; diff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h index 2ac879fdd..efd9ac9a5 100644 --- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h +++ b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h @@ -73,6 +73,10 @@ #define RTE_CACHE_LINE_MIN_SIZE 64 +#ifdef __KERNEL__ +typedef uint64_t iova_addr_t; +#endif + /* * Request id. */ @@ -138,20 +142,20 @@ struct rte_kni_mbuf { struct rte_kni_device_info { char name[RTE_KNI_NAMESIZE]; /**< Network device name for KNI */ - phys_addr_t tx_phys; - phys_addr_t rx_phys; - phys_addr_t alloc_phys; - phys_addr_t free_phys; + iova_addr_t tx_phys; + iova_addr_t rx_phys; + iova_addr_t alloc_phys; + iova_addr_t free_phys; /* Used by Ethtool */ - phys_addr_t req_phys; - phys_addr_t resp_phys; - phys_addr_t sync_phys; + iova_addr_t req_phys; + iova_addr_t resp_phys; + iova_addr_t sync_phys; void * sync_va; /* mbuf mempool */ void * mbuf_va; - phys_addr_t mbuf_phys; + iova_addr_t mbuf_phys; /* PCI info */ uint16_t vendor_id; /**< Vendor ID or PCI_ANY_ID. */ diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index eaed7eee0..4563b5dc3 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -411,7 +411,7 @@ struct rte_mbuf { * same mbuf cacheline0 layout for 32-bit and 64-bit. This makes * working on vector drivers easier. */ - phys_addr_t buf_physaddr __rte_aligned(sizeof(phys_addr_t)); + iova_addr_t buf_physaddr __rte_aligned(sizeof(iova_addr_t)); /* next 8 bytes are initialised on RX descriptor rearm */ MARKER64 rearm_data; @@ -594,7 +594,7 @@ static inline uint16_t rte_pktmbuf_priv_size(struct rte_mempool *mp); * @return * The physical address of the beginning of the mbuf data */ -static inline phys_addr_t +static inline iova_addr_t rte_mbuf_data_dma_addr(const struct rte_mbuf *mb) { return mb->buf_physaddr + mb->data_off; @@ -612,7 +612,7 @@ rte_mbuf_data_dma_addr(const struct rte_mbuf *mb) * @return * The physical address of the beginning of the mbuf data */ -static inline phys_addr_t +static inline iova_addr_t rte_mbuf_data_dma_addr_default(const struct rte_mbuf *mb) { return mb->buf_physaddr + RTE_PKTMBUF_HEADROOM; @@ -1533,7 +1533,7 @@ static inline struct rte_mbuf *rte_pktmbuf_lastseg(struct rte_mbuf *m) * The offset into the data to calculate address from. */ #define rte_pktmbuf_mtophys_offset(m, o) \ - (phys_addr_t)((m)->buf_physaddr + (m)->data_off + (o)) + (iova_addr_t)((m)->buf_physaddr + (m)->data_off + (o)) /** * A macro that returns the physical address that points to the start of the diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c index 6fc3c9c7c..b4f14cf61 100644 --- a/lib/librte_mempool/rte_mempool.c +++ b/lib/librte_mempool/rte_mempool.c @@ -128,7 +128,7 @@ static unsigned optimize_object_size(unsigned obj_size) } static void -mempool_add_elem(struct rte_mempool *mp, void *obj, phys_addr_t physaddr) +mempool_add_elem(struct rte_mempool *mp, void *obj, iova_addr_t physaddr) { struct rte_mempool_objhdr *hdr; struct rte_mempool_objtlr *tlr __rte_unused; @@ -263,11 +263,11 @@ rte_mempool_xmem_size(uint32_t elt_num, size_t total_elt_sz, uint32_t pg_shift) */ ssize_t rte_mempool_xmem_usage(__rte_unused void *vaddr, uint32_t elt_num, - size_t total_elt_sz, const phys_addr_t paddr[], uint32_t pg_num, + size_t total_elt_sz, const iova_addr_t paddr[], uint32_t pg_num, uint32_t pg_shift) { uint32_t elt_cnt = 0; - phys_addr_t start, end; + iova_addr_t start, end; uint32_t paddr_idx; size_t pg_sz = (size_t)1 << pg_shift; @@ -345,7 +345,7 @@ rte_mempool_free_memchunks(struct rte_mempool *mp) */ int rte_mempool_populate_phys(struct rte_mempool *mp, char *vaddr, - phys_addr_t paddr, size_t len, rte_mempool_memchunk_free_cb_t *free_cb, + iova_addr_t paddr, size_t len, rte_mempool_memchunk_free_cb_t *free_cb, void *opaque) { unsigned total_elt_sz; @@ -409,7 +409,7 @@ rte_mempool_populate_phys(struct rte_mempool *mp, char *vaddr, */ int rte_mempool_populate_phys_tab(struct rte_mempool *mp, char *vaddr, - const phys_addr_t paddr[], uint32_t pg_num, uint32_t pg_shift, + const iova_addr_t paddr[], uint32_t pg_num, uint32_t pg_shift, rte_mempool_memchunk_free_cb_t *free_cb, void *opaque) { uint32_t i, n; @@ -452,7 +452,7 @@ rte_mempool_populate_virt(struct rte_mempool *mp, char *addr, size_t len, size_t pg_sz, rte_mempool_memchunk_free_cb_t *free_cb, void *opaque) { - phys_addr_t paddr; + iova_addr_t paddr; size_t off, phys_len; int ret, cnt = 0; @@ -483,7 +483,7 @@ rte_mempool_populate_virt(struct rte_mempool *mp, char *addr, /* populate with the largest group of contiguous pages */ for (phys_len = pg_sz; off + phys_len < len; phys_len += pg_sz) { - phys_addr_t paddr_tmp; + iova_addr_t paddr_tmp; paddr_tmp = rte_mem_virt2phy(addr + off + phys_len); paddr_tmp = rte_mem_phy2mch(-1, paddr_tmp); @@ -519,7 +519,7 @@ rte_mempool_populate_default(struct rte_mempool *mp) char mz_name[RTE_MEMZONE_NAMESIZE]; const struct rte_memzone *mz; size_t size, total_elt_sz, align, pg_sz, pg_shift; - phys_addr_t paddr; + iova_addr_t paddr; unsigned mz_id, n; int ret; @@ -922,7 +922,7 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size, rte_mempool_ctor_t *mp_init, void *mp_init_arg, rte_mempool_obj_cb_t *obj_init, void *obj_init_arg, int socket_id, unsigned flags, void *vaddr, - const phys_addr_t paddr[], uint32_t pg_num, uint32_t pg_shift) + const iova_addr_t paddr[], uint32_t pg_num, uint32_t pg_shift) { struct rte_mempool *mp = NULL; int ret; diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h index 76b5b3b15..1bcb6ebd7 100644 --- a/lib/librte_mempool/rte_mempool.h +++ b/lib/librte_mempool/rte_mempool.h @@ -157,7 +157,7 @@ struct rte_mempool_objsz { struct rte_mempool_objhdr { STAILQ_ENTRY(rte_mempool_objhdr) next; /**< Next in list. */ struct rte_mempool *mp; /**< The mempool owning the object. */ - phys_addr_t physaddr; /**< Physical address of the object. */ + iova_addr_t physaddr; /**< Physical address of the object. */ #ifdef RTE_LIBRTE_MEMPOOL_DEBUG uint64_t cookie; /**< Debug cookie. */ #endif @@ -203,7 +203,7 @@ struct rte_mempool_memhdr { STAILQ_ENTRY(rte_mempool_memhdr) next; /**< Next in list. */ struct rte_mempool *mp; /**< The mempool owning the chunk */ void *addr; /**< Virtual address of the chunk */ - phys_addr_t phys_addr; /**< Physical address of the chunk */ + iova_addr_t phys_addr; /**< Physical address of the chunk */ size_t len; /**< length of the chunk */ rte_mempool_memchunk_free_cb_t *free_cb; /**< Free callback */ void *opaque; /**< Argument passed to the free callback */ @@ -739,7 +739,7 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size, rte_mempool_ctor_t *mp_init, void *mp_init_arg, rte_mempool_obj_cb_t *obj_init, void *obj_init_arg, int socket_id, unsigned flags, void *vaddr, - const phys_addr_t paddr[], uint32_t pg_num, uint32_t pg_shift); + const iova_addr_t paddr[], uint32_t pg_num, uint32_t pg_shift); /** * Create an empty mempool @@ -820,7 +820,7 @@ rte_mempool_free(struct rte_mempool *mp); * mempool and a negative errno is returned. */ int rte_mempool_populate_phys(struct rte_mempool *mp, char *vaddr, - phys_addr_t paddr, size_t len, rte_mempool_memchunk_free_cb_t *free_cb, + iova_addr_t paddr, size_t len, rte_mempool_memchunk_free_cb_t *free_cb, void *opaque); /** @@ -851,7 +851,7 @@ int rte_mempool_populate_phys(struct rte_mempool *mp, char *vaddr, * mempool and a negative errno is returned. */ int rte_mempool_populate_phys_tab(struct rte_mempool *mp, char *vaddr, - const phys_addr_t paddr[], uint32_t pg_num, uint32_t pg_shift, + const iova_addr_t paddr[], uint32_t pg_num, uint32_t pg_shift, rte_mempool_memchunk_free_cb_t *free_cb, void *opaque); /** @@ -1394,7 +1394,7 @@ rte_mempool_empty(const struct rte_mempool *mp) * If the mempool was created with MEMPOOL_F_NO_PHYS_CONTIG, the * returned value is RTE_BAD_PHYS_ADDR. */ -static inline phys_addr_t +static inline iova_addr_t rte_mempool_virt2phy(__rte_unused const struct rte_mempool *mp, const void *elt) { const struct rte_mempool_objhdr *hdr; @@ -1523,7 +1523,7 @@ size_t rte_mempool_xmem_size(uint32_t elt_num, size_t total_elt_sz, * is the actual number of elements that can be stored in that buffer. */ ssize_t rte_mempool_xmem_usage(void *vaddr, uint32_t elt_num, - size_t total_elt_sz, const phys_addr_t paddr[], uint32_t pg_num, + size_t total_elt_sz, const iova_addr_t paddr[], uint32_t pg_num, uint32_t pg_shift); /** diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index 6fe72aeb6..2481599ba 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib/librte_vhost/vhost.h @@ -281,7 +281,7 @@ extern uint64_t VHOST_FEATURES; extern struct virtio_net *vhost_devices[MAX_VHOST_DEVICE]; /* Convert guest physical address to host physical address */ -static __rte_always_inline phys_addr_t +static __rte_always_inline iova_addr_t gpa_to_hpa(struct virtio_net *dev, uint64_t gpa, uint64_t size) { uint32_t i; diff --git a/test/test/test_cryptodev.h b/test/test/test_cryptodev.h index 4509a09ad..7a6175740 100644 --- a/test/test/test_cryptodev.h +++ b/test/test/test_cryptodev.h @@ -152,7 +152,7 @@ pktmbuf_mtod_offset(struct rte_mbuf *mbuf, int offset) { return rte_pktmbuf_mtod_offset(m, uint8_t *, offset); } -static inline phys_addr_t +static inline iova_addr_t pktmbuf_mtophys_offset(struct rte_mbuf *mbuf, int offset) { struct rte_mbuf *m; diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c index 7ae31cf74..0afb159e9 100644 --- a/test/test/test_memzone.c +++ b/test/test/test_memzone.c @@ -78,7 +78,7 @@ /* Test if memory overlaps: return 1 if true, or 0 if false. */ static int -is_memory_overlap(phys_addr_t ptr1, size_t len1, phys_addr_t ptr2, size_t len2) +is_memory_overlap(iova_addr_t ptr1, size_t len1, iova_addr_t ptr2, size_t len2) { if (ptr2 >= ptr1 && (ptr2 - ptr1) < len1) return 1; @@ -601,9 +601,9 @@ check_memzone_bounded(const char *name, uint32_t len, uint32_t align, uint32_t bound) { const struct rte_memzone *mz; - phys_addr_t bmask; + iova_addr_t bmask; - bmask = ~((phys_addr_t)bound - 1); + bmask = ~((iova_addr_t)bound - 1); if ((mz = rte_memzone_reserve_bounded(name, len, SOCKET_ID_ANY, 0, align, bound)) == NULL) { @@ -612,7 +612,7 @@ check_memzone_bounded(const char *name, uint32_t len, uint32_t align, return -1; } - if ((mz->phys_addr & ((phys_addr_t)align - 1)) != 0) { + if ((mz->phys_addr & ((iova_addr_t)align - 1)) != 0) { printf("%s(%s): invalid phys addr alignment\n", __func__, mz->name); return -1; -- 2.11.0