From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0069.outbound.protection.outlook.com [104.47.42.69]) by dpdk.org (Postfix) with ESMTP id CF2751B245 for ; Fri, 20 Oct 2017 14:32:21 +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=Nx8QHKwYYFeTS4WqXpInsqC+CRyw/jQD0o7UdHjLD4E=; b=Ya4DFI2DIcztK2W2gyb3C9WEBTiV4kF+3IuwyfNTHnqIOUSnMW+HxkQd+tqfCHPrirLNbMYR+Dbq1LPxZbtkXiBtmdndMQyAtkSq8gJ5cuYJDQZAloyuNXCyvbY4MUOSXjhlWEdcPir5jBY4KkZ2BtbvEFfKdp/p1P4E3e1aVjM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from localhost.localdomain (14.140.2.178) by DM5PR07MB3100.namprd07.prod.outlook.com (10.172.85.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.156.4; Fri, 20 Oct 2017 12:32:17 +0000 From: Santosh Shukla To: dev@dpdk.org Cc: olivier.matz@6wind.com, thomas@monjalon.net, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, anatoly.burakov@intel.com, Santosh Shukla Date: Fri, 20 Oct 2017 18:01:32 +0530 Message-Id: <20171020123136.10557-3-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171020123136.10557-1-santosh.shukla@caviumnetworks.com> References: <20170905103119.20511-1-santosh.shukla@caviumnetworks.com> <20171020123136.10557-1-santosh.shukla@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: BM1PR01CA0110.INDPRD01.PROD.OUTLOOK.COM (10.174.208.26) To DM5PR07MB3100.namprd07.prod.outlook.com (10.172.85.10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e2d69885-ea67-4886-de7d-08d517b69b3f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199); SRVR:DM5PR07MB3100; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3100; 3:j7qzvnTJBX6veVk5ubD9TF0cqMrTLLp0xsK3YiJPCc0YflZsfMJsad/2oGeHfHseDChEXntmPYjHbSQIN0SQIvgCYKIyTn6dSpNM+oCzfpBCQfcgP+krZLhVYeH/8oQ70ZsFAf6bm0ddUljP/ZSFOhd5oKntX+bVxHNBcBNN8cMEshb/rmf6HqRNk1F8xcDnOGlu2V6BoE//pDhQBdIXdZK6O/BWwGWGd5aOXYZUiOAn8vNva6majt0jsH+EvHrL; 25:EjbKQ8kHiawzwjVVadnYgUBXhFOitYBF5VxSEKzsRI6nXVSQ6mX685sdwxeOncwU1r2m/h3Y25ijOiqpSHcecSAGLtq/iHlsenP5xehQdet7FG6PL9dXf3+szBJQpqTyfr8LtcddDuu3g+o+b5bZF78O5QUSYOvtdWXuCPwZeRvF3EJde4xrKf7QZJyTC0pTewUdRZB78UosRZheojS4trYPCtMREh9mriyf1wBhjHOxnEjm9oct3L4TtXpZjwZMH1xnqDgR3jiwawxgIKuoVyJVsoZFWP4HQXu3RNydCqmcLml4urbQQ99L6iSBlpSZJVTjaLGE3FjP5jZNxZvHLQ==; 31:g9ZyZddDgaAlQ4H6545qqoEcSO7QgqXBCv4fzqhgDItvkZc+Us2qQpSAnw+6HMeFl0EMSVfVqO/WW3bte52dPkwQvi/EIAxgDjEbkDOUmMyFFWXXFTIZtjViP0achYKsH2m7lmaSMlRpUkq9rkeCrBpqFvzA1qhL9u5t218/OXJkZ/KZFP3vWSHSke4ZTXw7cRPSR4qQlBSfYrMlm+qFqrp0JB4Au8+Qs0MJAiuumCE= X-MS-TrafficTypeDiagnostic: DM5PR07MB3100: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3100; 20:RTP91A/BBazHfGVCEAWEqewvLCPzFgTP6L8t3P0No75N1Spkx/PdGcUAVTTS9/EvORZGTAq40/bhBoel8nd2ZG5YmY+k83TQUEgGMixQAtfT29secGLtbynFq5jYlSOzfEYZgFkoO2S9j6qWerKVP/t6XKoRP5FpaQdxy1NVWQ6hXso8hkYUwvdV3RVXfycfR9eIzGoc+DaSNSs7uOADpdu/pWUxmXnD+TacP4r61qAjEEokDBjkIqb1CkD/4Zv1a7BJZ0NsC5MR1vjQOqg0XF6YQ51TRPSzE80AT3ghqNTJtjiFLWGHUmFKNPV7QvGw9fHX2U0HIRZLETr/xO9fJznDLA1ijzsiLx7qjMIWPTpIvboovspRgFrrRDVsZ0SkS1iCChFnhbiDeT6aAJo6krZ1MR4DmedeBhVO+6HAeBpCAtZ/Jm7DekdjzJ0w2uJut7UwWIORVBv3/4AOt3vsCx1Y7/cqecF50GqZF9OQpNv8z7r9mc+Pw4MqZ842hArlpIts/gy+BCedG0sx0ikwY0ZDXVlDYc/dHkJTuVYQ3pp1Z21k9t7Z7GOi+JWJG5hkZ+hMVWh729022fu6l+9oDzgeXAc/bUxExb2q25RX4XE= X-Exchange-Antispam-Report-Test: UriScan:(275809806118684)(228905959029699); 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)(100000703101)(100105400095)(10201501046)(3231020)(93006095)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(20161123560025)(20161123555025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR07MB3100; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR07MB3100; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3100; 4:fMadHgGDHY1Q0J1Jl/+XasxRLZA/MeyTQMUszoTNFwasUKCyy6izthEuB4yPusKPYZKA2+DaCZO+UX/z9b9kcGzFZR+FvN6bjNht0XHWQOosRXqj6gg/Whe6n76MAmBoXcCSKym/UhKrYV9Bxmu2C6/dx5SL5Nwzaktibu33GVkSbi7gOV8qY5xpJLF5EbnkZ3uTZW4VKmkWw2TYuQ7nRoWQsJ0BlN9gQShDU8Bu8nLzfCYCuyGBl5+VPd3nA7jhlwa8yozhhr+pBF+a+NUYzp2AQKUL+BsQ+CcM3117NqxSvARHK939442aOBfwWAXHydsfnqaLMGLRSL4/zDFnuQ== X-Forefront-PRVS: 0466CA5A45 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(376002)(346002)(189002)(199003)(81156014)(81166006)(5890100001)(2351001)(2361001)(66066001)(105586002)(47776003)(5003940100001)(16586007)(97736004)(551934003)(107886003)(6916009)(42882006)(72206003)(478600001)(5660300001)(33646002)(2950100002)(6666003)(16526018)(106356001)(53936002)(8656005)(8656005)(6486002)(6506006)(50226002)(36756003)(189998001)(5009440100003)(575784001)(50466002)(4326008)(6512007)(68736007)(25786009)(8936002)(8676002)(316002)(76176999)(101416001)(3846002)(1076002)(48376002)(50986999)(6116002)(305945005)(7736002)(2906002)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3100; 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) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR07MB3100; 23:5TeRjzImIALVU7/AtUJS5CBvKwOzou1C9ysI7Lu55?= =?us-ascii?Q?A1JvYo0YbsnpGWY4uZZgM8iG+LxQ6PbxyReDKmDPyfxeuIU8uTO3KrQ3C9EM?= =?us-ascii?Q?F0wcFD09kCJloTtJQPqTIPYLJJNn/JYeXBOvftftP+VVU2tkAAJUlDvO57Ky?= =?us-ascii?Q?nYYfZZDdlVgCmMZeWMITGqOJa/krPpsJy20G3cOFFdi/Bp7WiQ749IUVgpvh?= =?us-ascii?Q?LdD6mprWkYa9GB+K82T14jHh2bTCunXhWV95KFnQOck5GPqyoKDwMmQaFCca?= =?us-ascii?Q?DyYaJl6Yvtm2+E5+VGOcpGl5iiOQEbIwG1lxL4+yBDfoMViDUgEBh+fDrpw+?= =?us-ascii?Q?SNclfXi4nLQX9SgQRXyNvQtodL3eT8sk05ddiAI0wwFjOoHrA8zrRHggZkZW?= =?us-ascii?Q?FYjN54uTGoR+2MmIbtUBbSCE9dlTPWq7KXJZ1VD9Jx3+oNdmgGMi0/1PY7fj?= =?us-ascii?Q?+Y1lEIxw4928HDaZ5Hnp7e0JWcy/hk59XTuQ4Sv86PVBPxkmQilHqeTGZKZo?= =?us-ascii?Q?GuaofRq0fAgw+tODWWtBUcgr6EWH6l7cfsPeL4l6hIqhtuv55/jP34aLaOYw?= =?us-ascii?Q?Wyq2eieLB7NYtT96MtSemA692nk5m6nWRrZSpd9Jcj5pI04yS/Airh630o0K?= =?us-ascii?Q?AQ+JbfStsc5oOL2LWwqcdH5ZuKOJgfs91nwmDMxYMTKlHJGUWSSGcXvROsXH?= =?us-ascii?Q?wQlFu6VDdmqKpV9lXn53TctzMRlD/cLm61Dax9lHBwQ55DsqBi/Irm9Gsogs?= =?us-ascii?Q?15M5eve7z1slaDIJOkKNsuAk/etlugLChgYFEkgj1iW8hZoopp6+CIlyS2e3?= =?us-ascii?Q?mJ7AYIt0K429nM3tx2chRx6P41NtjE8owE5qZKDmgf8H3uxgPI6P9ukQciZG?= =?us-ascii?Q?GxbhNcpGa+qp4ne++EY7usbXMgF6E5o+BHn6m/KATmnIqXol6aFFq2nQL+Nx?= =?us-ascii?Q?+AqkGk2yz27Ec3ncViP4sOcHXEIBKU78+ztGmBKrtYFfZlI2x2+r6+nW+JZ1?= =?us-ascii?Q?TSYLpMT+zZGU5Hg856OniHkESLz5mJk3OO7gMhLyrAm8VYIltWdMEvnjdSxZ?= =?us-ascii?Q?J6x5axH3orfefXtv9zbD7fGA7ZUf2svJlpPF90dZTRehCU/fbFDvKAgxVUjo?= =?us-ascii?Q?htpHKZtlqRXyBSnbZ3oeffc6HgxNLX5gQ8AasvB875W9MCqEmYumNHomdHUK?= =?us-ascii?Q?N8rFDE1cS6D3SivO7xRjjJefbv2G8vUOOJD9RwC5M5BncsH74ASUAgCvluZz?= =?us-ascii?Q?YE5dnz0c/NG3vCLAqPmKaib4PnrmXphk82fmzWExaW/HNvLaUD8xS00HWOxU?= =?us-ascii?Q?d/Xun9Ux1QjAm8P59Z/iMI6afuerljigtOh7ghJ21odAHD3I2Fq1HmCG0aTX?= =?us-ascii?Q?V9kJA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3100; 6:noBqEU16vrxTWlKf+WHctn5pKrs5mXM3uXAac6v3i7HmgXTeAhfLYPq5ZYQNuCb7dFQG2B5BAFgB8ytyAkWo/scJurPa4I/uSrT4BwU08UJ3J8PESuJn+q5Jyzyl23w5suq1Q0viu3dYWAxu8PJ9EtxZZDeFAJyoUKWJnHmJyP3DQNXF0VOKiUSsNmzMCd4vg962zm3YQU6d93f/kxf4NnDwv8LgDZxQwMgw2TUIZsW82ZrgKNFDYr/+tspejn5jSeDX5D4051klnDxkt2yXJjs9jsbAd2A4zko00PmZYFI3Ps91lSARqGfaAEeZXWm2BB7yKKU8q7b7P2yT30ZiuA==; 5:IZRbBvsk5VlN4DvHdWEfYfOmrRRfZucYCnT5AikXmG4M+UUvxp8m/TaamOH6uHOXRORKVkFup8iXgyAx0vn1+lC6riqhNmsocnFFGvw/n5OXG4Gf22+tuzIm861kQ2vynQppjAMByiXwXPkNFWSb9g==; 24:ZCt/uyryzeeRHUDprD9YebbXRgKzl5aK5l0jCPqjGwSWrOvEmtBssR5PczRf4yL8M1cpjqZC27DJ6ID2O9E5cxCJCIiae002iBTeh/T3g5A=; 7:pTY3+2gonn67MGp7GxOO8FpfMNCHt4rn8bER3C6QMyByuknTh6KFmZTPoo1VbKu4l5cXkcu0g1UE2Kus16COoQQR/wnY64RXekY1jU5mXek5FCK2LMkV/AbKEjEP9LAZ7RNnUIJjf26OqaL7dYHKS4CgcObT8ttU93mM5l7UajBTjVwET9WUkcMF60qRaOUta4K2eDd7Z268XbbcewHd2Mf1YCiLB9Pc1Be/AqunKMU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2017 12:32:17.1902 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e2d69885-ea67-4886-de7d-08d517b69b3f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3100 Subject: [dpdk-dev] [PATCH v3 2/6] eal/memory: rename buf physaddr to buf iovaaddr 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: Fri, 20 Oct 2017 12:32:22 -0000 Rename buf_physaddr to buf_iovaaddr Signed-off-by: Santosh Shukla Reviewed-by: Anatoly Burakov --- app/test-crypto-perf/cperf_test_common.c | 4 ++-- doc/guides/prog_guide/img/mbuf1.svg | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 2 +- drivers/crypto/dpaa_sec/dpaa_sec.c | 4 ++-- drivers/net/ark/ark_ethdev_rx.c | 8 ++++---- drivers/net/bnx2x/bnx2x_rxtx.c | 4 ++-- drivers/net/bnxt/bnxt_ring.h | 2 +- drivers/net/cxgbe/sge.c | 4 ++-- drivers/net/dpaa/dpaa_rxtx.c | 6 +++--- drivers/net/ena/ena_ethdev.c | 6 +++--- drivers/net/enic/enic_main.c | 2 +- drivers/net/enic/enic_rxtx.c | 6 +++--- drivers/net/fm10k/fm10k.h | 4 ++-- drivers/net/fm10k/fm10k_rxtx_vec.c | 4 ++-- drivers/net/i40e/i40e_rxtx_vec_altivec.c | 4 ++-- drivers/net/i40e/i40e_rxtx_vec_neon.c | 6 +++--- drivers/net/i40e/i40e_rxtx_vec_sse.c | 6 +++--- drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 6 +++--- drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 6 +++--- drivers/net/nfp/nfp_net.c | 2 +- drivers/net/virtio/virtio_ethdev.c | 2 +- drivers/net/virtio/virtqueue.h | 2 +- .../linuxapp/eal/include/exec-env/rte_kni_common.h | 2 +- lib/librte_eal/linuxapp/kni/kni_net.c | 6 +++--- lib/librte_kni/rte_kni.c | 2 +- lib/librte_mbuf/rte_mbuf.c | 6 +++--- lib/librte_mbuf/rte_mbuf.h | 14 +++++++------- lib/librte_vhost/virtio_net.c | 2 +- test/test/test_mbuf.c | 2 +- 29 files changed, 63 insertions(+), 63 deletions(-) diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c index 3f116da6e..1c54b1551 100644 --- a/app/test-crypto-perf/cperf_test_common.c +++ b/app/test-crypto-perf/cperf_test_common.c @@ -50,7 +50,7 @@ fill_single_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp, /* start of buffer is after mbuf structure and priv data */ m->priv_size = 0; m->buf_addr = (char *)m + mbuf_hdr_size; - m->buf_physaddr = rte_mempool_virt2phy(mp, obj) + + m->buf_iovaaddr = rte_mempool_virt2phy(mp, obj) + mbuf_offset + mbuf_hdr_size; m->buf_len = segment_sz; m->data_len = segment_sz; @@ -81,7 +81,7 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp, /* start of buffer is after mbuf structure and priv data */ m->priv_size = 0; m->buf_addr = (char *)m + mbuf_hdr_size; - m->buf_physaddr = next_seg_phys_addr; + m->buf_iovaaddr = next_seg_phys_addr; next_seg_phys_addr += mbuf_hdr_size + segment_sz; m->buf_len = segment_sz; m->data_len = segment_sz; diff --git a/doc/guides/prog_guide/img/mbuf1.svg b/doc/guides/prog_guide/img/mbuf1.svg index 5bd84d1bf..2f856bfd9 100644 --- a/doc/guides/prog_guide/img/mbuf1.svg +++ b/doc/guides/prog_guide/img/mbuf1.svg @@ -482,7 +482,7 @@ sodipodi:role="line" x="187.85715" y="347.7193" - id="tspan5240">(m->buf_physaddr is the(m->buf_iovaaddr is thebuf_physaddr) +#define DPAA2_MBUF_VADDR_TO_IOVA(mbuf) ((mbuf)->buf_iovaaddr) #define DPAA2_OP_VADDR_TO_IOVA(op) (op->phys_addr) /** diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index b944b94e3..94b9f6700 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -683,7 +683,7 @@ build_cipher_auth_gcm(struct rte_crypto_op *op, dpaa_sec_session *ses) uint8_t *IV_ptr = rte_crypto_op_ctod_offset(op, uint8_t *, ses->iv.offset); - start_addr = mbuf->buf_physaddr + mbuf->data_off; + start_addr = mbuf->buf_iovaaddr + mbuf->data_off; ctx = dpaa_sec_alloc_ctx(ses); if (!ctx) @@ -792,7 +792,7 @@ build_cipher_auth(struct rte_crypto_op *op, dpaa_sec_session *ses) uint8_t *IV_ptr = rte_crypto_op_ctod_offset(op, uint8_t *, ses->iv.offset); - start_addr = mbuf->buf_physaddr + mbuf->data_off; + start_addr = mbuf->buf_iovaaddr + mbuf->data_off; ctx = dpaa_sec_alloc_ctx(ses); if (!ctx) diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c index 53e5d9b5c..23918f6d3 100644 --- a/drivers/net/ark/ark_ethdev_rx.c +++ b/drivers/net/ark/ark_ethdev_rx.c @@ -499,22 +499,22 @@ eth_ark_rx_seed_mbufs(struct ark_rx_queue *queue) case 0: while (count != nb) { queue->paddress_q[seed_m++] = - (*mbufs++)->buf_physaddr; + (*mbufs++)->buf_iovaaddr; count++; /* FALLTHROUGH */ case 3: queue->paddress_q[seed_m++] = - (*mbufs++)->buf_physaddr; + (*mbufs++)->buf_iovaaddr; count++; /* FALLTHROUGH */ case 2: queue->paddress_q[seed_m++] = - (*mbufs++)->buf_physaddr; + (*mbufs++)->buf_iovaaddr; count++; /* FALLTHROUGH */ case 1: queue->paddress_q[seed_m++] = - (*mbufs++)->buf_physaddr; + (*mbufs++)->buf_iovaaddr; count++; /* FALLTHROUGH */ diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c index 7336124fc..e558bb12c 100644 --- a/drivers/net/bnx2x/bnx2x_rxtx.c +++ b/drivers/net/bnx2x/bnx2x_rxtx.c @@ -140,7 +140,7 @@ bnx2x_dev_rx_queue_setup(struct rte_eth_dev *dev, return -ENOMEM; } rxq->sw_ring[idx] = mbuf; - rxq->rx_ring[idx] = mbuf->buf_physaddr; + rxq->rx_ring[idx] = mbuf->buf_iovaaddr; } rxq->pkt_first_seg = NULL; rxq->pkt_last_seg = NULL; @@ -400,7 +400,7 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) rx_mb = rxq->sw_ring[bd_cons]; rxq->sw_ring[bd_cons] = new_mb; - rxq->rx_ring[bd_prod] = new_mb->buf_physaddr; + rxq->rx_ring[bd_prod] = new_mb->buf_iovaaddr; rx_pref = NEXT_RX_BD(bd_cons) & MAX_RX_BD(rxq); rte_prefetch0(rxq->sw_ring[rx_pref]); diff --git a/drivers/net/bnxt/bnxt_ring.h b/drivers/net/bnxt/bnxt_ring.h index 09042cb80..79504af24 100644 --- a/drivers/net/bnxt/bnxt_ring.h +++ b/drivers/net/bnxt/bnxt_ring.h @@ -41,7 +41,7 @@ #define RING_NEXT(ring, idx) (((idx) + 1) & (ring)->ring_mask) #define RTE_MBUF_DATA_DMA_ADDR(mb) \ - ((uint64_t)((mb)->buf_physaddr + (mb)->data_off)) + ((uint64_t)((mb)->buf_iovaaddr + (mb)->data_off)) #define DB_IDX_MASK 0xffffff #define DB_IDX_VALID (0x1 << 26) diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c index 5376fc500..d867914ab 100644 --- a/drivers/net/cxgbe/sge.c +++ b/drivers/net/cxgbe/sge.c @@ -149,7 +149,7 @@ static int map_mbuf(struct rte_mbuf *mbuf, dma_addr_t *addr) struct rte_mbuf *m = mbuf; for (; m; m = m->next, addr++) { - *addr = m->buf_physaddr + rte_pktmbuf_headroom(m); + *addr = m->buf_iovaaddr + rte_pktmbuf_headroom(m); if (*addr == 0) goto out_err; } @@ -423,7 +423,7 @@ static unsigned int refill_fl_usembufs(struct adapter *adap, struct sge_fl *q, mbuf->nb_segs = 1; mbuf->port = rxq->rspq.port_id; - mapping = (dma_addr_t)RTE_ALIGN(mbuf->buf_physaddr + + mapping = (dma_addr_t)RTE_ALIGN(mbuf->buf_iovaaddr + mbuf->data_off, adap->sge.fl_align); mapping |= buf_size_idx; diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index 0433f3bb1..249b46e57 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -79,7 +79,7 @@ (_fd)->opaque = QM_FD_CONTIG << DPAA_FD_FORMAT_SHIFT; \ (_fd)->opaque |= ((_mbuf)->data_off) << DPAA_FD_OFFSET_SHIFT; \ (_fd)->opaque |= (_mbuf)->pkt_len; \ - (_fd)->addr = (_mbuf)->buf_physaddr; \ + (_fd)->addr = (_mbuf)->buf_iovaaddr; \ (_fd)->bpid = _bpid; \ } while (0) @@ -516,7 +516,7 @@ dpaa_eth_mbuf_to_sg_fd(struct rte_mbuf *mbuf, sgt = temp->buf_addr + temp->data_off; fd->format = QM_FD_SG; - fd->addr = temp->buf_physaddr; + fd->addr = temp->buf_iovaaddr; fd->offset = temp->data_off; fd->bpid = bpid; fd->length20 = mbuf->pkt_len; @@ -525,7 +525,7 @@ dpaa_eth_mbuf_to_sg_fd(struct rte_mbuf *mbuf, sg_temp = &sgt[i++]; sg_temp->opaque = 0; sg_temp->val = 0; - sg_temp->addr = cur_seg->buf_physaddr; + sg_temp->addr = cur_seg->buf_iovaaddr; sg_temp->offset = cur_seg->data_off; sg_temp->length = cur_seg->data_len; if (RTE_MBUF_DIRECT(cur_seg)) { diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index a62c39875..6bf36611d 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1167,7 +1167,7 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count) rte_prefetch0(mbufs[((next_to_use + 4) & ring_mask)]); /* prepare physical address for DMA transaction */ - ebuf.paddr = mbuf->buf_physaddr + RTE_PKTMBUF_HEADROOM; + ebuf.paddr = mbuf->buf_iovaaddr + RTE_PKTMBUF_HEADROOM; ebuf.len = mbuf->buf_len - RTE_PKTMBUF_HEADROOM; /* pass resource to device */ rc = ena_com_add_single_rx_desc(rxq->ena_com_io_sq, @@ -1726,7 +1726,7 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, * consideration pushed header */ if (mbuf->data_len > ena_tx_ctx.header_len) { - ebuf->paddr = mbuf->buf_physaddr + + ebuf->paddr = mbuf->buf_iovaaddr + mbuf->data_off + ena_tx_ctx.header_len; ebuf->len = mbuf->data_len - ena_tx_ctx.header_len; @@ -1735,7 +1735,7 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, } while ((mbuf = mbuf->next) != NULL) { - ebuf->paddr = mbuf->buf_physaddr + mbuf->data_off; + ebuf->paddr = mbuf->buf_iovaaddr + mbuf->data_off; ebuf->len = mbuf->data_len; ebuf++; tx_info->num_of_bufs++; diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 521167063..8d74cce9b 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -315,7 +315,7 @@ enic_alloc_rx_queue_mbufs(struct enic *enic, struct vnic_rq *rq) } mb->data_off = RTE_PKTMBUF_HEADROOM; - dma_addr = (dma_addr_t)(mb->buf_physaddr + dma_addr = (dma_addr_t)(mb->buf_iovaaddr + RTE_PKTMBUF_HEADROOM); rq_enet_desc_enc(rqd, dma_addr, (rq->is_sop ? RQ_ENET_TYPE_ONLY_SOP diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c index a39172f14..95b1db1f9 100644 --- a/drivers/net/enic/enic_rxtx.c +++ b/drivers/net/enic/enic_rxtx.c @@ -386,7 +386,7 @@ enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, /* Push descriptor for newly allocated mbuf */ nmb->data_off = RTE_PKTMBUF_HEADROOM; - dma_addr = (dma_addr_t)(nmb->buf_physaddr + + dma_addr = (dma_addr_t)(nmb->buf_iovaaddr + RTE_PKTMBUF_HEADROOM); rq_enet_desc_enc(rqd_ptr, dma_addr, (rq->is_sop ? RQ_ENET_TYPE_ONLY_SOP @@ -578,7 +578,7 @@ uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, vlan_id = 0; vlan_tag_insert = 0; bus_addr = (dma_addr_t) - (tx_pkt->buf_physaddr + tx_pkt->data_off); + (tx_pkt->buf_iovaaddr + tx_pkt->data_off); descs = (struct wq_enet_desc *)wq->ring.descs; desc_p = descs + head_idx; @@ -630,7 +630,7 @@ uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, if (tx_pkt->next == NULL) eop = 1; desc_p = descs + head_idx; - bus_addr = (dma_addr_t)(tx_pkt->buf_physaddr + bus_addr = (dma_addr_t)(tx_pkt->buf_iovaaddr + tx_pkt->data_off); wq_enet_desc_enc((struct wq_enet_desc *) &desc_tmp, bus_addr, data_len, diff --git a/drivers/net/fm10k/fm10k.h b/drivers/net/fm10k/fm10k.h index 060982b10..eee075357 100644 --- a/drivers/net/fm10k/fm10k.h +++ b/drivers/net/fm10k/fm10k.h @@ -252,11 +252,11 @@ struct fm10k_txq_ops { }; #define MBUF_DMA_ADDR(mb) \ - ((uint64_t) ((mb)->buf_physaddr + (mb)->data_off)) + ((uint64_t) ((mb)->buf_iovaaddr + (mb)->data_off)) /* enforce 512B alignment on default Rx DMA addresses */ #define MBUF_DMA_ADDR_DEFAULT(mb) \ - ((uint64_t) RTE_ALIGN(((mb)->buf_physaddr + RTE_PKTMBUF_HEADROOM),\ + ((uint64_t) RTE_ALIGN(((mb)->buf_iovaaddr + RTE_PKTMBUF_HEADROOM),\ FM10K_RX_DATABUF_ALIGN)) static inline void fifo_reset(struct fifo *fifo, uint32_t len) diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c index d23bfe9b7..5d40479da 100644 --- a/drivers/net/fm10k/fm10k_rxtx_vec.c +++ b/drivers/net/fm10k/fm10k_rxtx_vec.c @@ -330,8 +330,8 @@ fm10k_rxq_rearm(struct fm10k_rx_queue *rxq) p1 = (uintptr_t)&mb1->rearm_data; *(uint64_t *)p1 = rxq->mbuf_initializer; - /* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */ - RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) != + /* load buf_addr(lo 64bit) and buf_iovaaddr(hi 64bit) */ + RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iovaaddr) != offsetof(struct rte_mbuf, buf_addr) + 8); vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr); vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr); diff --git a/drivers/net/i40e/i40e_rxtx_vec_altivec.c b/drivers/net/i40e/i40e_rxtx_vec_altivec.c index f4036ea28..242a479f0 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_altivec.c +++ b/drivers/net/i40e/i40e_rxtx_vec_altivec.c @@ -100,7 +100,7 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq) p1 = (uintptr_t)&mb1->rearm_data; *(uint64_t *)p1 = rxq->mbuf_initializer; - /* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */ + /* load buf_addr(lo 64bit) and buf_iovaaddr(hi 64bit) */ vaddr0 = vec_ld(0, (vector unsigned long *)&mb0->buf_addr); vaddr1 = vec_ld(0, (vector unsigned long *)&mb1->buf_addr); @@ -538,7 +538,7 @@ vtx1(volatile struct i40e_tx_desc *txdp, ((uint64_t)pkt->data_len << I40E_TXD_QW1_TX_BUF_SZ_SHIFT)); vector unsigned long descriptor = (vector unsigned long){ - pkt->buf_physaddr + pkt->data_off, high_qw}; + pkt->buf_iovaaddr + pkt->data_off, high_qw}; *(vector unsigned long *)txdp = descriptor; } diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c index 694e91f33..b858d9f1d 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_neon.c +++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c @@ -81,13 +81,13 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq) mb0 = rxep[0].mbuf; mb1 = rxep[1].mbuf; - paddr = mb0->buf_physaddr + RTE_PKTMBUF_HEADROOM; + paddr = mb0->buf_iovaaddr + RTE_PKTMBUF_HEADROOM; dma_addr0 = vdupq_n_u64(paddr); /* flush desc with pa dma_addr */ vst1q_u64((uint64_t *)&rxdp++->read, dma_addr0); - paddr = mb1->buf_physaddr + RTE_PKTMBUF_HEADROOM; + paddr = mb1->buf_iovaaddr + RTE_PKTMBUF_HEADROOM; dma_addr1 = vdupq_n_u64(paddr); vst1q_u64((uint64_t *)&rxdp++->read, dma_addr1); } @@ -515,7 +515,7 @@ vtx1(volatile struct i40e_tx_desc *txdp, ((uint64_t)flags << I40E_TXD_QW1_CMD_SHIFT) | ((uint64_t)pkt->data_len << I40E_TXD_QW1_TX_BUF_SZ_SHIFT)); - uint64x2_t descriptor = {pkt->buf_physaddr + pkt->data_off, high_qw}; + uint64x2_t descriptor = {pkt->buf_iovaaddr + pkt->data_off, high_qw}; vst1q_u64((uint64_t *)txdp, descriptor); } diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c index 779f14e53..35928ad79 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_sse.c +++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c @@ -86,8 +86,8 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq) mb0 = rxep[0].mbuf; mb1 = rxep[1].mbuf; - /* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */ - RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) != + /* load buf_addr(lo 64bit) and buf_iovaaddr(hi 64bit) */ + RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iovaaddr) != offsetof(struct rte_mbuf, buf_addr) + 8); vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr); vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr); @@ -549,7 +549,7 @@ vtx1(volatile struct i40e_tx_desc *txdp, ((uint64_t)pkt->data_len << I40E_TXD_QW1_TX_BUF_SZ_SHIFT)); __m128i descriptor = _mm_set_epi64x(high_qw, - pkt->buf_physaddr + pkt->data_off); + pkt->buf_iovaaddr + pkt->data_off); _mm_store_si128((__m128i *)txdp, descriptor); } diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c index 44de1caac..571f578ce 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c @@ -87,13 +87,13 @@ ixgbe_rxq_rearm(struct ixgbe_rx_queue *rxq) * Data to be rearmed is 6 bytes long. */ vst1_u8((uint8_t *)&mb0->rearm_data, p); - paddr = mb0->buf_physaddr + RTE_PKTMBUF_HEADROOM; + paddr = mb0->buf_iovaaddr + RTE_PKTMBUF_HEADROOM; dma_addr0 = vsetq_lane_u64(paddr, zero, 0); /* flush desc with pa dma_addr */ vst1q_u64((uint64_t *)&rxdp++->read, dma_addr0); vst1_u8((uint8_t *)&mb1->rearm_data, p); - paddr = mb1->buf_physaddr + RTE_PKTMBUF_HEADROOM; + paddr = mb1->buf_iovaaddr + RTE_PKTMBUF_HEADROOM; dma_addr1 = vsetq_lane_u64(paddr, zero, 0); vst1q_u64((uint64_t *)&rxdp++->read, dma_addr1); } @@ -414,7 +414,7 @@ vtx1(volatile union ixgbe_adv_tx_desc *txdp, struct rte_mbuf *pkt, uint64_t flags) { uint64x2_t descriptor = { - pkt->buf_physaddr + pkt->data_off, + pkt->buf_iovaaddr + pkt->data_off, (uint64_t)pkt->pkt_len << 46 | flags | pkt->data_len}; vst1q_u64((uint64_t *)&txdp->read, descriptor); diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c index e704a7f35..345010f4d 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c @@ -86,8 +86,8 @@ ixgbe_rxq_rearm(struct ixgbe_rx_queue *rxq) mb0 = rxep[0].mbuf; mb1 = rxep[1].mbuf; - /* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */ - RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) != + /* load buf_addr(lo 64bit) and buf_iovaaddr(hi 64bit) */ + RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iovaaddr) != offsetof(struct rte_mbuf, buf_addr) + 8); vaddr0 = _mm_loadu_si128((__m128i *)&(mb0->buf_addr)); vaddr1 = _mm_loadu_si128((__m128i *)&(mb1->buf_addr)); @@ -604,7 +604,7 @@ vtx1(volatile union ixgbe_adv_tx_desc *txdp, { __m128i descriptor = _mm_set_epi64x((uint64_t)pkt->pkt_len << 46 | flags | pkt->data_len, - pkt->buf_physaddr + pkt->data_off); + pkt->buf_iovaaddr + pkt->data_off); _mm_store_si128((__m128i *)&txdp->read, descriptor); } diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 0917b9c49..b38396507 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -106,7 +106,7 @@ static uint16_t nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, #define NFP_QCP_MAX_ADD 0x7f #define RTE_MBUF_DMA_ADDR_DEFAULT(mb) \ - (uint64_t)((mb)->buf_physaddr + RTE_PKTMBUF_HEADROOM) + (uint64_t)((mb)->buf_iovaaddr + RTE_PKTMBUF_HEADROOM) /* nfp_qcp_ptr - Read or Write Pointer of a queue */ enum nfp_qcp_ptr { diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 0ec54a9e4..03bd162a4 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -491,7 +491,7 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx) * VIRTIO_MBUF_DATA_DMA_ADDR in virtqueue.h for more information. */ if (!hw->virtio_user_dev) - vq->offset = offsetof(struct rte_mbuf, buf_physaddr); + vq->offset = offsetof(struct rte_mbuf, buf_iovaaddr); else { vq->vq_ring_mem = (uintptr_t)mz->addr; vq->offset = offsetof(struct rte_mbuf, buf_addr); diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h index d8e4364f5..70f51709d 100644 --- a/drivers/net/virtio/virtqueue.h +++ b/drivers/net/virtio/virtqueue.h @@ -80,7 +80,7 @@ struct rte_mbuf; #define VIRTIO_MBUF_ADDR(mb, vq) \ ((uint64_t)(*(uintptr_t *)((uintptr_t)(mb) + (vq)->offset))) #else -#define VIRTIO_MBUF_ADDR(mb, vq) ((mb)->buf_physaddr) +#define VIRTIO_MBUF_ADDR(mb, vq) ((mb)->buf_iovaaddr) #endif /** 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 bf0ac31e7..41b442546 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 @@ -120,7 +120,7 @@ struct rte_kni_fifo { */ struct rte_kni_mbuf { void *buf_addr __attribute__((__aligned__(RTE_CACHE_LINE_SIZE))); - uint64_t buf_physaddr; + uint64_t buf_iovaaddr; uint16_t data_off; /**< Start address of data in segment buffer. */ char pad1[2]; uint16_t nb_segs; /**< Number of segments. */ diff --git a/lib/librte_eal/linuxapp/kni/kni_net.c b/lib/librte_eal/linuxapp/kni/kni_net.c index db9f48989..7f986f482 100644 --- a/lib/librte_eal/linuxapp/kni/kni_net.c +++ b/lib/librte_eal/linuxapp/kni/kni_net.c @@ -69,7 +69,7 @@ pa2va(void *pa, struct rte_kni_mbuf *m) va = (void *)((unsigned long)pa + (unsigned long)m->buf_addr - - (unsigned long)m->buf_physaddr); + (unsigned long)m->buf_iovaaddr); return va; } @@ -77,7 +77,7 @@ pa2va(void *pa, struct rte_kni_mbuf *m) static void * kva2data_kva(struct rte_kni_mbuf *m) { - return phys_to_virt(m->buf_physaddr + m->data_off); + return phys_to_virt(m->buf_iovaaddr + m->data_off); } /* virtual address to physical address */ @@ -88,7 +88,7 @@ va2pa(void *va, struct rte_kni_mbuf *m) pa = (void *)((unsigned long)va - ((unsigned long)m->buf_addr - - (unsigned long)m->buf_physaddr)); + (unsigned long)m->buf_iovaaddr)); return pa; } diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c index 8c483c1f4..d12dde77d 100644 --- a/lib/librte_kni/rte_kni.c +++ b/lib/librte_kni/rte_kni.c @@ -456,7 +456,7 @@ va2pa(struct rte_mbuf *m) { return (void *)((unsigned long)m - ((unsigned long)m->buf_addr - - (unsigned long)m->buf_physaddr)); + (unsigned long)m->buf_iovaaddr)); } static void diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 0e18709d9..f9c7f0259 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -135,7 +135,7 @@ rte_pktmbuf_init(struct rte_mempool *mp, /* start of buffer is after mbuf structure and priv data */ m->priv_size = priv_size; m->buf_addr = (char *)m + mbuf_size; - m->buf_physaddr = rte_mempool_virt2phy(mp, m) + mbuf_size; + m->buf_iovaaddr = rte_mempool_virt2phy(mp, m) + mbuf_size; m->buf_len = (uint16_t)buf_len; /* keep some headroom between start of buffer and data */ @@ -212,7 +212,7 @@ rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header) /* generic checks */ if (m->pool == NULL) rte_panic("bad mbuf pool\n"); - if (m->buf_physaddr == 0) + if (m->buf_iovaaddr == 0) rte_panic("bad phys addr\n"); if (m->buf_addr == NULL) rte_panic("bad virt addr\n"); @@ -245,7 +245,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len) __rte_mbuf_sanity_check(m, 1); fprintf(f, "dump mbuf at %p, phys=%"PRIx64", buf_len=%u\n", - m, (uint64_t)m->buf_physaddr, (unsigned)m->buf_len); + m, (uint64_t)m->buf_iovaaddr, (unsigned)m->buf_len); fprintf(f, " pkt_len=%"PRIu32", ol_flags=%"PRIx64", nb_segs=%u, " "in_port=%u\n", m->pkt_len, m->ol_flags, (unsigned)m->nb_segs, (unsigned)m->port); diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 85e1880bf..b361f2861 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. */ - iova_addr_t buf_physaddr __rte_aligned(sizeof(iova_addr_t)); + iova_addr_t buf_iovaaddr __rte_aligned(sizeof(iova_addr_t)); /* next 8 bytes are initialised on RX descriptor rearm */ MARKER64 rearm_data; @@ -597,7 +597,7 @@ static inline uint16_t rte_pktmbuf_priv_size(struct rte_mempool *mp); static inline iova_addr_t rte_mbuf_data_dma_addr(const struct rte_mbuf *mb) { - return mb->buf_physaddr + mb->data_off; + return mb->buf_iovaaddr + mb->data_off; } /** @@ -615,7 +615,7 @@ rte_mbuf_data_dma_addr(const struct rte_mbuf *mb) static inline iova_addr_t rte_mbuf_data_dma_addr_default(const struct rte_mbuf *mb) { - return mb->buf_physaddr + RTE_PKTMBUF_HEADROOM; + return mb->buf_iovaaddr + RTE_PKTMBUF_HEADROOM; } /** @@ -806,7 +806,7 @@ rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header); * For standard needs, prefer rte_pktmbuf_alloc(). * * The caller can expect that the following fields of the mbuf structure - * are initialized: buf_addr, buf_physaddr, buf_len, refcnt=1, nb_segs=1, + * are initialized: buf_addr, buf_iovaaddr, buf_len, refcnt=1, nb_segs=1, * next=NULL, pool, priv_size. The other fields must be initialized * by the caller. * @@ -1216,7 +1216,7 @@ static inline void rte_pktmbuf_attach(struct rte_mbuf *mi, struct rte_mbuf *m) rte_mbuf_refcnt_update(md, 1); mi->priv_size = m->priv_size; - mi->buf_physaddr = m->buf_physaddr; + mi->buf_iovaaddr = m->buf_iovaaddr; mi->buf_addr = m->buf_addr; mi->buf_len = m->buf_len; @@ -1264,7 +1264,7 @@ static inline void rte_pktmbuf_detach(struct rte_mbuf *m) m->priv_size = priv_size; m->buf_addr = (char *)m + mbuf_size; - m->buf_physaddr = rte_mempool_virt2phy(mp, m) + mbuf_size; + m->buf_iovaaddr = rte_mempool_virt2phy(mp, m) + mbuf_size; m->buf_len = (uint16_t)buf_len; rte_pktmbuf_reset_headroom(m); m->data_len = 0; @@ -1535,7 +1535,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) \ - (iova_addr_t)((m)->buf_physaddr + (m)->data_off + (o)) + (iova_addr_t)((m)->buf_iovaaddr + (m)->data_off + (o)) /** * A macro that returns the physical address that points to the start of the diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index b75c93cf1..73007a757 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -978,7 +978,7 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq, cur->data_len = cpy_len; cur->data_off = 0; cur->buf_addr = (void *)(uintptr_t)desc_addr; - cur->buf_physaddr = hpa; + cur->buf_iovaaddr = hpa; /* * In zero copy mode, one mbuf can only reference data diff --git a/test/test/test_mbuf.c b/test/test/test_mbuf.c index 3396b4a93..326b75dca 100644 --- a/test/test/test_mbuf.c +++ b/test/test/test_mbuf.c @@ -907,7 +907,7 @@ test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool) } badbuf = *buf; - badbuf.buf_physaddr = 0; + badbuf.buf_iovaaddr = 0; if (verify_mbuf_check_panics(&badbuf)) { printf("Error with bad-physaddr mbuf test\n"); return -1; -- 2.14.1