DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shijith Thotton <sthotton@marvell.com>
To: <dev@dpdk.org>
Cc: <pbhagavatula@marvell.com>,
	Shijith Thotton <sthotton@marvell.com>,
	<Honnappa.Nagarahalli@arm.com>, <bruce.richardson@intel.com>,
	<jerinj@marvell.com>, <mb@smartsharesystems.com>,
	<olivier.matz@6wind.com>, <stephen@networkplumber.org>,
	<thomas@monjalon.net>, Jan Viktorin <viktorin@rehivetech.com>,
	Ruifeng Wang <ruifeng.wang@arm.com>,
	"Nithin Dabilpuram" <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>,
	Ankur Dwivedi <adwivedi@marvell.com>,
	Anoob Joseph <anoobj@marvell.com>,
	Tejasree Kondoj <ktejasree@marvell.com>,
	"Radha Mohan Chintakuntla" <radhac@marvell.com>,
	Veerasenareddy Burru <vburru@marvell.com>,
	Ashwin Sekhar T K <asekhar@marvell.com>,
	Jakub Palider <jpalider@marvell.com>,
	Tomasz Duszynski <tduszynski@marvell.com>
Subject: [PATCH v1 3/4] drivers: mark Marvell cnxk PMDs work with IOVA as VA
Date: Mon, 29 Aug 2022 20:46:24 +0530	[thread overview]
Message-ID: <20220829151626.2101336-4-sthotton@marvell.com> (raw)
In-Reply-To: <PH0PR18MB4425D140694D972E19B6770AD99C9@PH0PR18MB4425.namprd18.prod.outlook.com>

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 <sthotton@marvell.com>
---
 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
-- 
2.25.1


  parent reply	other threads:[~2022-08-29 15:17 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 16:25 [PATCH] mbuf: add mbuf physical address field to dynamic field Shijith Thotton
2022-06-30 16:45 ` Stephen Hemminger
2022-07-01 12:16   ` Shijith Thotton
2022-07-01 12:24   ` Shijith Thotton
2022-07-03  7:31     ` Morten Brørup
2022-07-04 14:00       ` Bruce Richardson
2022-08-03 15:34         ` [EXT] " Shijith Thotton
2022-08-29 15:16           ` [PATCH v1 0/4] mbuf dynamic field expansion Shijith Thotton
2022-09-07 13:43             ` [PATCH v2 0/5] " Shijith Thotton
2022-09-21  9:43               ` David Marchand
2022-09-21 14:01                 ` [EXT] " Shijith Thotton
2022-09-21 13:56               ` [PATCH v3 " Shijith Thotton
2022-09-21 13:56                 ` [PATCH v3 1/5] build: add meson option to configure IOVA mode as VA Shijith Thotton
2022-09-28 12:52                   ` Olivier Matz
2022-09-29  5:48                     ` [EXT] " Shijith Thotton
2022-09-21 13:56                 ` [PATCH v3 2/5] mbuf: add second dynamic field member for VA only build Shijith Thotton
2022-09-28  7:24                   ` Thomas Monjalon
2022-09-28 12:52                     ` Olivier Matz
2022-09-28 19:33                       ` Thomas Monjalon
2022-09-28 19:48                       ` Stephen Hemminger
2022-09-29  6:13                         ` [EXT] " Shijith Thotton
2022-09-28 12:52                   ` Olivier Matz
2022-09-21 13:56                 ` [PATCH v3 3/5] lib: move mbuf next pointer to first cache line Shijith Thotton
2022-09-21 14:07                   ` Morten Brørup
2022-09-28 12:52                   ` Olivier Matz
2022-09-29  6:14                     ` [EXT] " Shijith Thotton
2022-09-21 13:56                 ` [PATCH v3 4/5] drivers: mark Marvell cnxk PMDs work with IOVA as VA Shijith Thotton
2022-09-28 12:53                   ` Olivier Matz
2022-09-29  6:19                     ` [EXT] " Shijith Thotton
2022-09-29  7:44                       ` Olivier Matz
2022-09-29  8:10                         ` Shijith Thotton
2022-10-07 20:17                   ` Olivier Matz
2022-10-07 20:22                     ` [EXT] " Shijith Thotton
2022-09-21 13:56                 ` [PATCH v3 5/5] drivers: mark software " Shijith Thotton
2022-09-28  5:41                 ` [PATCH v3 0/5] mbuf dynamic field expansion Shijith Thotton
2022-09-28 12:52                 ` Olivier Matz
2022-09-29  4:51                   ` [EXT] " Shijith Thotton
2022-10-07 13:50                 ` Thomas Monjalon
2022-10-07 19:35                   ` [EXT] " Shijith Thotton
2022-10-07 19:30                 ` [PATCH v4 0/7] " Shijith Thotton
2022-10-07 19:30                   ` [PATCH v4 1/7] mbuf: add API to get and set mbuf physical address Shijith Thotton
2022-10-07 20:16                     ` Olivier Matz
2022-10-07 20:20                       ` [EXT] " Shijith Thotton
2022-10-07 19:30                   ` [PATCH v4 2/7] test/dma: use API to get mbuf data " Shijith Thotton
2022-10-07 20:17                     ` Olivier Matz
2022-10-07 19:30                   ` [PATCH v4 3/7] build: add meson option to configure IOVA mode as PA Shijith Thotton
2022-10-07 19:30                   ` [PATCH v4 4/7] mbuf: add second dynamic field member Shijith Thotton
2022-10-07 19:30                   ` [PATCH v4 5/7] lib: move mbuf next pointer to first cache line Shijith Thotton
2022-10-07 19:30                   ` [PATCH v4 6/7] drivers: mark cnxk PMDs work with IOVA as PA disabled Shijith Thotton
2022-10-07 19:30                   ` [PATCH v4 7/7] drivers: mark software " Shijith Thotton
2022-10-07 20:19                   ` [PATCH v4 0/7] mbuf dynamic field expansion Olivier Matz
2022-10-07 21:02                   ` [PATCH v5 " Shijith Thotton
2022-10-07 21:02                     ` [PATCH v5 1/7] mbuf: add API to get and set mbuf physical address Shijith Thotton
2022-10-07 21:20                       ` Stephen Hemminger
2022-10-07 21:02                     ` [PATCH v5 2/7] test/dma: use API to get mbuf data " Shijith Thotton
2022-10-07 21:02                     ` [PATCH v5 3/7] build: add meson option to configure IOVA mode as PA Shijith Thotton
2022-10-07 21:02                     ` [PATCH v5 4/7] mbuf: add second dynamic field member Shijith Thotton
2022-10-07 21:02                     ` [PATCH v5 5/7] lib: move mbuf next pointer to first cache line Shijith Thotton
2022-10-07 21:22                       ` Stephen Hemminger
2022-10-07 21:30                         ` [EXT] " Shijith Thotton
2022-10-07 21:02                     ` [PATCH v5 6/7] drivers: mark cnxk PMDs work with IOVA as PA disabled Shijith Thotton
2022-10-07 21:02                     ` [PATCH v5 7/7] drivers: mark software " Shijith Thotton
2022-10-09  9:34                     ` [PATCH v5 0/7] mbuf dynamic field expansion Thomas Monjalon
2022-09-07 13:43             ` [PATCH v2 1/5] build: add meson option to configure IOVA mode as VA Shijith Thotton
2022-09-07 15:31               ` Stephen Hemminger
2022-09-07 15:38                 ` Bruce Richardson
2022-09-07 21:33                   ` Morten Brørup
2022-09-07 13:43             ` [PATCH v2 2/5] mbuf: add second dynamic field member for VA only build Shijith Thotton
2022-09-07 13:43             ` [PATCH v2 3/5] lib: move mbuf next pointer to first cache line Shijith Thotton
2022-09-07 13:43             ` [PATCH v2 4/5] drivers: mark Marvell cnxk PMDs work with IOVA as VA Shijith Thotton
2022-09-07 13:43             ` [PATCH v2 5/5] drivers: mark software " Shijith Thotton
2022-08-29 15:16           ` [PATCH v1 1/4] build: add meson option to configure IOVA mode " Shijith Thotton
2022-08-29 18:18             ` Morten Brørup
2022-08-30  8:32               ` Bruce Richardson
2022-08-29 15:16           ` [PATCH v1 2/4] mbuf: add second dynamic field member for VA only build Shijith Thotton
2022-08-29 18:32             ` Morten Brørup
2022-08-30  8:35               ` Bruce Richardson
2022-08-30  8:41                 ` [EXT] " Pavan Nikhilesh Bhagavatula
2022-08-30 13:22                   ` Honnappa Nagarahalli
2022-09-07 13:55                     ` Shijith Thotton
2022-08-29 15:16           ` Shijith Thotton [this message]
2022-08-29 15:16           ` [PATCH v1 4/4] drivers: mark software PMDs work with IOVA as VA Shijith Thotton
2022-08-30 13:07     ` [PATCH] mbuf: add mbuf physical address field to dynamic field Ferruh Yigit
2022-09-12 13:19       ` [EXT] " Shijith Thotton
2022-06-30 16:55 ` Bruce Richardson
2022-07-01  9:48   ` Olivier Matz
2022-07-01 11:53     ` Slava Ovsiienko
2022-07-01 12:01     ` [EXT] " Shijith Thotton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220829151626.2101336-4-sthotton@marvell.com \
    --to=sthotton@marvell.com \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=adwivedi@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=asekhar@marvell.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=jpalider@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ktejasree@marvell.com \
    --cc=mb@smartsharesystems.com \
    --cc=ndabilpuram@marvell.com \
    --cc=olivier.matz@6wind.com \
    --cc=pbhagavatula@marvell.com \
    --cc=radhac@marvell.com \
    --cc=ruifeng.wang@arm.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    --cc=stephen@networkplumber.org \
    --cc=tduszynski@marvell.com \
    --cc=thomas@monjalon.net \
    --cc=vburru@marvell.com \
    --cc=viktorin@rehivetech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).