From patchwork Mon Aug 29 15:16:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shijith Thotton X-Patchwork-Id: 115604 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 70462A0542; Mon, 29 Aug 2022 17:17:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DDC7D41148; Mon, 29 Aug 2022 17:17:35 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id B1AF641148 for ; Mon, 29 Aug 2022 17:17:32 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27T7fUrI010634; Mon, 29 Aug 2022 08:17:28 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=vzoSUO7MDnMe2gWaDMhq3mZV/+QUIklczNOtQk6tsrE=; b=GIvwUbsWbofmHEbD3YN3H20N0JEFdPPOvhJ5Tgq4AMWAb9qfy4X9BLNyz0vEh/ycogJ2 y+LAkLK0EdRxjW9hch8HzMPGY2Hf8jA1GF1Nrb58u4vroAnoq/gHklVa3PKKW9O4rt5n oYShW1SnpuqnHTjQzIYB5bP9sm6y+vUJVBIrIKfCbZStOMtSUPx6t/TS+ipKVLNH/dk+ yGnfk+R2bWzeqGd4x4OmO+4eqc49vvTnQhl7MkIIeeIg4thAq8VjfcOCuZaNB7ss+b5z ysIGbBkIqERjiItAfn1XvWmPuPz+zGekcn0TvYb8+05TtIaNkPgjOBapdFs+FktAFmKv LQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3j7jsn7tyt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 29 Aug 2022 08:17:28 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 29 Aug 2022 08:17:26 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 29 Aug 2022 08:17:26 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id 987353F705B; Mon, 29 Aug 2022 08:17:21 -0700 (PDT) From: Shijith Thotton To: CC: , Shijith Thotton , , , , , , , , Nicolas Chautru , Ciara Power , "Konstantin Ananyev" , Chengwen Feng , Kevin Laatz , Reshma Pattan , Maxime Coquelin , Chenbo Xia Subject: [PATCH v1 1/4] build: add meson option to configure IOVA mode as VA Date: Mon, 29 Aug 2022 20:46:22 +0530 Message-ID: <20220829151626.2101336-2-sthotton@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: i1TkTdt21YkS4srQPp381PP_c2imfznW X-Proofpoint-GUID: i1TkTdt21YkS4srQPp381PP_c2imfznW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-29_07,2022-08-25_01,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org IOVA mode in DPDK is either PA or VA. The new build option iova_as_va configures the mode to VA at compile time and prevents setting it to PA at runtime. For now, all drivers which are not always enabled are disabled with this option. Supported driver can set the flag pmd_iova_as_va in its build file to enable build. mbuf structure holds the physical (PA) and virtual address (VA) of a buffer. if IOVA mode is set to VA, PA is redundant as it is the same as VA. So PA field need not be updated and marked invalid if the build is configured to use only VA. Signed-off-by: Shijith Thotton --- app/test-bbdev/test_bbdev_perf.c | 2 +- app/test-crypto-perf/cperf_test_common.c | 5 +-- app/test/test_bpf.c | 2 +- app/test/test_dmadev.c | 33 ++++++--------- app/test/test_mbuf.c | 12 +++--- app/test/test_pcapng.c | 2 +- config/meson.build | 3 ++ drivers/meson.build | 6 +++ lib/eal/include/rte_common.h | 17 ++++++++ lib/eal/linux/eal.c | 7 +++ lib/mbuf/rte_mbuf.c | 8 ++-- lib/mbuf/rte_mbuf.h | 18 +++++--- lib/mbuf/rte_mbuf_core.h | 10 +++++ lib/vhost/vhost.h | 2 +- lib/vhost/vhost_crypto.c | 54 ++++++++++++++++++------ meson_options.txt | 2 + 16 files changed, 129 insertions(+), 54 deletions(-) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index 8fab52d821..f6aa25b67d 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -1001,7 +1001,7 @@ init_op_data_objs(struct rte_bbdev_op_data *bufs, seg->length); memcpy(data, seg->addr, seg->length); m_head->buf_addr = data; - m_head->buf_iova = rte_malloc_virt2iova(data); + rte_mbuf_iova_set(m_head, rte_malloc_virt2iova(data)); m_head->data_off = 0; m_head->data_len = seg->length; } else { diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c index 00aadc9a47..27646cd619 100644 --- a/app/test-crypto-perf/cperf_test_common.c +++ b/app/test-crypto-perf/cperf_test_common.c @@ -26,8 +26,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_iova = rte_mempool_virt2iova(obj) + - mbuf_offset + mbuf_hdr_size; + rte_mbuf_iova_set(m, rte_mempool_virt2iova(obj) + mbuf_offset + mbuf_hdr_size); m->buf_len = segment_sz; m->data_len = data_len; m->pkt_len = data_len; @@ -58,7 +57,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_iova = next_seg_phys_addr; + rte_mbuf_iova_set(m, next_seg_phys_addr); next_seg_phys_addr += mbuf_hdr_size + segment_sz; m->buf_len = segment_sz; m->data_len = data_len; diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c index 97f500809e..f5af5e8a3f 100644 --- a/app/test/test_bpf.c +++ b/app/test/test_bpf.c @@ -2600,7 +2600,7 @@ dummy_mbuf_prep(struct rte_mbuf *mb, uint8_t buf[], uint32_t buf_len, uint8_t *db; mb->buf_addr = buf; - mb->buf_iova = (uintptr_t)buf; + rte_mbuf_iova_set(mb, (uintptr_t)buf); mb->buf_len = buf_len; rte_mbuf_refcnt_set(mb, 1); diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c index 9e8e101f40..8306947eda 100644 --- a/app/test/test_dmadev.c +++ b/app/test/test_dmadev.c @@ -110,8 +110,8 @@ do_multi_copies(int16_t dev_id, uint16_t vchan, for (j = 0; j < COPY_LEN/sizeof(uint64_t); j++) src_data[j] = rte_rand(); - if (rte_dma_copy(dev_id, vchan, srcs[i]->buf_iova + srcs[i]->data_off, - dsts[i]->buf_iova + dsts[i]->data_off, COPY_LEN, 0) != id_count++) + if (rte_dma_copy(dev_id, vchan, rte_pktmbuf_iova_offset(srcs[i], 0), + rte_pktmbuf_iova_offset(dsts[i], 0), COPY_LEN, 0) != id_count++) ERR_RETURN("Error with rte_dma_copy for buffer %u\n", i); } rte_dma_submit(dev_id, vchan); @@ -317,9 +317,8 @@ test_failure_in_full_burst(int16_t dev_id, uint16_t vchan, bool fence, rte_dma_stats_get(dev_id, vchan, &baseline); /* get a baseline set of stats */ for (i = 0; i < COMP_BURST_SZ; i++) { int id = rte_dma_copy(dev_id, vchan, - (i == fail_idx ? 0 : (srcs[i]->buf_iova + srcs[i]->data_off)), - dsts[i]->buf_iova + dsts[i]->data_off, - COPY_LEN, OPT_FENCE(i)); + (i == fail_idx ? 0 : rte_pktmbuf_iova_offset(srcs[i], 0)), + rte_pktmbuf_iova_offset(dsts[i], 0), COPY_LEN, OPT_FENCE(i)); if (id < 0) ERR_RETURN("Error with rte_dma_copy for buffer %u\n", i); if (i == fail_idx) @@ -407,9 +406,8 @@ test_individual_status_query_with_failure(int16_t dev_id, uint16_t vchan, bool f for (j = 0; j < COMP_BURST_SZ; j++) { int id = rte_dma_copy(dev_id, vchan, - (j == fail_idx ? 0 : (srcs[j]->buf_iova + srcs[j]->data_off)), - dsts[j]->buf_iova + dsts[j]->data_off, - COPY_LEN, OPT_FENCE(j)); + (j == fail_idx ? 0 : rte_pktmbuf_iova_offset(srcs[j], 0)), + rte_pktmbuf_iova_offset(dsts[j], 0), COPY_LEN, OPT_FENCE(j)); if (id < 0) ERR_RETURN("Error with rte_dma_copy for buffer %u\n", j); if (j == fail_idx) @@ -470,9 +468,8 @@ test_single_item_status_query_with_failure(int16_t dev_id, uint16_t vchan, for (j = 0; j < COMP_BURST_SZ; j++) { int id = rte_dma_copy(dev_id, vchan, - (j == fail_idx ? 0 : (srcs[j]->buf_iova + srcs[j]->data_off)), - dsts[j]->buf_iova + dsts[j]->data_off, - COPY_LEN, 0); + (j == fail_idx ? 0 : rte_pktmbuf_iova_offset(srcs[j], 0)), + rte_pktmbuf_iova_offset(dsts[j], 0), COPY_LEN, 0); if (id < 0) ERR_RETURN("Error with rte_dma_copy for buffer %u\n", j); if (j == fail_idx) @@ -529,15 +526,14 @@ test_multi_failure(int16_t dev_id, uint16_t vchan, struct rte_mbuf **srcs, struc /* enqueue and gather completions in one go */ for (j = 0; j < COMP_BURST_SZ; j++) { - uintptr_t src = srcs[j]->buf_iova + srcs[j]->data_off; + uintptr_t src = rte_pktmbuf_iova_offset(srcs[j], 0); /* set up for failure if the current index is anywhere is the fails array */ for (i = 0; i < num_fail; i++) if (j == fail[i]) src = 0; - int id = rte_dma_copy(dev_id, vchan, - src, dsts[j]->buf_iova + dsts[j]->data_off, - COPY_LEN, 0); + int id = rte_dma_copy(dev_id, vchan, src, rte_pktmbuf_iova_offset(dsts[j], 0), + COPY_LEN, 0); if (id < 0) ERR_RETURN("Error with rte_dma_copy for buffer %u\n", j); } @@ -565,15 +561,14 @@ test_multi_failure(int16_t dev_id, uint16_t vchan, struct rte_mbuf **srcs, struc /* enqueue and gather completions in bursts, but getting errors one at a time */ for (j = 0; j < COMP_BURST_SZ; j++) { - uintptr_t src = srcs[j]->buf_iova + srcs[j]->data_off; + uintptr_t src = rte_pktmbuf_iova_offset(srcs[j], 0); /* set up for failure if the current index is anywhere is the fails array */ for (i = 0; i < num_fail; i++) if (j == fail[i]) src = 0; - int id = rte_dma_copy(dev_id, vchan, - src, dsts[j]->buf_iova + dsts[j]->data_off, - COPY_LEN, 0); + int id = rte_dma_copy(dev_id, vchan, src, rte_pktmbuf_iova_offset(dsts[j], 0), + COPY_LEN, 0); if (id < 0) ERR_RETURN("Error with rte_dma_copy for buffer %u\n", j); } diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index e09b2549ca..992b8c64ab 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -1232,11 +1232,13 @@ test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool) return -1; } - badbuf = *buf; - badbuf.buf_iova = 0; - if (verify_mbuf_check_panics(&badbuf)) { - printf("Error with bad-physaddr mbuf test\n"); - return -1; + if (!rte_is_iova_as_va_build()) { + badbuf = *buf; + rte_mbuf_iova_set(&badbuf, 0); + if (verify_mbuf_check_panics(&badbuf)) { + printf("Error with bad-physaddr mbuf test\n"); + return -1; + } } badbuf = *buf; diff --git a/app/test/test_pcapng.c b/app/test/test_pcapng.c index 320dacea34..abbf00f6da 100644 --- a/app/test/test_pcapng.c +++ b/app/test/test_pcapng.c @@ -40,7 +40,7 @@ dummy_mbuf_prep(struct rte_mbuf *mb, uint8_t buf[], uint32_t buf_len, uint8_t *db; mb->buf_addr = buf; - mb->buf_iova = (uintptr_t)buf; + rte_mbuf_iova_set(mb, (uintptr_t)buf); mb->buf_len = buf_len; rte_mbuf_refcnt_set(mb, 1); diff --git a/config/meson.build b/config/meson.build index 7f7b6c92fd..1ff1cd774b 100644 --- a/config/meson.build +++ b/config/meson.build @@ -309,6 +309,9 @@ endif if get_option('mbuf_refcnt_atomic') dpdk_conf.set('RTE_MBUF_REFCNT_ATOMIC', true) endif +if get_option('iova_as_va') + dpdk_conf.set('RTE_IOVA_AS_VA', true) +endif compile_time_cpuflags = [] subdir(arch_subdir) diff --git a/drivers/meson.build b/drivers/meson.build index b22c2adda7..469e60f1fa 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -103,6 +103,7 @@ foreach subpath:subdirs ext_deps = [] pkgconfig_extra_libs = [] testpmd_sources = [] + pmd_iova_as_va = false if not enable_drivers.contains(drv_path) build = false @@ -120,6 +121,11 @@ foreach subpath:subdirs # pull in driver directory which should update all the local variables subdir(drv_path) + if dpdk_conf.has('RTE_IOVA_AS_VA') and not pmd_iova_as_va and not always_enable.contains(drv_path) + build = false + reason = 'driver does not support IOVA as VA mode' + endif + # get dependency objs from strings shared_deps = ext_deps static_deps = ext_deps diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h index a96cc2a138..0010ad7c7d 100644 --- a/lib/eal/include/rte_common.h +++ b/lib/eal/include/rte_common.h @@ -921,6 +921,23 @@ __rte_noreturn void rte_exit(int exit_code, const char *format, ...) __rte_format_printf(2, 3); +/** + * Check if build is configured to use IOVA as VA. + * + * @return + * 1 if true, 0 otherwise + * + */ +static inline int +rte_is_iova_as_va_build(void) +{ +#ifdef RTE_IOVA_AS_VA + return 1; +#else + return 0; +#endif +} + #ifdef __cplusplus } #endif diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c index 37d29643a5..a5bcbd7aa9 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -1127,6 +1127,13 @@ rte_eal_init(int argc, char **argv) return -1; } + if (rte_eal_iova_mode() == RTE_IOVA_PA && rte_is_iova_as_va_build()) { + rte_eal_init_alert( + "Cannot use IOVA as 'PA' since build is configured to use only 'VA'"); + rte_errno = EINVAL; + return -1; + } + RTE_LOG(INFO, EAL, "Selected IOVA mode '%s'\n", rte_eal_iova_mode() == RTE_IOVA_PA ? "PA" : "VA"); diff --git a/lib/mbuf/rte_mbuf.c b/lib/mbuf/rte_mbuf.c index a2307cebe6..7343307c57 100644 --- a/lib/mbuf/rte_mbuf.c +++ b/lib/mbuf/rte_mbuf.c @@ -89,7 +89,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_iova = rte_mempool_virt2iova(m) + mbuf_size; + rte_mbuf_iova_set(m, rte_mempool_virt2iova(m) + mbuf_size); m->buf_len = (uint16_t)buf_len; /* keep some headroom between start of buffer and data */ @@ -187,8 +187,8 @@ __rte_pktmbuf_init_extmem(struct rte_mempool *mp, RTE_ASSERT(ctx->off + ext_mem->elt_size <= ext_mem->buf_len); m->buf_addr = RTE_PTR_ADD(ext_mem->buf_ptr, ctx->off); - m->buf_iova = ext_mem->buf_iova == RTE_BAD_IOVA ? - RTE_BAD_IOVA : (ext_mem->buf_iova + ctx->off); + rte_mbuf_iova_set(m, ext_mem->buf_iova == RTE_BAD_IOVA ? RTE_BAD_IOVA : + (ext_mem->buf_iova + ctx->off)); ctx->off += ext_mem->elt_size; if (ctx->off + ext_mem->elt_size > ext_mem->buf_len) { @@ -388,7 +388,7 @@ int rte_mbuf_check(const struct rte_mbuf *m, int is_header, *reason = "bad mbuf pool"; return -1; } - if (m->buf_iova == 0) { + if (m->buf_iova == 0 && !rte_is_iova_as_va_build()) { *reason = "bad IO addr"; return -1; } diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h index 9811e8c760..5c86579220 100644 --- a/lib/mbuf/rte_mbuf.h +++ b/lib/mbuf/rte_mbuf.h @@ -146,7 +146,7 @@ static inline uint16_t rte_pktmbuf_priv_size(struct rte_mempool *mp); static inline rte_iova_t rte_mbuf_data_iova(const struct rte_mbuf *mb) { - return mb->buf_iova + mb->data_off; + return (rte_is_iova_as_va_build() ? (uint64_t)mb->buf_addr : mb->buf_iova) + mb->data_off; } /** @@ -164,7 +164,8 @@ rte_mbuf_data_iova(const struct rte_mbuf *mb) static inline rte_iova_t rte_mbuf_data_iova_default(const struct rte_mbuf *mb) { - return mb->buf_iova + RTE_PKTMBUF_HEADROOM; + return (rte_is_iova_as_va_build() ? (uint64_t)mb->buf_addr : mb->buf_iova) + + RTE_PKTMBUF_HEADROOM; } /** @@ -469,6 +470,13 @@ rte_mbuf_ext_refcnt_update(struct rte_mbuf_ext_shared_info *shinfo, __ATOMIC_ACQ_REL); } +static inline void +rte_mbuf_iova_set(struct rte_mbuf *m, rte_iova_t iova) +{ + if (!rte_is_iova_as_va_build()) + m->buf_iova = iova; +} + /** Mbuf prefetch */ #define RTE_MBUF_PREFETCH_TO_FREE(m) do { \ if ((m) != NULL) \ @@ -1056,7 +1064,7 @@ rte_pktmbuf_attach_extbuf(struct rte_mbuf *m, void *buf_addr, RTE_ASSERT(shinfo->free_cb != NULL); m->buf_addr = buf_addr; - m->buf_iova = buf_iova; + rte_mbuf_iova_set(m, buf_iova); m->buf_len = buf_len; m->data_len = 0; @@ -1143,7 +1151,7 @@ static inline void rte_pktmbuf_attach(struct rte_mbuf *mi, struct rte_mbuf *m) mi->data_off = m->data_off; mi->data_len = m->data_len; - mi->buf_iova = m->buf_iova; + rte_mbuf_iova_set(mi, m->buf_iova); mi->buf_addr = m->buf_addr; mi->buf_len = m->buf_len; @@ -1245,7 +1253,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_iova = rte_mempool_virt2iova(m) + mbuf_size; + rte_mbuf_iova_set(m, rte_mempool_virt2iova(m) + mbuf_size); m->buf_len = (uint16_t)buf_len; rte_pktmbuf_reset_headroom(m); m->data_len = 0; diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h index 3d6ddd6773..81cb07c2e4 100644 --- a/lib/mbuf/rte_mbuf_core.h +++ b/lib/mbuf/rte_mbuf_core.h @@ -581,6 +581,8 @@ struct rte_mbuf { void *buf_addr; /**< Virtual address of segment buffer. */ /** * Physical address of segment buffer. + * This field is invalid if the build is configured to use only + * virtual address as IOVA (i.e. RTE_IOVA_AS_VA is defined). * Force alignment to 8-bytes, so as to ensure we have the exact * same mbuf cacheline0 layout for 32-bit and 64-bit. This makes * working on vector drivers easier. @@ -848,8 +850,12 @@ struct rte_mbuf_ext_shared_info { * @param o * The offset into the data to calculate address from. */ +#ifdef RTE_IOVA_AS_VA +#define rte_pktmbuf_iova_offset(m, o) rte_pktmbuf_mtod_offset(m, rte_iova_t, o) +#else #define rte_pktmbuf_iova_offset(m, o) \ (rte_iova_t)((m)->buf_iova + (m)->data_off + (o)) +#endif /** * A macro that returns the IO address that points to the start of the @@ -858,7 +864,11 @@ struct rte_mbuf_ext_shared_info { * @param m * The packet mbuf. */ +#ifdef RTE_IOVA_AS_VA +#define rte_pktmbuf_iova(m) rte_pktmbuf_mtod(m, rte_iova_t) +#else #define rte_pktmbuf_iova(m) rte_pktmbuf_iova_offset(m, 0) +#endif #ifdef __cplusplus } diff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h index 40fac3b7c6..e8f7c76c0c 100644 --- a/lib/vhost/vhost.h +++ b/lib/vhost/vhost.h @@ -962,7 +962,7 @@ restore_mbuf(struct rte_mbuf *m) /* start of buffer is after mbuf structure and priv data */ m->buf_addr = (char *)m + mbuf_size; - m->buf_iova = rte_mempool_virt2iova(m) + mbuf_size; + rte_mbuf_iova_set(m, rte_mempool_virt2iova(m) + mbuf_size); m = m->next; } } diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c index 54946f46d9..56354152a6 100644 --- a/lib/vhost/vhost_crypto.c +++ b/lib/vhost/vhost_crypto.c @@ -823,11 +823,17 @@ prepare_sym_cipher_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op, switch (vcrypto->option) { case RTE_VHOST_CRYPTO_ZERO_COPY_ENABLE: m_src->data_len = cipher->para.src_data_len; - m_src->buf_iova = gpa_to_hpa(vcrypto->dev, desc->addr, - cipher->para.src_data_len); + if (!rte_is_iova_as_va_build()) { + m_src->buf_iova = + gpa_to_hpa(vcrypto->dev, desc->addr, cipher->para.src_data_len); + if (unlikely(m_src->buf_iova == 0)) { + VC_LOG_ERR("zero_copy may fail due to cross page data"); + ret = VIRTIO_CRYPTO_ERR; + goto error_exit; + } + } m_src->buf_addr = get_data_ptr(vc_req, desc, VHOST_ACCESS_RO); - if (unlikely(m_src->buf_iova == 0 || - m_src->buf_addr == NULL)) { + if (unlikely(m_src->buf_addr == NULL)) { VC_LOG_ERR("zero_copy may fail due to cross page data"); ret = VIRTIO_CRYPTO_ERR; goto error_exit; @@ -867,10 +873,17 @@ prepare_sym_cipher_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op, switch (vcrypto->option) { case RTE_VHOST_CRYPTO_ZERO_COPY_ENABLE: - m_dst->buf_iova = gpa_to_hpa(vcrypto->dev, - desc->addr, cipher->para.dst_data_len); + if (!rte_is_iova_as_va_build()) { + m_dst->buf_iova = + gpa_to_hpa(vcrypto->dev, desc->addr, cipher->para.dst_data_len); + if (unlikely(m_dst->buf_iova == 0)) { + VC_LOG_ERR("zero_copy may fail due to cross page data"); + ret = VIRTIO_CRYPTO_ERR; + goto error_exit; + } + } m_dst->buf_addr = get_data_ptr(vc_req, desc, VHOST_ACCESS_RW); - if (unlikely(m_dst->buf_iova == 0 || m_dst->buf_addr == NULL)) { + if (unlikely(m_dst->buf_addr == NULL)) { VC_LOG_ERR("zero_copy may fail due to cross page data"); ret = VIRTIO_CRYPTO_ERR; goto error_exit; @@ -980,11 +993,17 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op, case RTE_VHOST_CRYPTO_ZERO_COPY_ENABLE: m_src->data_len = chain->para.src_data_len; m_dst->data_len = chain->para.dst_data_len; - - m_src->buf_iova = gpa_to_hpa(vcrypto->dev, desc->addr, - chain->para.src_data_len); + if (!rte_is_iova_as_va_build()) { + m_src->buf_iova = + gpa_to_hpa(vcrypto->dev, desc->addr, chain->para.src_data_len); + if (unlikely(m_src->buf_iova == 0)) { + VC_LOG_ERR("zero_copy may fail due to cross page data"); + ret = VIRTIO_CRYPTO_ERR; + goto error_exit; + } + } m_src->buf_addr = get_data_ptr(vc_req, desc, VHOST_ACCESS_RO); - if (unlikely(m_src->buf_iova == 0 || m_src->buf_addr == NULL)) { + if (unlikely(m_src->buf_addr == NULL)) { VC_LOG_ERR("zero_copy may fail due to cross page data"); ret = VIRTIO_CRYPTO_ERR; goto error_exit; @@ -1024,10 +1043,17 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op, switch (vcrypto->option) { case RTE_VHOST_CRYPTO_ZERO_COPY_ENABLE: - m_dst->buf_iova = gpa_to_hpa(vcrypto->dev, - desc->addr, chain->para.dst_data_len); + if (!rte_is_iova_as_va_build()) { + m_dst->buf_iova = + gpa_to_hpa(vcrypto->dev, desc->addr, chain->para.dst_data_len); + if (unlikely(m_dst->buf_iova == 0)) { + VC_LOG_ERR("zero_copy may fail due to cross page data"); + ret = VIRTIO_CRYPTO_ERR; + goto error_exit; + } + } m_dst->buf_addr = get_data_ptr(vc_req, desc, VHOST_ACCESS_RW); - if (unlikely(m_dst->buf_iova == 0 || m_dst->buf_addr == NULL)) { + if (unlikely(m_dst->buf_addr == NULL)) { VC_LOG_ERR("zero_copy may fail due to cross page data"); ret = VIRTIO_CRYPTO_ERR; goto error_exit; diff --git a/meson_options.txt b/meson_options.txt index 7c220ad68d..f0fa6cf04c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -44,6 +44,8 @@ option('platform', type: 'string', value: 'native', description: 'Platform to build, either "native", "generic" or a SoC. Please refer to the Linux build guide for more information.') option('enable_trace_fp', type: 'boolean', value: false, description: 'enable fast path trace points.') +option('iova_as_va', type: 'boolean', value: false, description: + 'Build which only supports IOVA as VA mode. Unsupported drivers are disabled.') option('tests', type: 'boolean', value: true, description: 'build unit tests') option('use_hpet', type: 'boolean', value: false, description: From patchwork Mon Aug 29 15:16:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shijith Thotton X-Patchwork-Id: 115605 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8915DA0542; Mon, 29 Aug 2022 17:17:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 509294282F; Mon, 29 Aug 2022 17:17:39 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id C87314003C for ; Mon, 29 Aug 2022 17:17:34 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27T7fUrJ010634; Mon, 29 Aug 2022 08:17:32 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=gCTtDTWcUaOcCDYgHl29AwWuOsmn3Z/ZKP9P/p2JEVA=; b=BVR9NQ8xmPRrUD6Dvb6YtIVDuYMGRH0Juot0Q50mb6Uh9FJaArqWYBdsDEZG2S288y1s 3A80LAyPzb9O6bGoYKtI8mZ63Yv1cOLh9GUZ1DoWoieQcj1zdZQoZnZMQscLu2uagw0Q 8oxtbAorkdMkutqIc2K4bOe66cVRR27i5mRHQxNlb+Q5+OP/9x5TFedSQAOyaMcRJRko x5wRjHwHhf0CWv2sVfHohv6nCABADXbvWqp+6iuBMbG1/wNWDeyVYVjQ8xhR3v2TmFw+ bng4hFSOYAmx9+ciLulmz4YbjzhIsEaCjgOT2fjcsmaYpsi5wqALLt1GtBmOHsZPD1M6 Ww== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3j7jsn7u03-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 29 Aug 2022 08:17:31 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 29 Aug 2022 08:17:29 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 29 Aug 2022 08:17:29 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id 098F03F7068; Mon, 29 Aug 2022 08:17:26 -0700 (PDT) From: Shijith Thotton To: CC: , Shijith Thotton , , , , , , , Subject: [PATCH v1 2/4] mbuf: add second dynamic field member for VA only build Date: Mon, 29 Aug 2022 20:46:23 +0530 Message-ID: <20220829151626.2101336-3-sthotton@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: pJlp0RtJM9K-sqVanUtiKywy2p_sqoEq X-Proofpoint-GUID: pJlp0RtJM9K-sqVanUtiKywy2p_sqoEq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-29_07,2022-08-25_01,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org mbuf physical address field is not used in builds which only uses VA. It is used to expand the dynamic field area. Signed-off-by: Shijith Thotton --- lib/mbuf/rte_mbuf_core.h | 26 +++++++++++++++++--------- lib/mbuf/rte_mbuf_dyn.c | 2 ++ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h index 81cb07c2e4..98ce62fd6a 100644 --- a/lib/mbuf/rte_mbuf_core.h +++ b/lib/mbuf/rte_mbuf_core.h @@ -579,15 +579,23 @@ struct rte_mbuf { RTE_MARKER cacheline0; void *buf_addr; /**< Virtual address of segment buffer. */ - /** - * Physical address of segment buffer. - * This field is invalid if the build is configured to use only - * virtual address as IOVA (i.e. RTE_IOVA_AS_VA is defined). - * Force alignment to 8-bytes, so as to ensure we have the exact - * same mbuf cacheline0 layout for 32-bit and 64-bit. This makes - * working on vector drivers easier. - */ - rte_iova_t buf_iova __rte_aligned(sizeof(rte_iova_t)); + RTE_STD_C11 + union { + /** + * Physical address of segment buffer. + * This field is invalid if the build is configured to use only + * virtual address as IOVA (i.e. RTE_IOVA_AS_VA is defined). + * Force alignment to 8-bytes, so as to ensure we have the exact + * same mbuf cacheline0 layout for 32-bit and 64-bit. This makes + * working on vector drivers easier. + */ + rte_iova_t buf_iova __rte_aligned(sizeof(rte_iova_t)); + /** + * Reserved for dynamic field in builds where physical address + * field is invalid. + */ + uint64_t dynfield2; + }; /* next 8 bytes are initialised on RX descriptor rearm */ RTE_MARKER64 rearm_data; diff --git a/lib/mbuf/rte_mbuf_dyn.c b/lib/mbuf/rte_mbuf_dyn.c index 4ae79383b5..0813d5fb34 100644 --- a/lib/mbuf/rte_mbuf_dyn.c +++ b/lib/mbuf/rte_mbuf_dyn.c @@ -128,6 +128,8 @@ init_shared_mem(void) */ memset(shm, 0, sizeof(*shm)); mark_free(dynfield1); + if (rte_is_iova_as_va_build()) + mark_free(dynfield2); /* init free_flags */ for (mask = RTE_MBUF_F_FIRST_FREE; mask <= RTE_MBUF_F_LAST_FREE; mask <<= 1) From patchwork Mon Aug 29 15:16:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shijith Thotton X-Patchwork-Id: 115606 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 50CB6A0542; Mon, 29 Aug 2022 17:17:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 21A224281B; Mon, 29 Aug 2022 17:17:43 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id E36184280C for ; Mon, 29 Aug 2022 17:17:41 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27T7fUrT010634; Mon, 29 Aug 2022 08:17:39 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=myL1h540zQsDBQCpezy+31Wk6+WvbEE4uDBzQIUTMSQ=; b=Uz5sUvvQSRKKcIPg8iwFWqmf1Pyp7VkyYJrUQS5fRZPYqpFrACgHxJyoNCASKxzGNsO+ u4l6Z5A5LUEVO9ojNrfuF3+Dx3PR6CLrN4eNga9RnK5BIHUqfRECXOW21/0up/irsu+w kfrB0uQCG09Xmt5+iM7oGkSu5wlcmmz5grMk7666PUmwTXOOso1s3uwjby9AoqL/ah9u vEnbVCd7WAcFZbZ2tlfXf111bUeK/dZ6gnPwUqP5AhrlD0HmoPHSnib1PP8tCgSPjjke 7ld6fMJ7E/WIvcaJ5BBfKJKu+2X+9ZcJP2c3dYVb5OkJX6JGFTSs0J33bcd7qSujd4m5 zQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3j7jsn7u23-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 29 Aug 2022 08:17:38 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 29 Aug 2022 08:17:36 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 29 Aug 2022 08:17:36 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id 8C4813F705B; Mon, 29 Aug 2022 08:17:30 -0700 (PDT) From: Shijith Thotton To: CC: , Shijith Thotton , , , , , , , , Jan Viktorin , Ruifeng Wang , "Nithin Dabilpuram" , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Ankur Dwivedi , Anoob Joseph , Tejasree Kondoj , "Radha Mohan Chintakuntla" , Veerasenareddy Burru , Ashwin Sekhar T K , Jakub Palider , Tomasz Duszynski Subject: [PATCH v1 3/4] drivers: mark Marvell cnxk PMDs work with IOVA as VA Date: Mon, 29 Aug 2022 20:46:24 +0530 Message-ID: <20220829151626.2101336-4-sthotton@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 2Zi1htcocmtc6o5iMdi0PcK6XSZ8UDT3 X-Proofpoint-GUID: 2Zi1htcocmtc6o5iMdi0PcK6XSZ8UDT3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-29_07,2022-08-25_01,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Enabled the flag pmd_iova_as_va in cnxk driver build files as they work with IOVA as VA. Updated cn9k and cn10k soc build configurations to enable the IOVA as VA build by default. Signed-off-by: Shijith Thotton --- config/arm/meson.build | 8 ++++++-- drivers/common/cnxk/meson.build | 1 + drivers/crypto/cnxk/cn10k_ipsec_la_ops.h | 4 ++-- drivers/crypto/cnxk/cn9k_ipsec_la_ops.h | 2 +- drivers/crypto/cnxk/meson.build | 2 ++ drivers/dma/cnxk/meson.build | 1 + drivers/event/cnxk/meson.build | 1 + drivers/mempool/cnxk/meson.build | 1 + drivers/net/cnxk/cnxk_ethdev.h | 1 - drivers/net/cnxk/meson.build | 1 + drivers/raw/cnxk_bphy/meson.build | 1 + drivers/raw/cnxk_gpio/meson.build | 1 + 12 files changed, 18 insertions(+), 6 deletions(-) diff --git a/config/arm/meson.build b/config/arm/meson.build index 9f1636e0d5..a3a58185bf 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -294,7 +294,8 @@ soc_cn10k = { 'flags': [ ['RTE_MAX_LCORE', 24], ['RTE_MAX_NUMA_NODES', 1], - ['RTE_MEMPOOL_ALIGN', 128] + ['RTE_MEMPOOL_ALIGN', 128], + ['RTE_IOVA_AS_VA', true] ], 'part_number': '0xd49', 'extra_march_features': ['crypto'], @@ -370,7 +371,10 @@ soc_cn9k = { 'description': 'Marvell OCTEON 9', 'implementer': '0x43', 'part_number': '0xb2', - 'numa': false + 'numa': false, + 'flags': [ + ['RTE_IOVA_AS_VA', true] + ] } soc_stingray = { diff --git a/drivers/common/cnxk/meson.build b/drivers/common/cnxk/meson.build index 6f808271d1..d019cfa8d1 100644 --- a/drivers/common/cnxk/meson.build +++ b/drivers/common/cnxk/meson.build @@ -86,3 +86,4 @@ sources += files('cnxk_telemetry_bphy.c', ) deps += ['bus_pci', 'net', 'telemetry'] +pmd_iova_as_va = true diff --git a/drivers/crypto/cnxk/cn10k_ipsec_la_ops.h b/drivers/crypto/cnxk/cn10k_ipsec_la_ops.h index 66cfe6ca98..16db14344d 100644 --- a/drivers/crypto/cnxk/cn10k_ipsec_la_ops.h +++ b/drivers/crypto/cnxk/cn10k_ipsec_la_ops.h @@ -85,7 +85,7 @@ process_outb_sa(struct roc_cpt_lf *lf, struct rte_crypto_op *cop, /* Prepare CPT instruction */ inst->w4.u64 = inst_w4_u64 | rte_pktmbuf_pkt_len(m_src); - dptr = rte_pktmbuf_iova(m_src); + dptr = rte_pktmbuf_mtod(m_src, uint64_t); inst->dptr = dptr; inst->rptr = dptr; @@ -102,7 +102,7 @@ process_inb_sa(struct rte_crypto_op *cop, struct cn10k_ipsec_sa *sa, /* Prepare CPT instruction */ inst->w4.u64 = sa->inst.w4 | rte_pktmbuf_pkt_len(m_src); - dptr = rte_pktmbuf_iova(m_src); + dptr = rte_pktmbuf_mtod(m_src, uint64_t); inst->dptr = dptr; inst->rptr = dptr; diff --git a/drivers/crypto/cnxk/cn9k_ipsec_la_ops.h b/drivers/crypto/cnxk/cn9k_ipsec_la_ops.h index e469596756..8b68e4c728 100644 --- a/drivers/crypto/cnxk/cn9k_ipsec_la_ops.h +++ b/drivers/crypto/cnxk/cn9k_ipsec_la_ops.h @@ -99,7 +99,7 @@ process_inb_sa(struct rte_crypto_op *cop, struct cn9k_ipsec_sa *sa, /* Prepare CPT instruction */ inst->w4.u64 = sa->inst.w4 | rte_pktmbuf_pkt_len(m_src); - inst->dptr = inst->rptr = rte_pktmbuf_iova(m_src); + inst->dptr = inst->rptr = rte_pktmbuf_mtod(m_src, uint64_t); inst->w7.u64 = sa->inst.w7; } #endif /* __CN9K_IPSEC_LA_OPS_H__ */ diff --git a/drivers/crypto/cnxk/meson.build b/drivers/crypto/cnxk/meson.build index 23a1cc3aac..764e7bb99a 100644 --- a/drivers/crypto/cnxk/meson.build +++ b/drivers/crypto/cnxk/meson.build @@ -31,3 +31,5 @@ if get_option('buildtype').contains('debug') else cflags += [ '-ULA_IPSEC_DEBUG' ] endif + +pmd_iova_as_va = true diff --git a/drivers/dma/cnxk/meson.build b/drivers/dma/cnxk/meson.build index d4be4ee860..ef0e3db109 100644 --- a/drivers/dma/cnxk/meson.build +++ b/drivers/dma/cnxk/meson.build @@ -3,3 +3,4 @@ deps += ['bus_pci', 'common_cnxk', 'dmadev'] sources = files('cnxk_dmadev.c') +pmd_iova_as_va = true diff --git a/drivers/event/cnxk/meson.build b/drivers/event/cnxk/meson.build index b27bae7b12..650d0d4256 100644 --- a/drivers/event/cnxk/meson.build +++ b/drivers/event/cnxk/meson.build @@ -479,3 +479,4 @@ foreach flag: extra_flags endforeach deps += ['bus_pci', 'common_cnxk', 'net_cnxk', 'crypto_cnxk'] +pmd_iova_as_va = true diff --git a/drivers/mempool/cnxk/meson.build b/drivers/mempool/cnxk/meson.build index d5d1978569..a328176457 100644 --- a/drivers/mempool/cnxk/meson.build +++ b/drivers/mempool/cnxk/meson.build @@ -17,3 +17,4 @@ sources = files( ) deps += ['eal', 'mbuf', 'kvargs', 'bus_pci', 'common_cnxk', 'mempool'] +pmd_iova_as_va = true diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h index 4cb7c9e90c..abf1e4215f 100644 --- a/drivers/net/cnxk/cnxk_ethdev.h +++ b/drivers/net/cnxk/cnxk_ethdev.h @@ -690,7 +690,6 @@ cnxk_pktmbuf_detach(struct rte_mbuf *m) m->priv_size = priv_size; m->buf_addr = (char *)m + mbuf_size; - m->buf_iova = rte_mempool_virt2iova(m) + mbuf_size; m->buf_len = (uint16_t)buf_len; rte_pktmbuf_reset_headroom(m); m->data_len = 0; diff --git a/drivers/net/cnxk/meson.build b/drivers/net/cnxk/meson.build index f347e98fce..01489b3a36 100644 --- a/drivers/net/cnxk/meson.build +++ b/drivers/net/cnxk/meson.build @@ -194,3 +194,4 @@ foreach flag: extra_flags endforeach headers = files('rte_pmd_cnxk.h') +pmd_iova_as_va = true diff --git a/drivers/raw/cnxk_bphy/meson.build b/drivers/raw/cnxk_bphy/meson.build index 14147feaf4..781ed63e05 100644 --- a/drivers/raw/cnxk_bphy/meson.build +++ b/drivers/raw/cnxk_bphy/meson.build @@ -10,3 +10,4 @@ sources = files( 'cnxk_bphy_irq.c', ) headers = files('rte_pmd_bphy.h') +pmd_iova_as_va = true diff --git a/drivers/raw/cnxk_gpio/meson.build b/drivers/raw/cnxk_gpio/meson.build index a75a5b9084..f9aed173b6 100644 --- a/drivers/raw/cnxk_gpio/meson.build +++ b/drivers/raw/cnxk_gpio/meson.build @@ -9,3 +9,4 @@ sources = files( 'cnxk_gpio_selftest.c', ) headers = files('rte_pmd_cnxk_gpio.h') +pmd_iova_as_va = true From patchwork Mon Aug 29 15:16:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shijith Thotton X-Patchwork-Id: 115607 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 80B2BA0542; Mon, 29 Aug 2022 17:18:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 37683427FF; Mon, 29 Aug 2022 17:17:54 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 59690427EC for ; Mon, 29 Aug 2022 17:17:53 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27T8GbsQ027880; Mon, 29 Aug 2022 08:17:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=iGvGQ8PNkW+zVXM2pbvUsapiVr7meaBWIvdavy4OmNg=; b=DVK8hGBUJj4WuDYHRNJmctzfY5hU16j4h43jqjPkUlpqjO2YqLVj+cNu++XlGddYHhd1 INN7kt4LFnWbBlKcAB3l0dxlAO2gJhZDGm5LvBO3b5ZLwIbcY8Gmi0mZvIk3PWBweZPU sPBSHJB9AEkOL6R4eY7ztoHbZRXEXX0Aord4FSNh6esWlzJa2mWd9U3KycrX4HAjUK7E 4knAXuFocj4eBx4GtpgGpxsXXnTSXqvvbYZsz0Tci7pZTA4KPT/3KKpKM7LkSSmwHz4v jGB7j+F8k99evlUMc8iUiukM2jG4jnJMtP5YGUy0GLwghJ79UeAGRjcfS8kLQQ8bWs4h nA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3j7jsn7u2q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 29 Aug 2022 08:17:47 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 29 Aug 2022 08:17:45 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 29 Aug 2022 08:17:45 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id 8638F3F7068; Mon, 29 Aug 2022 08:17:37 -0700 (PDT) From: Shijith Thotton To: CC: , Shijith Thotton , , , , , , , , Ruifeng Wang , Fan Zhang , Pablo de Lara , Chengwen Feng , Kevin Laatz , =?utf-8?q?Mattias_R=C3=B6nnblom?= , Liang Ma , "Peter Mccarthy" , Harry van Haaren , "Artem V. Andreev" , Andrew Rybchenko , "John W. Linville" , Ciara Loftus , Qi Zhang , "Chas Williams" , "Min Hu (Connor)" , "Gaetan Rivet" , Jakub Grajciar , Tetsuya Mukawa , Sachin Saxena , "Hemant Agrawal" Subject: [PATCH v1 4/4] drivers: mark software PMDs work with IOVA as VA Date: Mon, 29 Aug 2022 20:46:25 +0530 Message-ID: <20220829151626.2101336-5-sthotton@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: yfVeNgpRxb7KdZt3Iibeyk4mdWuJu0Aj X-Proofpoint-GUID: yfVeNgpRxb7KdZt3Iibeyk4mdWuJu0Aj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-29_07,2022-08-25_01,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Enabled software PMDs in IOVA as VA build as they work with IOVA as VA. Signed-off-by: Shijith Thotton --- drivers/crypto/armv8/meson.build | 1 + drivers/crypto/ipsec_mb/meson.build | 1 + drivers/crypto/null/meson.build | 1 + drivers/crypto/openssl/meson.build | 1 + drivers/dma/skeleton/meson.build | 1 + drivers/event/dsw/meson.build | 1 + drivers/event/opdl/meson.build | 1 + drivers/event/skeleton/meson.build | 1 + drivers/event/sw/meson.build | 1 + drivers/mempool/bucket/meson.build | 1 + drivers/mempool/ring/meson.build | 1 + drivers/mempool/stack/meson.build | 1 + drivers/net/af_packet/meson.build | 1 + drivers/net/af_xdp/meson.build | 2 ++ drivers/net/bonding/meson.build | 1 + drivers/net/failsafe/meson.build | 1 + drivers/net/memif/meson.build | 1 + drivers/net/null/meson.build | 1 + drivers/net/pcap/meson.build | 1 + drivers/net/ring/meson.build | 1 + drivers/net/tap/meson.build | 1 + drivers/raw/skeleton/meson.build | 1 + 22 files changed, 23 insertions(+) diff --git a/drivers/crypto/armv8/meson.build b/drivers/crypto/armv8/meson.build index 5effba8bbc..a2c9d69e3f 100644 --- a/drivers/crypto/armv8/meson.build +++ b/drivers/crypto/armv8/meson.build @@ -17,3 +17,4 @@ endif ext_deps += dep deps += ['bus_vdev'] sources = files('rte_armv8_pmd.c', 'rte_armv8_pmd_ops.c') +pmd_iova_as_va = true diff --git a/drivers/crypto/ipsec_mb/meson.build b/drivers/crypto/ipsec_mb/meson.build index a89b29d6c3..785440b593 100644 --- a/drivers/crypto/ipsec_mb/meson.build +++ b/drivers/crypto/ipsec_mb/meson.build @@ -37,3 +37,4 @@ sources = files( 'pmd_zuc.c', ) deps += ['bus_vdev', 'net', 'security'] +pmd_iova_as_va = true diff --git a/drivers/crypto/null/meson.build b/drivers/crypto/null/meson.build index acc16e7d81..68dc030075 100644 --- a/drivers/crypto/null/meson.build +++ b/drivers/crypto/null/meson.build @@ -9,3 +9,4 @@ endif deps += 'bus_vdev' sources = files('null_crypto_pmd.c', 'null_crypto_pmd_ops.c') +pmd_iova_as_va = true diff --git a/drivers/crypto/openssl/meson.build b/drivers/crypto/openssl/meson.build index cd962da1d6..25c44d0064 100644 --- a/drivers/crypto/openssl/meson.build +++ b/drivers/crypto/openssl/meson.build @@ -15,3 +15,4 @@ endif deps += 'bus_vdev' sources = files('rte_openssl_pmd.c', 'rte_openssl_pmd_ops.c') ext_deps += dep +pmd_iova_as_va = true diff --git a/drivers/dma/skeleton/meson.build b/drivers/dma/skeleton/meson.build index 8871b80956..2b48d4e031 100644 --- a/drivers/dma/skeleton/meson.build +++ b/drivers/dma/skeleton/meson.build @@ -5,3 +5,4 @@ deps += ['dmadev', 'kvargs', 'ring', 'bus_vdev'] sources = files( 'skeleton_dmadev.c', ) +pmd_iova_as_va = true diff --git a/drivers/event/dsw/meson.build b/drivers/event/dsw/meson.build index 2df0fac4ff..477a6e5910 100644 --- a/drivers/event/dsw/meson.build +++ b/drivers/event/dsw/meson.build @@ -6,3 +6,4 @@ if cc.has_argument('-Wno-format-nonliteral') cflags += '-Wno-format-nonliteral' endif sources = files('dsw_evdev.c', 'dsw_event.c', 'dsw_xstats.c') +pmd_iova_as_va = true diff --git a/drivers/event/opdl/meson.build b/drivers/event/opdl/meson.build index 786d2f4e82..e1a3de7ee3 100644 --- a/drivers/event/opdl/meson.build +++ b/drivers/event/opdl/meson.build @@ -9,3 +9,4 @@ sources = files( 'opdl_test.c', ) deps += ['bus_vdev'] +pmd_iova_as_va = true diff --git a/drivers/event/skeleton/meson.build b/drivers/event/skeleton/meson.build index acfe156532..0ae514668c 100644 --- a/drivers/event/skeleton/meson.build +++ b/drivers/event/skeleton/meson.build @@ -3,3 +3,4 @@ sources = files('skeleton_eventdev.c') deps += ['bus_pci', 'bus_vdev'] +pmd_iova_as_va = true diff --git a/drivers/event/sw/meson.build b/drivers/event/sw/meson.build index 6f81567efb..210cc1d048 100644 --- a/drivers/event/sw/meson.build +++ b/drivers/event/sw/meson.build @@ -9,3 +9,4 @@ sources = files( 'sw_evdev.c', ) deps += ['hash', 'bus_vdev'] +pmd_iova_as_va = true diff --git a/drivers/mempool/bucket/meson.build b/drivers/mempool/bucket/meson.build index 0051b6ac3c..31ba101677 100644 --- a/drivers/mempool/bucket/meson.build +++ b/drivers/mempool/bucket/meson.build @@ -12,3 +12,4 @@ if is_windows endif sources = files('rte_mempool_bucket.c') +pmd_iova_as_va = true diff --git a/drivers/mempool/ring/meson.build b/drivers/mempool/ring/meson.build index a021e908cf..f75f2125d7 100644 --- a/drivers/mempool/ring/meson.build +++ b/drivers/mempool/ring/meson.build @@ -2,3 +2,4 @@ # Copyright(c) 2017 Intel Corporation sources = files('rte_mempool_ring.c') +pmd_iova_as_va = true diff --git a/drivers/mempool/stack/meson.build b/drivers/mempool/stack/meson.build index 580dde79eb..3b94ed5b5e 100644 --- a/drivers/mempool/stack/meson.build +++ b/drivers/mempool/stack/meson.build @@ -4,3 +4,4 @@ sources = files('rte_mempool_stack.c') deps += ['stack'] +pmd_iova_as_va = true diff --git a/drivers/net/af_packet/meson.build b/drivers/net/af_packet/meson.build index c014e9b61b..92fafea363 100644 --- a/drivers/net/af_packet/meson.build +++ b/drivers/net/af_packet/meson.build @@ -6,3 +6,4 @@ if not is_linux reason = 'only supported on Linux' endif sources = files('rte_eth_af_packet.c') +pmd_iova_as_va = true diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build index 1e0de23705..35812511e2 100644 --- a/drivers/net/af_xdp/meson.build +++ b/drivers/net/af_xdp/meson.build @@ -55,3 +55,5 @@ else build = false reason = 'missing header, "linux/if_xdp.h"' endif + +pmd_iova_as_va = true diff --git a/drivers/net/bonding/meson.build b/drivers/net/bonding/meson.build index 18ad7e21f3..b61166888e 100644 --- a/drivers/net/bonding/meson.build +++ b/drivers/net/bonding/meson.build @@ -22,3 +22,4 @@ deps += 'sched' # needed for rte_bitmap.h deps += ['ip_frag'] headers = files('rte_eth_bond.h', 'rte_eth_bond_8023ad.h') +pmd_iova_as_va = true diff --git a/drivers/net/failsafe/meson.build b/drivers/net/failsafe/meson.build index b8e5bf70f8..a90be869d1 100644 --- a/drivers/net/failsafe/meson.build +++ b/drivers/net/failsafe/meson.build @@ -27,3 +27,4 @@ sources = files( 'failsafe_ops.c', 'failsafe_rxtx.c', ) +pmd_iova_as_va = true diff --git a/drivers/net/memif/meson.build b/drivers/net/memif/meson.build index 680bc8631c..59140dc3dd 100644 --- a/drivers/net/memif/meson.build +++ b/drivers/net/memif/meson.build @@ -12,3 +12,4 @@ sources = files( ) deps += ['hash'] +pmd_iova_as_va = true diff --git a/drivers/net/null/meson.build b/drivers/net/null/meson.build index 0251578aab..6b7adbd760 100644 --- a/drivers/net/null/meson.build +++ b/drivers/net/null/meson.build @@ -8,3 +8,4 @@ if is_windows endif sources = files('rte_eth_null.c') +pmd_iova_as_va = true diff --git a/drivers/net/pcap/meson.build b/drivers/net/pcap/meson.build index ed7864eb9d..73c65dd2a6 100644 --- a/drivers/net/pcap/meson.build +++ b/drivers/net/pcap/meson.build @@ -15,3 +15,4 @@ ext_deps += pcap_dep if is_windows ext_deps += cc.find_library('iphlpapi', required: true) endif +pmd_iova_as_va = true diff --git a/drivers/net/ring/meson.build b/drivers/net/ring/meson.build index 0156b37aad..45fa3492cf 100644 --- a/drivers/net/ring/meson.build +++ b/drivers/net/ring/meson.build @@ -9,3 +9,4 @@ endif sources = files('rte_eth_ring.c') headers = files('rte_eth_ring.h') +pmd_iova_as_va = true diff --git a/drivers/net/tap/meson.build b/drivers/net/tap/meson.build index c09713a67b..da23599830 100644 --- a/drivers/net/tap/meson.build +++ b/drivers/net/tap/meson.build @@ -35,3 +35,4 @@ foreach arg:args config.set(arg[0], cc.has_header_symbol(arg[1], arg[2])) endforeach configure_file(output : 'tap_autoconf.h', configuration : config) +pmd_iova_as_va = true diff --git a/drivers/raw/skeleton/meson.build b/drivers/raw/skeleton/meson.build index 950a33cc20..439ab8792d 100644 --- a/drivers/raw/skeleton/meson.build +++ b/drivers/raw/skeleton/meson.build @@ -6,3 +6,4 @@ sources = files( 'skeleton_rawdev.c', 'skeleton_rawdev_test.c', ) +pmd_iova_as_va = true From patchwork Wed Sep 7 13:43:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shijith Thotton X-Patchwork-Id: 116052 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D9F34A054F; Wed, 7 Sep 2022 15:44:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C853442B70; Wed, 7 Sep 2022 15:44:43 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 54031427F9 for ; Wed, 7 Sep 2022 15:44:42 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 287Dd24Z021501; Wed, 7 Sep 2022 06:44:38 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=iGvGQ8PNkW+zVXM2pbvUsapiVr7meaBWIvdavy4OmNg=; b=O8/vGTCnHCAyjXy0ykHZ8TXyQFY0Q4gyo3mTBHm2jF8m1/7QFjMr48rdPUnFO17UiYg1 ddYNsC8tZpQNqtNtrlNrVp4xY3qWO9l3x79TAFxbvyrjDcDyI2PtLThnsfcroragMAT6 ElTNiORHIq/QjT0r+FFfGV7Gq6NdQkSXB8PxoMbF8/D51cFFIQZGUEv3Ks9n5mBx8MSq MRMg0/UNVcHtQCqbTlALwWtRiDNQu4jVUU+iifTVkzhcelzf4oy2tE6HGYdoMQoPU1MK RDDMBChz9czLVZtuxPeOv2w1oJIfkNGFxjMJNJYn1r+/WwUEBMxN6Ee/aYV0k5MBd2Gw Fg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3jc6epxg8p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 07 Sep 2022 06:44:37 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 7 Sep 2022 06:44:35 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Wed, 7 Sep 2022 06:44:35 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id B9B5A3F7081; Wed, 7 Sep 2022 06:44:27 -0700 (PDT) From: Shijith Thotton To: CC: , Shijith Thotton , , , , , , , , Ruifeng Wang , Fan Zhang , Pablo de Lara , Chengwen Feng , Kevin Laatz , =?utf-8?q?Mattias_R=C3=B6nnblom?= , Liang Ma , "Peter Mccarthy" , Harry van Haaren , "Artem V. Andreev" , Andrew Rybchenko , "John W. Linville" , Ciara Loftus , Qi Zhang , "Chas Williams" , "Min Hu (Connor)" , "Gaetan Rivet" , Jakub Grajciar , Tetsuya Mukawa , Sachin Saxena , "Hemant Agrawal" Subject: [PATCH v2 5/5] drivers: mark software PMDs work with IOVA as VA Date: Wed, 7 Sep 2022 19:13:40 +0530 Message-ID: <20220907134340.3629224-6-sthotton@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220829151626.2101336-1-sthotton@marvell.com> References: <20220829151626.2101336-1-sthotton@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: daYFTuH6FRg2kv0sMib5wRPvVsbQDrov X-Proofpoint-GUID: daYFTuH6FRg2kv0sMib5wRPvVsbQDrov X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-07_08,2022-09-07_01,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Enabled software PMDs in IOVA as VA build as they work with IOVA as VA. Signed-off-by: Shijith Thotton --- drivers/crypto/armv8/meson.build | 1 + drivers/crypto/ipsec_mb/meson.build | 1 + drivers/crypto/null/meson.build | 1 + drivers/crypto/openssl/meson.build | 1 + drivers/dma/skeleton/meson.build | 1 + drivers/event/dsw/meson.build | 1 + drivers/event/opdl/meson.build | 1 + drivers/event/skeleton/meson.build | 1 + drivers/event/sw/meson.build | 1 + drivers/mempool/bucket/meson.build | 1 + drivers/mempool/ring/meson.build | 1 + drivers/mempool/stack/meson.build | 1 + drivers/net/af_packet/meson.build | 1 + drivers/net/af_xdp/meson.build | 2 ++ drivers/net/bonding/meson.build | 1 + drivers/net/failsafe/meson.build | 1 + drivers/net/memif/meson.build | 1 + drivers/net/null/meson.build | 1 + drivers/net/pcap/meson.build | 1 + drivers/net/ring/meson.build | 1 + drivers/net/tap/meson.build | 1 + drivers/raw/skeleton/meson.build | 1 + 22 files changed, 23 insertions(+) diff --git a/drivers/crypto/armv8/meson.build b/drivers/crypto/armv8/meson.build index 5effba8bbc..a2c9d69e3f 100644 --- a/drivers/crypto/armv8/meson.build +++ b/drivers/crypto/armv8/meson.build @@ -17,3 +17,4 @@ endif ext_deps += dep deps += ['bus_vdev'] sources = files('rte_armv8_pmd.c', 'rte_armv8_pmd_ops.c') +pmd_iova_as_va = true diff --git a/drivers/crypto/ipsec_mb/meson.build b/drivers/crypto/ipsec_mb/meson.build index a89b29d6c3..785440b593 100644 --- a/drivers/crypto/ipsec_mb/meson.build +++ b/drivers/crypto/ipsec_mb/meson.build @@ -37,3 +37,4 @@ sources = files( 'pmd_zuc.c', ) deps += ['bus_vdev', 'net', 'security'] +pmd_iova_as_va = true diff --git a/drivers/crypto/null/meson.build b/drivers/crypto/null/meson.build index acc16e7d81..68dc030075 100644 --- a/drivers/crypto/null/meson.build +++ b/drivers/crypto/null/meson.build @@ -9,3 +9,4 @@ endif deps += 'bus_vdev' sources = files('null_crypto_pmd.c', 'null_crypto_pmd_ops.c') +pmd_iova_as_va = true diff --git a/drivers/crypto/openssl/meson.build b/drivers/crypto/openssl/meson.build index cd962da1d6..25c44d0064 100644 --- a/drivers/crypto/openssl/meson.build +++ b/drivers/crypto/openssl/meson.build @@ -15,3 +15,4 @@ endif deps += 'bus_vdev' sources = files('rte_openssl_pmd.c', 'rte_openssl_pmd_ops.c') ext_deps += dep +pmd_iova_as_va = true diff --git a/drivers/dma/skeleton/meson.build b/drivers/dma/skeleton/meson.build index 8871b80956..2b48d4e031 100644 --- a/drivers/dma/skeleton/meson.build +++ b/drivers/dma/skeleton/meson.build @@ -5,3 +5,4 @@ deps += ['dmadev', 'kvargs', 'ring', 'bus_vdev'] sources = files( 'skeleton_dmadev.c', ) +pmd_iova_as_va = true diff --git a/drivers/event/dsw/meson.build b/drivers/event/dsw/meson.build index 2df0fac4ff..477a6e5910 100644 --- a/drivers/event/dsw/meson.build +++ b/drivers/event/dsw/meson.build @@ -6,3 +6,4 @@ if cc.has_argument('-Wno-format-nonliteral') cflags += '-Wno-format-nonliteral' endif sources = files('dsw_evdev.c', 'dsw_event.c', 'dsw_xstats.c') +pmd_iova_as_va = true diff --git a/drivers/event/opdl/meson.build b/drivers/event/opdl/meson.build index 786d2f4e82..e1a3de7ee3 100644 --- a/drivers/event/opdl/meson.build +++ b/drivers/event/opdl/meson.build @@ -9,3 +9,4 @@ sources = files( 'opdl_test.c', ) deps += ['bus_vdev'] +pmd_iova_as_va = true diff --git a/drivers/event/skeleton/meson.build b/drivers/event/skeleton/meson.build index acfe156532..0ae514668c 100644 --- a/drivers/event/skeleton/meson.build +++ b/drivers/event/skeleton/meson.build @@ -3,3 +3,4 @@ sources = files('skeleton_eventdev.c') deps += ['bus_pci', 'bus_vdev'] +pmd_iova_as_va = true diff --git a/drivers/event/sw/meson.build b/drivers/event/sw/meson.build index 6f81567efb..210cc1d048 100644 --- a/drivers/event/sw/meson.build +++ b/drivers/event/sw/meson.build @@ -9,3 +9,4 @@ sources = files( 'sw_evdev.c', ) deps += ['hash', 'bus_vdev'] +pmd_iova_as_va = true diff --git a/drivers/mempool/bucket/meson.build b/drivers/mempool/bucket/meson.build index 0051b6ac3c..31ba101677 100644 --- a/drivers/mempool/bucket/meson.build +++ b/drivers/mempool/bucket/meson.build @@ -12,3 +12,4 @@ if is_windows endif sources = files('rte_mempool_bucket.c') +pmd_iova_as_va = true diff --git a/drivers/mempool/ring/meson.build b/drivers/mempool/ring/meson.build index a021e908cf..f75f2125d7 100644 --- a/drivers/mempool/ring/meson.build +++ b/drivers/mempool/ring/meson.build @@ -2,3 +2,4 @@ # Copyright(c) 2017 Intel Corporation sources = files('rte_mempool_ring.c') +pmd_iova_as_va = true diff --git a/drivers/mempool/stack/meson.build b/drivers/mempool/stack/meson.build index 580dde79eb..3b94ed5b5e 100644 --- a/drivers/mempool/stack/meson.build +++ b/drivers/mempool/stack/meson.build @@ -4,3 +4,4 @@ sources = files('rte_mempool_stack.c') deps += ['stack'] +pmd_iova_as_va = true diff --git a/drivers/net/af_packet/meson.build b/drivers/net/af_packet/meson.build index c014e9b61b..92fafea363 100644 --- a/drivers/net/af_packet/meson.build +++ b/drivers/net/af_packet/meson.build @@ -6,3 +6,4 @@ if not is_linux reason = 'only supported on Linux' endif sources = files('rte_eth_af_packet.c') +pmd_iova_as_va = true diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build index 1e0de23705..35812511e2 100644 --- a/drivers/net/af_xdp/meson.build +++ b/drivers/net/af_xdp/meson.build @@ -55,3 +55,5 @@ else build = false reason = 'missing header, "linux/if_xdp.h"' endif + +pmd_iova_as_va = true diff --git a/drivers/net/bonding/meson.build b/drivers/net/bonding/meson.build index 18ad7e21f3..b61166888e 100644 --- a/drivers/net/bonding/meson.build +++ b/drivers/net/bonding/meson.build @@ -22,3 +22,4 @@ deps += 'sched' # needed for rte_bitmap.h deps += ['ip_frag'] headers = files('rte_eth_bond.h', 'rte_eth_bond_8023ad.h') +pmd_iova_as_va = true diff --git a/drivers/net/failsafe/meson.build b/drivers/net/failsafe/meson.build index b8e5bf70f8..a90be869d1 100644 --- a/drivers/net/failsafe/meson.build +++ b/drivers/net/failsafe/meson.build @@ -27,3 +27,4 @@ sources = files( 'failsafe_ops.c', 'failsafe_rxtx.c', ) +pmd_iova_as_va = true diff --git a/drivers/net/memif/meson.build b/drivers/net/memif/meson.build index 680bc8631c..59140dc3dd 100644 --- a/drivers/net/memif/meson.build +++ b/drivers/net/memif/meson.build @@ -12,3 +12,4 @@ sources = files( ) deps += ['hash'] +pmd_iova_as_va = true diff --git a/drivers/net/null/meson.build b/drivers/net/null/meson.build index 0251578aab..6b7adbd760 100644 --- a/drivers/net/null/meson.build +++ b/drivers/net/null/meson.build @@ -8,3 +8,4 @@ if is_windows endif sources = files('rte_eth_null.c') +pmd_iova_as_va = true diff --git a/drivers/net/pcap/meson.build b/drivers/net/pcap/meson.build index ed7864eb9d..73c65dd2a6 100644 --- a/drivers/net/pcap/meson.build +++ b/drivers/net/pcap/meson.build @@ -15,3 +15,4 @@ ext_deps += pcap_dep if is_windows ext_deps += cc.find_library('iphlpapi', required: true) endif +pmd_iova_as_va = true diff --git a/drivers/net/ring/meson.build b/drivers/net/ring/meson.build index 0156b37aad..45fa3492cf 100644 --- a/drivers/net/ring/meson.build +++ b/drivers/net/ring/meson.build @@ -9,3 +9,4 @@ endif sources = files('rte_eth_ring.c') headers = files('rte_eth_ring.h') +pmd_iova_as_va = true diff --git a/drivers/net/tap/meson.build b/drivers/net/tap/meson.build index c09713a67b..da23599830 100644 --- a/drivers/net/tap/meson.build +++ b/drivers/net/tap/meson.build @@ -35,3 +35,4 @@ foreach arg:args config.set(arg[0], cc.has_header_symbol(arg[1], arg[2])) endforeach configure_file(output : 'tap_autoconf.h', configuration : config) +pmd_iova_as_va = true diff --git a/drivers/raw/skeleton/meson.build b/drivers/raw/skeleton/meson.build index 950a33cc20..439ab8792d 100644 --- a/drivers/raw/skeleton/meson.build +++ b/drivers/raw/skeleton/meson.build @@ -6,3 +6,4 @@ sources = files( 'skeleton_rawdev.c', 'skeleton_rawdev_test.c', ) +pmd_iova_as_va = true