DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] drivers/cnxk: improve the build time for non arm64 build
@ 2023-05-29  9:23 jerinj
  2023-05-31  1:35 ` Nithin Kumar Dabilpuram
  2023-06-12 16:06 ` [dpdk-dev] [PATCH v2] " jerinj
  0 siblings, 2 replies; 4+ messages in thread
From: jerinj @ 2023-05-29  9:23 UTC (permalink / raw)
  To: dev, Pavan Nikhilesh, Shijith Thotton, Nithin Kumar Dabilpuram,
	Kiran Kumar K, Sunil Kumar Kori, Satha Rao
  Cc: Jerin Jacob

From: Jerin Jacob <jerinj@marvell.com>

Specialized fast path routines are not applicable to non
arm64 build, removing those function contained
files to improve the build time on non arm64 build.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/event/cnxk/cn10k_eventdev.c |  5 +++++
 drivers/event/cnxk/cn9k_eventdev.c  |  4 ++++
 drivers/event/cnxk/meson.build      | 10 ++++++++++
 drivers/net/cnxk/cn10k_rx_select.c  |  6 +++++-
 drivers/net/cnxk/cn10k_tx_select.c  |  6 +++++-
 drivers/net/cnxk/cn9k_rx_select.c   |  6 +++++-
 drivers/net/cnxk/cn9k_tx_select.c   |  6 +++++-
 drivers/net/cnxk/meson.build        |  4 ++++
 8 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c
index fd71ff15ca..a7534efad6 100644
--- a/drivers/event/cnxk/cn10k_eventdev.c
+++ b/drivers/event/cnxk/cn10k_eventdev.c
@@ -297,7 +297,9 @@ cn10k_sso_updt_tx_adptr_data(const struct rte_eventdev *event_dev)
 static void
 cn10k_sso_fp_fns_set(struct rte_eventdev *event_dev)
 {
+#if defined(RTE_ARCH_ARM64)
 	struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev);
+
 	struct roc_cpt *cpt = roc_idev_cpt_get();
 	const event_dequeue_t sso_hws_deq[NIX_RX_OFFLOAD_MAX] = {
 #define R(name, flags)[flags] = cn10k_sso_hws_deq_##name,
@@ -614,6 +616,9 @@ cn10k_sso_fp_fns_set(struct rte_eventdev *event_dev)
 		CN10K_SET_EVDEV_ENQ_OP(dev, event_dev->txa_enqueue, sso_hws_tx_adptr_enq);
 
 	event_dev->txa_enqueue_same_dest = event_dev->txa_enqueue;
+#else
+	RTE_SET_USED(event_dev);
+#endif
 }
 
 static void
diff --git a/drivers/event/cnxk/cn9k_eventdev.c b/drivers/event/cnxk/cn9k_eventdev.c
index b104d19b9b..0656940726 100644
--- a/drivers/event/cnxk/cn9k_eventdev.c
+++ b/drivers/event/cnxk/cn9k_eventdev.c
@@ -309,6 +309,7 @@ cn9k_sso_updt_tx_adptr_data(const struct rte_eventdev *event_dev)
 static void
 cn9k_sso_fp_fns_set(struct rte_eventdev *event_dev)
 {
+#if defined(RTE_ARCH_ARM64)
 	struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev);
 	/* Single WS modes */
 	const event_dequeue_t sso_hws_deq[NIX_RX_OFFLOAD_MAX] = {
@@ -662,6 +663,9 @@ cn9k_sso_fp_fns_set(struct rte_eventdev *event_dev)
 
 	event_dev->txa_enqueue_same_dest = event_dev->txa_enqueue;
 	rte_mb();
+#else
+	RTE_SET_USED(event_dev);
+#endif
 }
 
 static void *
diff --git a/drivers/event/cnxk/meson.build b/drivers/event/cnxk/meson.build
index 8a7fd53ebd..4f259988df 100644
--- a/drivers/event/cnxk/meson.build
+++ b/drivers/event/cnxk/meson.build
@@ -31,6 +31,10 @@ if soc_type == 'cn9k' or soc_type == 'all'
 sources += files(
         'cn9k_eventdev.c',
         'cn9k_worker.c',
+)
+
+if host_machine.cpu_family().startswith('aarch')
+sources += files(
         'deq/cn9k/deq_0_15_burst.c',
         'deq/cn9k/deq_16_31_burst.c',
         'deq/cn9k/deq_32_47_burst.c',
@@ -330,11 +334,16 @@ sources += files(
         'tx/cn9k/tx_112_127_dual_seg.c',
 )
 endif
+endif
 
 if soc_type == 'cn10k' or soc_type == 'all'
 sources += files(
         'cn10k_eventdev.c',
         'cn10k_worker.c',
+)
+
+if host_machine.cpu_family().startswith('aarch')
+sources += files(
         'deq/cn10k/deq_0_15_burst.c',
         'deq/cn10k/deq_16_31_burst.c',
         'deq/cn10k/deq_32_47_burst.c',
@@ -484,6 +493,7 @@ sources += files(
         'tx/cn10k/tx_112_127_seg.c',
 )
 endif
+endif
 
 extra_flags = ['-flax-vector-conversions', '-Wno-strict-aliasing']
 foreach flag: extra_flags
diff --git a/drivers/net/cnxk/cn10k_rx_select.c b/drivers/net/cnxk/cn10k_rx_select.c
index 1e0de1b7ac..1d44f2924e 100644
--- a/drivers/net/cnxk/cn10k_rx_select.c
+++ b/drivers/net/cnxk/cn10k_rx_select.c
@@ -5,7 +5,7 @@
 #include "cn10k_ethdev.h"
 #include "cn10k_rx.h"
 
-static inline void
+static __rte_used void
 pick_rx_func(struct rte_eth_dev *eth_dev,
 	     const eth_rx_burst_t rx_burst[NIX_RX_OFFLOAD_MAX])
 {
@@ -25,6 +25,7 @@ pick_rx_func(struct rte_eth_dev *eth_dev,
 void
 cn10k_eth_set_rx_function(struct rte_eth_dev *eth_dev)
 {
+#if defined(RTE_ARCH_ARM64)
 	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
 
 	const eth_rx_burst_t nix_eth_rx_burst[NIX_RX_OFFLOAD_MAX] = {
@@ -111,4 +112,7 @@ cn10k_eth_set_rx_function(struct rte_eth_dev *eth_dev)
 		return pick_rx_func(eth_dev, nix_eth_rx_vec_burst_reas);
 	else
 		return pick_rx_func(eth_dev, nix_eth_rx_vec_burst);
+#else
+	RTE_SET_USED(eth_dev);
+#endif
 }
diff --git a/drivers/net/cnxk/cn10k_tx_select.c b/drivers/net/cnxk/cn10k_tx_select.c
index 54023c4234..404f5ba979 100644
--- a/drivers/net/cnxk/cn10k_tx_select.c
+++ b/drivers/net/cnxk/cn10k_tx_select.c
@@ -5,7 +5,7 @@
 #include "cn10k_ethdev.h"
 #include "cn10k_tx.h"
 
-static inline void
+static __rte_used inline void
 pick_tx_func(struct rte_eth_dev *eth_dev,
 	     const eth_tx_burst_t tx_burst[NIX_TX_OFFLOAD_MAX])
 {
@@ -23,6 +23,7 @@ pick_tx_func(struct rte_eth_dev *eth_dev,
 void
 cn10k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
 {
+#if defined(RTE_ARCH_ARM64)
 	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
 
 	const eth_tx_burst_t nix_eth_tx_burst[NIX_TX_OFFLOAD_MAX] = {
@@ -64,4 +65,7 @@ cn10k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
 	}
 
 	rte_mb();
+#else
+	RTE_SET_USED(eth_dev);
+#endif
 }
diff --git a/drivers/net/cnxk/cn9k_rx_select.c b/drivers/net/cnxk/cn9k_rx_select.c
index 79f171fcc3..05bc33ce6a 100644
--- a/drivers/net/cnxk/cn9k_rx_select.c
+++ b/drivers/net/cnxk/cn9k_rx_select.c
@@ -5,7 +5,7 @@
 #include "cn9k_ethdev.h"
 #include "cn9k_rx.h"
 
-static inline void
+static __rte_used void
 pick_rx_func(struct rte_eth_dev *eth_dev,
 	     const eth_rx_burst_t rx_burst[NIX_RX_OFFLOAD_MAX])
 {
@@ -25,6 +25,7 @@ pick_rx_func(struct rte_eth_dev *eth_dev,
 void
 cn9k_eth_set_rx_function(struct rte_eth_dev *eth_dev)
 {
+#if defined(RTE_ARCH_ARM64)
 	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
 
 	const eth_rx_burst_t nix_eth_rx_burst[NIX_RX_OFFLOAD_MAX] = {
@@ -68,4 +69,7 @@ cn9k_eth_set_rx_function(struct rte_eth_dev *eth_dev)
 	if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SCATTER)
 		return pick_rx_func(eth_dev, nix_eth_rx_vec_burst_mseg);
 	return pick_rx_func(eth_dev, nix_eth_rx_vec_burst);
+#else
+	RTE_SET_USED(eth_dev);
+#endif
 }
diff --git a/drivers/net/cnxk/cn9k_tx_select.c b/drivers/net/cnxk/cn9k_tx_select.c
index 62beb1bf38..e08883f032 100644
--- a/drivers/net/cnxk/cn9k_tx_select.c
+++ b/drivers/net/cnxk/cn9k_tx_select.c
@@ -5,7 +5,7 @@
 #include "cn9k_ethdev.h"
 #include "cn9k_tx.h"
 
-static inline void
+static __rte_used void
 pick_tx_func(struct rte_eth_dev *eth_dev,
 	     const eth_tx_burst_t tx_burst[NIX_TX_OFFLOAD_MAX])
 {
@@ -23,6 +23,7 @@ pick_tx_func(struct rte_eth_dev *eth_dev,
 void
 cn9k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
 {
+#if defined(RTE_ARCH_ARM64)
 	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
 
 	const eth_tx_burst_t nix_eth_tx_burst[NIX_TX_OFFLOAD_MAX] = {
@@ -60,4 +61,7 @@ cn9k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
 	}
 
 	rte_mb();
+#else
+	RTE_SET_USED(eth_dev);
+#endif
 }
diff --git a/drivers/net/cnxk/meson.build b/drivers/net/cnxk/meson.build
index 62b8bb90fb..394d3d01f4 100644
--- a/drivers/net/cnxk/meson.build
+++ b/drivers/net/cnxk/meson.build
@@ -45,6 +45,7 @@ sources += files(
         'cn9k_tx_select.c',
 )
 
+if host_machine.cpu_family().startswith('aarch')
 sources += files(
         'rx/cn9k/rx_0_15.c',
         'rx/cn9k/rx_16_31.c',
@@ -115,6 +116,7 @@ sources += files(
         'tx/cn9k/tx_112_127_vec_mseg.c',
 )
 endif
+endif
 
 if soc_type == 'cn10k' or soc_type == 'all'
 # CN10K
@@ -126,6 +128,7 @@ sources += files(
         'cn10k_tx_select.c',
 )
 
+if host_machine.cpu_family().startswith('aarch')
 sources += files(
         'rx/cn10k/rx_0_15.c',
         'rx/cn10k/rx_16_31.c',
@@ -196,6 +199,7 @@ sources += files(
         'tx/cn10k/tx_112_127_vec_mseg.c',
 )
 endif
+endif
 
 deps += ['bus_pci', 'cryptodev', 'eventdev', 'security']
 deps += ['common_cnxk', 'mempool_cnxk']
-- 
2.40.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v1] drivers/cnxk: improve the build time for non arm64 build
  2023-05-29  9:23 [dpdk-dev] [PATCH v1] drivers/cnxk: improve the build time for non arm64 build jerinj
@ 2023-05-31  1:35 ` Nithin Kumar Dabilpuram
  2023-06-12 16:06 ` [dpdk-dev] [PATCH v2] " jerinj
  1 sibling, 0 replies; 4+ messages in thread
From: Nithin Kumar Dabilpuram @ 2023-05-31  1:35 UTC (permalink / raw)
  To: Jerin Jacob Kollanukkaran, dev, Pavan Nikhilesh Bhagavatula,
	Shijith Thotton, Kiran Kumar Kokkilagadda, Sunil Kumar Kori,
	Satha Koteswara Rao Kottidi

[-- Attachment #1: Type: text/plain, Size: 9125 bytes --]


Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>

________________________________
From: jerinj@marvell.com <jerinj@marvell.com>
Sent: Monday, May 29, 2023 2:53 PM
To: dev@dpdk.org <dev@dpdk.org>; Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Shijith Thotton <sthotton@marvell.com>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar Kokkilagadda <kirankumark@marvell.com>; Sunil Kumar Kori <skori@marvell.com>; Satha Koteswara Rao Kottidi <skoteshwar@marvell.com>
Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
Subject: [dpdk-dev] [PATCH v1] drivers/cnxk: improve the build time for non arm64 build

From: Jerin Jacob <jerinj@marvell.com>

Specialized fast path routines are not applicable to non
arm64 build, removing those function contained
files to improve the build time on non arm64 build.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/event/cnxk/cn10k_eventdev.c |  5 +++++
 drivers/event/cnxk/cn9k_eventdev.c  |  4 ++++
 drivers/event/cnxk/meson.build      | 10 ++++++++++
 drivers/net/cnxk/cn10k_rx_select.c  |  6 +++++-
 drivers/net/cnxk/cn10k_tx_select.c  |  6 +++++-
 drivers/net/cnxk/cn9k_rx_select.c   |  6 +++++-
 drivers/net/cnxk/cn9k_tx_select.c   |  6 +++++-
 drivers/net/cnxk/meson.build        |  4 ++++
 8 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c
index fd71ff15ca..a7534efad6 100644
--- a/drivers/event/cnxk/cn10k_eventdev.c
+++ b/drivers/event/cnxk/cn10k_eventdev.c
@@ -297,7 +297,9 @@ cn10k_sso_updt_tx_adptr_data(const struct rte_eventdev *event_dev)
 static void
 cn10k_sso_fp_fns_set(struct rte_eventdev *event_dev)
 {
+#if defined(RTE_ARCH_ARM64)
         struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev);
+
         struct roc_cpt *cpt = roc_idev_cpt_get();
         const event_dequeue_t sso_hws_deq[NIX_RX_OFFLOAD_MAX] = {
 #define R(name, flags)[flags] = cn10k_sso_hws_deq_##name,
@@ -614,6 +616,9 @@ cn10k_sso_fp_fns_set(struct rte_eventdev *event_dev)
                 CN10K_SET_EVDEV_ENQ_OP(dev, event_dev->txa_enqueue, sso_hws_tx_adptr_enq);

         event_dev->txa_enqueue_same_dest = event_dev->txa_enqueue;
+#else
+       RTE_SET_USED(event_dev);
+#endif
 }

 static void
diff --git a/drivers/event/cnxk/cn9k_eventdev.c b/drivers/event/cnxk/cn9k_eventdev.c
index b104d19b9b..0656940726 100644
--- a/drivers/event/cnxk/cn9k_eventdev.c
+++ b/drivers/event/cnxk/cn9k_eventdev.c
@@ -309,6 +309,7 @@ cn9k_sso_updt_tx_adptr_data(const struct rte_eventdev *event_dev)
 static void
 cn9k_sso_fp_fns_set(struct rte_eventdev *event_dev)
 {
+#if defined(RTE_ARCH_ARM64)
         struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev);
         /* Single WS modes */
         const event_dequeue_t sso_hws_deq[NIX_RX_OFFLOAD_MAX] = {
@@ -662,6 +663,9 @@ cn9k_sso_fp_fns_set(struct rte_eventdev *event_dev)

         event_dev->txa_enqueue_same_dest = event_dev->txa_enqueue;
         rte_mb();
+#else
+       RTE_SET_USED(event_dev);
+#endif
 }

 static void *
diff --git a/drivers/event/cnxk/meson.build b/drivers/event/cnxk/meson.build
index 8a7fd53ebd..4f259988df 100644
--- a/drivers/event/cnxk/meson.build
+++ b/drivers/event/cnxk/meson.build
@@ -31,6 +31,10 @@ if soc_type == 'cn9k' or soc_type == 'all'
 sources += files(
         'cn9k_eventdev.c',
         'cn9k_worker.c',
+)
+
+if host_machine.cpu_family().startswith('aarch')
+sources += files(
         'deq/cn9k/deq_0_15_burst.c',
         'deq/cn9k/deq_16_31_burst.c',
         'deq/cn9k/deq_32_47_burst.c',
@@ -330,11 +334,16 @@ sources += files(
         'tx/cn9k/tx_112_127_dual_seg.c',
 )
 endif
+endif

 if soc_type == 'cn10k' or soc_type == 'all'
 sources += files(
         'cn10k_eventdev.c',
         'cn10k_worker.c',
+)
+
+if host_machine.cpu_family().startswith('aarch')
+sources += files(
         'deq/cn10k/deq_0_15_burst.c',
         'deq/cn10k/deq_16_31_burst.c',
         'deq/cn10k/deq_32_47_burst.c',
@@ -484,6 +493,7 @@ sources += files(
         'tx/cn10k/tx_112_127_seg.c',
 )
 endif
+endif

 extra_flags = ['-flax-vector-conversions', '-Wno-strict-aliasing']
 foreach flag: extra_flags
diff --git a/drivers/net/cnxk/cn10k_rx_select.c b/drivers/net/cnxk/cn10k_rx_select.c
index 1e0de1b7ac..1d44f2924e 100644
--- a/drivers/net/cnxk/cn10k_rx_select.c
+++ b/drivers/net/cnxk/cn10k_rx_select.c
@@ -5,7 +5,7 @@
 #include "cn10k_ethdev.h"
 #include "cn10k_rx.h"

-static inline void
+static __rte_used void
 pick_rx_func(struct rte_eth_dev *eth_dev,
              const eth_rx_burst_t rx_burst[NIX_RX_OFFLOAD_MAX])
 {
@@ -25,6 +25,7 @@ pick_rx_func(struct rte_eth_dev *eth_dev,
 void
 cn10k_eth_set_rx_function(struct rte_eth_dev *eth_dev)
 {
+#if defined(RTE_ARCH_ARM64)
         struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);

         const eth_rx_burst_t nix_eth_rx_burst[NIX_RX_OFFLOAD_MAX] = {
@@ -111,4 +112,7 @@ cn10k_eth_set_rx_function(struct rte_eth_dev *eth_dev)
                 return pick_rx_func(eth_dev, nix_eth_rx_vec_burst_reas);
         else
                 return pick_rx_func(eth_dev, nix_eth_rx_vec_burst);
+#else
+       RTE_SET_USED(eth_dev);
+#endif
 }
diff --git a/drivers/net/cnxk/cn10k_tx_select.c b/drivers/net/cnxk/cn10k_tx_select.c
index 54023c4234..404f5ba979 100644
--- a/drivers/net/cnxk/cn10k_tx_select.c
+++ b/drivers/net/cnxk/cn10k_tx_select.c
@@ -5,7 +5,7 @@
 #include "cn10k_ethdev.h"
 #include "cn10k_tx.h"

-static inline void
+static __rte_used inline void
 pick_tx_func(struct rte_eth_dev *eth_dev,
              const eth_tx_burst_t tx_burst[NIX_TX_OFFLOAD_MAX])
 {
@@ -23,6 +23,7 @@ pick_tx_func(struct rte_eth_dev *eth_dev,
 void
 cn10k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
 {
+#if defined(RTE_ARCH_ARM64)
         struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);

         const eth_tx_burst_t nix_eth_tx_burst[NIX_TX_OFFLOAD_MAX] = {
@@ -64,4 +65,7 @@ cn10k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
         }

         rte_mb();
+#else
+       RTE_SET_USED(eth_dev);
+#endif
 }
diff --git a/drivers/net/cnxk/cn9k_rx_select.c b/drivers/net/cnxk/cn9k_rx_select.c
index 79f171fcc3..05bc33ce6a 100644
--- a/drivers/net/cnxk/cn9k_rx_select.c
+++ b/drivers/net/cnxk/cn9k_rx_select.c
@@ -5,7 +5,7 @@
 #include "cn9k_ethdev.h"
 #include "cn9k_rx.h"

-static inline void
+static __rte_used void
 pick_rx_func(struct rte_eth_dev *eth_dev,
              const eth_rx_burst_t rx_burst[NIX_RX_OFFLOAD_MAX])
 {
@@ -25,6 +25,7 @@ pick_rx_func(struct rte_eth_dev *eth_dev,
 void
 cn9k_eth_set_rx_function(struct rte_eth_dev *eth_dev)
 {
+#if defined(RTE_ARCH_ARM64)
         struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);

         const eth_rx_burst_t nix_eth_rx_burst[NIX_RX_OFFLOAD_MAX] = {
@@ -68,4 +69,7 @@ cn9k_eth_set_rx_function(struct rte_eth_dev *eth_dev)
         if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SCATTER)
                 return pick_rx_func(eth_dev, nix_eth_rx_vec_burst_mseg);
         return pick_rx_func(eth_dev, nix_eth_rx_vec_burst);
+#else
+       RTE_SET_USED(eth_dev);
+#endif
 }
diff --git a/drivers/net/cnxk/cn9k_tx_select.c b/drivers/net/cnxk/cn9k_tx_select.c
index 62beb1bf38..e08883f032 100644
--- a/drivers/net/cnxk/cn9k_tx_select.c
+++ b/drivers/net/cnxk/cn9k_tx_select.c
@@ -5,7 +5,7 @@
 #include "cn9k_ethdev.h"
 #include "cn9k_tx.h"

-static inline void
+static __rte_used void
 pick_tx_func(struct rte_eth_dev *eth_dev,
              const eth_tx_burst_t tx_burst[NIX_TX_OFFLOAD_MAX])
 {
@@ -23,6 +23,7 @@ pick_tx_func(struct rte_eth_dev *eth_dev,
 void
 cn9k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
 {
+#if defined(RTE_ARCH_ARM64)
         struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);

         const eth_tx_burst_t nix_eth_tx_burst[NIX_TX_OFFLOAD_MAX] = {
@@ -60,4 +61,7 @@ cn9k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
         }

         rte_mb();
+#else
+       RTE_SET_USED(eth_dev);
+#endif
 }
diff --git a/drivers/net/cnxk/meson.build b/drivers/net/cnxk/meson.build
index 62b8bb90fb..394d3d01f4 100644
--- a/drivers/net/cnxk/meson.build
+++ b/drivers/net/cnxk/meson.build
@@ -45,6 +45,7 @@ sources += files(
         'cn9k_tx_select.c',
 )

+if host_machine.cpu_family().startswith('aarch')
 sources += files(
         'rx/cn9k/rx_0_15.c',
         'rx/cn9k/rx_16_31.c',
@@ -115,6 +116,7 @@ sources += files(
         'tx/cn9k/tx_112_127_vec_mseg.c',
 )
 endif
+endif

 if soc_type == 'cn10k' or soc_type == 'all'
 # CN10K
@@ -126,6 +128,7 @@ sources += files(
         'cn10k_tx_select.c',
 )

+if host_machine.cpu_family().startswith('aarch')
 sources += files(
         'rx/cn10k/rx_0_15.c',
         'rx/cn10k/rx_16_31.c',
@@ -196,6 +199,7 @@ sources += files(
         'tx/cn10k/tx_112_127_vec_mseg.c',
 )
 endif
+endif

 deps += ['bus_pci', 'cryptodev', 'eventdev', 'security']
 deps += ['common_cnxk', 'mempool_cnxk']
--
2.40.1


[-- Attachment #2: Type: text/html, Size: 13991 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH v2] drivers/cnxk: improve the build time for non arm64 build
  2023-05-29  9:23 [dpdk-dev] [PATCH v1] drivers/cnxk: improve the build time for non arm64 build jerinj
  2023-05-31  1:35 ` Nithin Kumar Dabilpuram
@ 2023-06-12 16:06 ` jerinj
  2023-06-13  8:19   ` Jerin Jacob
  1 sibling, 1 reply; 4+ messages in thread
From: jerinj @ 2023-06-12 16:06 UTC (permalink / raw)
  To: dev, Pavan Nikhilesh, Shijith Thotton, Nithin Dabilpuram,
	Kiran Kumar K, Sunil Kumar Kori, Satha Rao
  Cc: Jerin Jacob

From: Jerin Jacob <jerinj@marvell.com>

Specialized fast path routines are not applicable to non
arm64 build, removing those function contained
files to improve the build time on non arm64 build.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
v2:
- Just resending to go through CI again.

 drivers/event/cnxk/cn10k_eventdev.c |  5 +++++
 drivers/event/cnxk/cn9k_eventdev.c  |  4 ++++
 drivers/event/cnxk/meson.build      | 10 ++++++++++
 drivers/net/cnxk/cn10k_rx_select.c  |  6 +++++-
 drivers/net/cnxk/cn10k_tx_select.c  |  6 +++++-
 drivers/net/cnxk/cn9k_rx_select.c   |  6 +++++-
 drivers/net/cnxk/cn9k_tx_select.c   |  6 +++++-
 drivers/net/cnxk/meson.build        |  4 ++++
 8 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c
index 670fc9e926..468549749f 100644
--- a/drivers/event/cnxk/cn10k_eventdev.c
+++ b/drivers/event/cnxk/cn10k_eventdev.c
@@ -297,7 +297,9 @@ cn10k_sso_updt_tx_adptr_data(const struct rte_eventdev *event_dev)
 static void
 cn10k_sso_fp_fns_set(struct rte_eventdev *event_dev)
 {
+#if defined(RTE_ARCH_ARM64)
 	struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev);
+
 	struct roc_cpt *cpt = roc_idev_cpt_get();
 	const event_dequeue_t sso_hws_deq[NIX_RX_OFFLOAD_MAX] = {
 #define R(name, flags)[flags] = cn10k_sso_hws_deq_##name,
@@ -473,6 +475,9 @@ cn10k_sso_fp_fns_set(struct rte_eventdev *event_dev)
 		CN10K_SET_EVDEV_ENQ_OP(dev, event_dev->txa_enqueue, sso_hws_tx_adptr_enq);
 
 	event_dev->txa_enqueue_same_dest = event_dev->txa_enqueue;
+#else
+	RTE_SET_USED(event_dev);
+#endif
 }
 
 static void
diff --git a/drivers/event/cnxk/cn9k_eventdev.c b/drivers/event/cnxk/cn9k_eventdev.c
index 7ed9aa1331..8e7af6ebd7 100644
--- a/drivers/event/cnxk/cn9k_eventdev.c
+++ b/drivers/event/cnxk/cn9k_eventdev.c
@@ -309,6 +309,7 @@ cn9k_sso_updt_tx_adptr_data(const struct rte_eventdev *event_dev)
 static void
 cn9k_sso_fp_fns_set(struct rte_eventdev *event_dev)
 {
+#if defined(RTE_ARCH_ARM64)
 	struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev);
 	/* Single WS modes */
 	const event_dequeue_t sso_hws_deq[NIX_RX_OFFLOAD_MAX] = {
@@ -511,6 +512,9 @@ cn9k_sso_fp_fns_set(struct rte_eventdev *event_dev)
 
 	event_dev->txa_enqueue_same_dest = event_dev->txa_enqueue;
 	rte_mb();
+#else
+	RTE_SET_USED(event_dev);
+#endif
 }
 
 static void *
diff --git a/drivers/event/cnxk/meson.build b/drivers/event/cnxk/meson.build
index e38d3b0244..63b926d34f 100644
--- a/drivers/event/cnxk/meson.build
+++ b/drivers/event/cnxk/meson.build
@@ -31,6 +31,10 @@ if soc_type == 'cn9k' or soc_type == 'all'
 sources += files(
         'cn9k_eventdev.c',
         'cn9k_worker.c',
+)
+
+if host_machine.cpu_family().startswith('aarch')
+sources += files(
         'deq/cn9k/deq_0_15_burst.c',
         'deq/cn9k/deq_16_31_burst.c',
         'deq/cn9k/deq_32_47_burst.c',
@@ -202,11 +206,16 @@ sources += files(
         'tx/cn9k/tx_112_127_dual_seg.c',
 )
 endif
+endif
 
 if soc_type == 'cn10k' or soc_type == 'all'
 sources += files(
         'cn10k_eventdev.c',
         'cn10k_worker.c',
+)
+
+if host_machine.cpu_family().startswith('aarch')
+sources += files(
         'deq/cn10k/deq_0_15_burst.c',
         'deq/cn10k/deq_16_31_burst.c',
         'deq/cn10k/deq_32_47_burst.c',
@@ -292,6 +301,7 @@ sources += files(
         'tx/cn10k/tx_112_127_seg.c',
 )
 endif
+endif
 
 extra_flags = ['-flax-vector-conversions', '-Wno-strict-aliasing']
 foreach flag: extra_flags
diff --git a/drivers/net/cnxk/cn10k_rx_select.c b/drivers/net/cnxk/cn10k_rx_select.c
index 1e0de1b7ac..1d44f2924e 100644
--- a/drivers/net/cnxk/cn10k_rx_select.c
+++ b/drivers/net/cnxk/cn10k_rx_select.c
@@ -5,7 +5,7 @@
 #include "cn10k_ethdev.h"
 #include "cn10k_rx.h"
 
-static inline void
+static __rte_used void
 pick_rx_func(struct rte_eth_dev *eth_dev,
 	     const eth_rx_burst_t rx_burst[NIX_RX_OFFLOAD_MAX])
 {
@@ -25,6 +25,7 @@ pick_rx_func(struct rte_eth_dev *eth_dev,
 void
 cn10k_eth_set_rx_function(struct rte_eth_dev *eth_dev)
 {
+#if defined(RTE_ARCH_ARM64)
 	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
 
 	const eth_rx_burst_t nix_eth_rx_burst[NIX_RX_OFFLOAD_MAX] = {
@@ -111,4 +112,7 @@ cn10k_eth_set_rx_function(struct rte_eth_dev *eth_dev)
 		return pick_rx_func(eth_dev, nix_eth_rx_vec_burst_reas);
 	else
 		return pick_rx_func(eth_dev, nix_eth_rx_vec_burst);
+#else
+	RTE_SET_USED(eth_dev);
+#endif
 }
diff --git a/drivers/net/cnxk/cn10k_tx_select.c b/drivers/net/cnxk/cn10k_tx_select.c
index 54023c4234..404f5ba979 100644
--- a/drivers/net/cnxk/cn10k_tx_select.c
+++ b/drivers/net/cnxk/cn10k_tx_select.c
@@ -5,7 +5,7 @@
 #include "cn10k_ethdev.h"
 #include "cn10k_tx.h"
 
-static inline void
+static __rte_used inline void
 pick_tx_func(struct rte_eth_dev *eth_dev,
 	     const eth_tx_burst_t tx_burst[NIX_TX_OFFLOAD_MAX])
 {
@@ -23,6 +23,7 @@ pick_tx_func(struct rte_eth_dev *eth_dev,
 void
 cn10k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
 {
+#if defined(RTE_ARCH_ARM64)
 	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
 
 	const eth_tx_burst_t nix_eth_tx_burst[NIX_TX_OFFLOAD_MAX] = {
@@ -64,4 +65,7 @@ cn10k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
 	}
 
 	rte_mb();
+#else
+	RTE_SET_USED(eth_dev);
+#endif
 }
diff --git a/drivers/net/cnxk/cn9k_rx_select.c b/drivers/net/cnxk/cn9k_rx_select.c
index 79f171fcc3..05bc33ce6a 100644
--- a/drivers/net/cnxk/cn9k_rx_select.c
+++ b/drivers/net/cnxk/cn9k_rx_select.c
@@ -5,7 +5,7 @@
 #include "cn9k_ethdev.h"
 #include "cn9k_rx.h"
 
-static inline void
+static __rte_used void
 pick_rx_func(struct rte_eth_dev *eth_dev,
 	     const eth_rx_burst_t rx_burst[NIX_RX_OFFLOAD_MAX])
 {
@@ -25,6 +25,7 @@ pick_rx_func(struct rte_eth_dev *eth_dev,
 void
 cn9k_eth_set_rx_function(struct rte_eth_dev *eth_dev)
 {
+#if defined(RTE_ARCH_ARM64)
 	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
 
 	const eth_rx_burst_t nix_eth_rx_burst[NIX_RX_OFFLOAD_MAX] = {
@@ -68,4 +69,7 @@ cn9k_eth_set_rx_function(struct rte_eth_dev *eth_dev)
 	if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SCATTER)
 		return pick_rx_func(eth_dev, nix_eth_rx_vec_burst_mseg);
 	return pick_rx_func(eth_dev, nix_eth_rx_vec_burst);
+#else
+	RTE_SET_USED(eth_dev);
+#endif
 }
diff --git a/drivers/net/cnxk/cn9k_tx_select.c b/drivers/net/cnxk/cn9k_tx_select.c
index 62beb1bf38..e08883f032 100644
--- a/drivers/net/cnxk/cn9k_tx_select.c
+++ b/drivers/net/cnxk/cn9k_tx_select.c
@@ -5,7 +5,7 @@
 #include "cn9k_ethdev.h"
 #include "cn9k_tx.h"
 
-static inline void
+static __rte_used void
 pick_tx_func(struct rte_eth_dev *eth_dev,
 	     const eth_tx_burst_t tx_burst[NIX_TX_OFFLOAD_MAX])
 {
@@ -23,6 +23,7 @@ pick_tx_func(struct rte_eth_dev *eth_dev,
 void
 cn9k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
 {
+#if defined(RTE_ARCH_ARM64)
 	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
 
 	const eth_tx_burst_t nix_eth_tx_burst[NIX_TX_OFFLOAD_MAX] = {
@@ -60,4 +61,7 @@ cn9k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
 	}
 
 	rte_mb();
+#else
+	RTE_SET_USED(eth_dev);
+#endif
 }
diff --git a/drivers/net/cnxk/meson.build b/drivers/net/cnxk/meson.build
index 62b8bb90fb..394d3d01f4 100644
--- a/drivers/net/cnxk/meson.build
+++ b/drivers/net/cnxk/meson.build
@@ -45,6 +45,7 @@ sources += files(
         'cn9k_tx_select.c',
 )
 
+if host_machine.cpu_family().startswith('aarch')
 sources += files(
         'rx/cn9k/rx_0_15.c',
         'rx/cn9k/rx_16_31.c',
@@ -115,6 +116,7 @@ sources += files(
         'tx/cn9k/tx_112_127_vec_mseg.c',
 )
 endif
+endif
 
 if soc_type == 'cn10k' or soc_type == 'all'
 # CN10K
@@ -126,6 +128,7 @@ sources += files(
         'cn10k_tx_select.c',
 )
 
+if host_machine.cpu_family().startswith('aarch')
 sources += files(
         'rx/cn10k/rx_0_15.c',
         'rx/cn10k/rx_16_31.c',
@@ -196,6 +199,7 @@ sources += files(
         'tx/cn10k/tx_112_127_vec_mseg.c',
 )
 endif
+endif
 
 deps += ['bus_pci', 'cryptodev', 'eventdev', 'security']
 deps += ['common_cnxk', 'mempool_cnxk']
-- 
2.41.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v2] drivers/cnxk: improve the build time for non arm64 build
  2023-06-12 16:06 ` [dpdk-dev] [PATCH v2] " jerinj
@ 2023-06-13  8:19   ` Jerin Jacob
  0 siblings, 0 replies; 4+ messages in thread
From: Jerin Jacob @ 2023-06-13  8:19 UTC (permalink / raw)
  To: jerinj
  Cc: dev, Pavan Nikhilesh, Shijith Thotton, Nithin Dabilpuram,
	Kiran Kumar K, Sunil Kumar Kori, Satha Rao

On Mon, Jun 12, 2023 at 9:36 PM <jerinj@marvell.com> wrote:
>
> From: Jerin Jacob <jerinj@marvell.com>
>
> Specialized fast path routines are not applicable to non
> arm64 build, removing those function contained
> files to improve the build time on non arm64 build.
>
> Signed-off-by: Jerin Jacob <jerinj@marvell.com>
> Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>


Applied to dpdk-next-net-mrvl/for-next-net. Thanks


> ---
> v2:
> - Just resending to go through CI again.
>
>  drivers/event/cnxk/cn10k_eventdev.c |  5 +++++
>  drivers/event/cnxk/cn9k_eventdev.c  |  4 ++++
>  drivers/event/cnxk/meson.build      | 10 ++++++++++
>  drivers/net/cnxk/cn10k_rx_select.c  |  6 +++++-
>  drivers/net/cnxk/cn10k_tx_select.c  |  6 +++++-
>  drivers/net/cnxk/cn9k_rx_select.c   |  6 +++++-
>  drivers/net/cnxk/cn9k_tx_select.c   |  6 +++++-
>  drivers/net/cnxk/meson.build        |  4 ++++
>  8 files changed, 43 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c
> index 670fc9e926..468549749f 100644
> --- a/drivers/event/cnxk/cn10k_eventdev.c
> +++ b/drivers/event/cnxk/cn10k_eventdev.c
> @@ -297,7 +297,9 @@ cn10k_sso_updt_tx_adptr_data(const struct rte_eventdev *event_dev)
>  static void
>  cn10k_sso_fp_fns_set(struct rte_eventdev *event_dev)
>  {
> +#if defined(RTE_ARCH_ARM64)
>         struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev);
> +
>         struct roc_cpt *cpt = roc_idev_cpt_get();
>         const event_dequeue_t sso_hws_deq[NIX_RX_OFFLOAD_MAX] = {
>  #define R(name, flags)[flags] = cn10k_sso_hws_deq_##name,
> @@ -473,6 +475,9 @@ cn10k_sso_fp_fns_set(struct rte_eventdev *event_dev)
>                 CN10K_SET_EVDEV_ENQ_OP(dev, event_dev->txa_enqueue, sso_hws_tx_adptr_enq);
>
>         event_dev->txa_enqueue_same_dest = event_dev->txa_enqueue;
> +#else
> +       RTE_SET_USED(event_dev);
> +#endif
>  }
>
>  static void
> diff --git a/drivers/event/cnxk/cn9k_eventdev.c b/drivers/event/cnxk/cn9k_eventdev.c
> index 7ed9aa1331..8e7af6ebd7 100644
> --- a/drivers/event/cnxk/cn9k_eventdev.c
> +++ b/drivers/event/cnxk/cn9k_eventdev.c
> @@ -309,6 +309,7 @@ cn9k_sso_updt_tx_adptr_data(const struct rte_eventdev *event_dev)
>  static void
>  cn9k_sso_fp_fns_set(struct rte_eventdev *event_dev)
>  {
> +#if defined(RTE_ARCH_ARM64)
>         struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev);
>         /* Single WS modes */
>         const event_dequeue_t sso_hws_deq[NIX_RX_OFFLOAD_MAX] = {
> @@ -511,6 +512,9 @@ cn9k_sso_fp_fns_set(struct rte_eventdev *event_dev)
>
>         event_dev->txa_enqueue_same_dest = event_dev->txa_enqueue;
>         rte_mb();
> +#else
> +       RTE_SET_USED(event_dev);
> +#endif
>  }
>
>  static void *
> diff --git a/drivers/event/cnxk/meson.build b/drivers/event/cnxk/meson.build
> index e38d3b0244..63b926d34f 100644
> --- a/drivers/event/cnxk/meson.build
> +++ b/drivers/event/cnxk/meson.build
> @@ -31,6 +31,10 @@ if soc_type == 'cn9k' or soc_type == 'all'
>  sources += files(
>          'cn9k_eventdev.c',
>          'cn9k_worker.c',
> +)
> +
> +if host_machine.cpu_family().startswith('aarch')
> +sources += files(
>          'deq/cn9k/deq_0_15_burst.c',
>          'deq/cn9k/deq_16_31_burst.c',
>          'deq/cn9k/deq_32_47_burst.c',
> @@ -202,11 +206,16 @@ sources += files(
>          'tx/cn9k/tx_112_127_dual_seg.c',
>  )
>  endif
> +endif
>
>  if soc_type == 'cn10k' or soc_type == 'all'
>  sources += files(
>          'cn10k_eventdev.c',
>          'cn10k_worker.c',
> +)
> +
> +if host_machine.cpu_family().startswith('aarch')
> +sources += files(
>          'deq/cn10k/deq_0_15_burst.c',
>          'deq/cn10k/deq_16_31_burst.c',
>          'deq/cn10k/deq_32_47_burst.c',
> @@ -292,6 +301,7 @@ sources += files(
>          'tx/cn10k/tx_112_127_seg.c',
>  )
>  endif
> +endif
>
>  extra_flags = ['-flax-vector-conversions', '-Wno-strict-aliasing']
>  foreach flag: extra_flags
> diff --git a/drivers/net/cnxk/cn10k_rx_select.c b/drivers/net/cnxk/cn10k_rx_select.c
> index 1e0de1b7ac..1d44f2924e 100644
> --- a/drivers/net/cnxk/cn10k_rx_select.c
> +++ b/drivers/net/cnxk/cn10k_rx_select.c
> @@ -5,7 +5,7 @@
>  #include "cn10k_ethdev.h"
>  #include "cn10k_rx.h"
>
> -static inline void
> +static __rte_used void
>  pick_rx_func(struct rte_eth_dev *eth_dev,
>              const eth_rx_burst_t rx_burst[NIX_RX_OFFLOAD_MAX])
>  {
> @@ -25,6 +25,7 @@ pick_rx_func(struct rte_eth_dev *eth_dev,
>  void
>  cn10k_eth_set_rx_function(struct rte_eth_dev *eth_dev)
>  {
> +#if defined(RTE_ARCH_ARM64)
>         struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
>
>         const eth_rx_burst_t nix_eth_rx_burst[NIX_RX_OFFLOAD_MAX] = {
> @@ -111,4 +112,7 @@ cn10k_eth_set_rx_function(struct rte_eth_dev *eth_dev)
>                 return pick_rx_func(eth_dev, nix_eth_rx_vec_burst_reas);
>         else
>                 return pick_rx_func(eth_dev, nix_eth_rx_vec_burst);
> +#else
> +       RTE_SET_USED(eth_dev);
> +#endif
>  }
> diff --git a/drivers/net/cnxk/cn10k_tx_select.c b/drivers/net/cnxk/cn10k_tx_select.c
> index 54023c4234..404f5ba979 100644
> --- a/drivers/net/cnxk/cn10k_tx_select.c
> +++ b/drivers/net/cnxk/cn10k_tx_select.c
> @@ -5,7 +5,7 @@
>  #include "cn10k_ethdev.h"
>  #include "cn10k_tx.h"
>
> -static inline void
> +static __rte_used inline void
>  pick_tx_func(struct rte_eth_dev *eth_dev,
>              const eth_tx_burst_t tx_burst[NIX_TX_OFFLOAD_MAX])
>  {
> @@ -23,6 +23,7 @@ pick_tx_func(struct rte_eth_dev *eth_dev,
>  void
>  cn10k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
>  {
> +#if defined(RTE_ARCH_ARM64)
>         struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
>
>         const eth_tx_burst_t nix_eth_tx_burst[NIX_TX_OFFLOAD_MAX] = {
> @@ -64,4 +65,7 @@ cn10k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
>         }
>
>         rte_mb();
> +#else
> +       RTE_SET_USED(eth_dev);
> +#endif
>  }
> diff --git a/drivers/net/cnxk/cn9k_rx_select.c b/drivers/net/cnxk/cn9k_rx_select.c
> index 79f171fcc3..05bc33ce6a 100644
> --- a/drivers/net/cnxk/cn9k_rx_select.c
> +++ b/drivers/net/cnxk/cn9k_rx_select.c
> @@ -5,7 +5,7 @@
>  #include "cn9k_ethdev.h"
>  #include "cn9k_rx.h"
>
> -static inline void
> +static __rte_used void
>  pick_rx_func(struct rte_eth_dev *eth_dev,
>              const eth_rx_burst_t rx_burst[NIX_RX_OFFLOAD_MAX])
>  {
> @@ -25,6 +25,7 @@ pick_rx_func(struct rte_eth_dev *eth_dev,
>  void
>  cn9k_eth_set_rx_function(struct rte_eth_dev *eth_dev)
>  {
> +#if defined(RTE_ARCH_ARM64)
>         struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
>
>         const eth_rx_burst_t nix_eth_rx_burst[NIX_RX_OFFLOAD_MAX] = {
> @@ -68,4 +69,7 @@ cn9k_eth_set_rx_function(struct rte_eth_dev *eth_dev)
>         if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SCATTER)
>                 return pick_rx_func(eth_dev, nix_eth_rx_vec_burst_mseg);
>         return pick_rx_func(eth_dev, nix_eth_rx_vec_burst);
> +#else
> +       RTE_SET_USED(eth_dev);
> +#endif
>  }
> diff --git a/drivers/net/cnxk/cn9k_tx_select.c b/drivers/net/cnxk/cn9k_tx_select.c
> index 62beb1bf38..e08883f032 100644
> --- a/drivers/net/cnxk/cn9k_tx_select.c
> +++ b/drivers/net/cnxk/cn9k_tx_select.c
> @@ -5,7 +5,7 @@
>  #include "cn9k_ethdev.h"
>  #include "cn9k_tx.h"
>
> -static inline void
> +static __rte_used void
>  pick_tx_func(struct rte_eth_dev *eth_dev,
>              const eth_tx_burst_t tx_burst[NIX_TX_OFFLOAD_MAX])
>  {
> @@ -23,6 +23,7 @@ pick_tx_func(struct rte_eth_dev *eth_dev,
>  void
>  cn9k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
>  {
> +#if defined(RTE_ARCH_ARM64)
>         struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
>
>         const eth_tx_burst_t nix_eth_tx_burst[NIX_TX_OFFLOAD_MAX] = {
> @@ -60,4 +61,7 @@ cn9k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
>         }
>
>         rte_mb();
> +#else
> +       RTE_SET_USED(eth_dev);
> +#endif
>  }
> diff --git a/drivers/net/cnxk/meson.build b/drivers/net/cnxk/meson.build
> index 62b8bb90fb..394d3d01f4 100644
> --- a/drivers/net/cnxk/meson.build
> +++ b/drivers/net/cnxk/meson.build
> @@ -45,6 +45,7 @@ sources += files(
>          'cn9k_tx_select.c',
>  )
>
> +if host_machine.cpu_family().startswith('aarch')
>  sources += files(
>          'rx/cn9k/rx_0_15.c',
>          'rx/cn9k/rx_16_31.c',
> @@ -115,6 +116,7 @@ sources += files(
>          'tx/cn9k/tx_112_127_vec_mseg.c',
>  )
>  endif
> +endif
>
>  if soc_type == 'cn10k' or soc_type == 'all'
>  # CN10K
> @@ -126,6 +128,7 @@ sources += files(
>          'cn10k_tx_select.c',
>  )
>
> +if host_machine.cpu_family().startswith('aarch')
>  sources += files(
>          'rx/cn10k/rx_0_15.c',
>          'rx/cn10k/rx_16_31.c',
> @@ -196,6 +199,7 @@ sources += files(
>          'tx/cn10k/tx_112_127_vec_mseg.c',
>  )
>  endif
> +endif
>
>  deps += ['bus_pci', 'cryptodev', 'eventdev', 'security']
>  deps += ['common_cnxk', 'mempool_cnxk']
> --
> 2.41.0
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-13  8:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29  9:23 [dpdk-dev] [PATCH v1] drivers/cnxk: improve the build time for non arm64 build jerinj
2023-05-31  1:35 ` Nithin Kumar Dabilpuram
2023-06-12 16:06 ` [dpdk-dev] [PATCH v2] " jerinj
2023-06-13  8:19   ` Jerin Jacob

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).