public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	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>,
	Harman Kalra <hkalra@marvell.com>
Subject: Re: [EXTERNAL] [RFC] net/cnxk: only build if platform is specified
Date: Thu, 26 Feb 2026 13:16:56 -0800	[thread overview]
Message-ID: <20260226131656.455bc76f@phoenix.local> (raw)
In-Reply-To: <PH0PR18MB40866F9E996747CAF9CA5443DE72A@PH0PR18MB4086.namprd18.prod.outlook.com>

On Thu, 26 Feb 2026 04:50:01 +0000
Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com> wrote:

> >> >Good idea, but fails miserably.  
> >>
> >> My bad, here is the full fix, verified on our arm64 machine with
> >> meson setup build -Dplatform=generic  
> >
> >
> >Ok but other than getting more build coverage, is there any point in
> >building this code on a generic platform?  
> 
> The driver can be used with distro packages, though it won’t be optimized for performance.


With some defuzzing of the diff, got it to build.
The old build time was 11 minutes, now down to 2:33.

Here is what was needed to get rid of uninit warnings:


 drivers/event/cnxk/meson.build |  5 +++++
 drivers/net/cnxk/cn10k_tx.h    | 34 +++++++++++++++++-----------------
 drivers/net/cnxk/cn9k_tx.h     |  6 +++---
 drivers/net/cnxk/meson.build   |  5 +++++
 4 files changed, 30 insertions(+), 20 deletions(-)

diff --git a/drivers/event/cnxk/meson.build b/drivers/event/cnxk/meson.build
index 24b48d045f..c21e01c930 100644
--- a/drivers/event/cnxk/meson.build
+++ b/drivers/event/cnxk/meson.build
@@ -36,6 +36,11 @@ if meson.version().version_compare('>=1.1.0')
         endif
 endif
 
+if soc_type == 'all'
+    disable_template = true
+    cflags += '-DCNXK_DIS_TMPLT_FUNC'
+endif
+
 if soc_type == 'cn9k' or soc_type == 'all'
 sources += files(
         'cn9k_eventdev.c',
diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index be9e020ac5..05a82cfe7d 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -1445,7 +1445,7 @@ cn10k_nix_xmit_pkts(void *tx_queue, uint64_t *ws, struct rte_mbuf **tx_pkts,
 {
 	struct cn10k_eth_txq *txq = tx_queue;
 	const rte_iova_t io_addr = txq->io_addr;
-	uint8_t lnum, c_lnum, c_shft, c_loff;
+	uint8_t lnum, c_lnum = 0, c_shft = 0, c_loff = 0;
 	uintptr_t pa, lbase = txq->lmt_base;
 	uint16_t lmt_id, burst, left, i;
 	struct rte_mbuf *extm = NULL;
@@ -1453,9 +1453,9 @@ cn10k_nix_xmit_pkts(void *tx_queue, uint64_t *ws, struct rte_mbuf **tx_pkts,
 	uint64_t lso_tun_fmt = 0;
 	uint64_t mark_fmt = 0;
 	uint8_t mark_flag = 0;
-	rte_iova_t c_io_addr;
-	uint16_t c_lmt_id;
-	uint64_t sa_base;
+	rte_iova_t c_io_addr = 0;
+	uint16_t c_lmt_id = 0;
+	uint64_t sa_base = 0;
 	uintptr_t laddr;
 	uint64_t data;
 	bool sec;
@@ -1599,17 +1599,17 @@ cn10k_nix_xmit_pkts_mseg(void *tx_queue, uint64_t *ws,
 	const rte_iova_t io_addr = txq->io_addr;
 	uint16_t segdw, lmt_id, burst, left, i;
 	struct rte_mbuf *extm = NULL;
-	uint8_t lnum, c_lnum, c_loff;
+	uint8_t lnum, c_lnum = 0, c_loff = 0;
 	uintptr_t c_lbase = lbase;
 	uint64_t lso_tun_fmt = 0;
 	uint64_t mark_fmt = 0;
 	uint8_t mark_flag = 0;
 	uint64_t data0, data1;
 	rte_iova_t c_io_addr;
-	uint8_t shft, c_shft;
+	uint8_t shft, c_shft = 0;
 	__uint128_t data128;
 	uint16_t c_lmt_id;
-	uint64_t sa_base;
+	uint64_t sa_base = 0;
 	uintptr_t laddr;
 	bool sec;
 
@@ -2166,14 +2166,14 @@ cn10k_nix_xmit_pkts_vector(void *tx_queue, uint64_t *ws,
 	uint64x2_t len_olflags0, len_olflags1, len_olflags2, len_olflags3;
 	uint64x2_t cmd0[NIX_DESCS_PER_LOOP], cmd1[NIX_DESCS_PER_LOOP],
 		cmd2[NIX_DESCS_PER_LOOP], cmd3[NIX_DESCS_PER_LOOP];
-	uint16_t left, scalar, burst, i, lmt_id, c_lmt_id;
+	uint16_t left, scalar, burst, i, lmt_id, c_lmt_id = 0;
 	uint64_t *mbuf0, *mbuf1, *mbuf2, *mbuf3, pa;
-	uint64x2_t senddesc01_w0, senddesc23_w0;
-	uint64x2_t senddesc01_w1, senddesc23_w1;
-	uint64x2_t sendext01_w0, sendext23_w0;
-	uint64x2_t sendext01_w1, sendext23_w1;
-	uint64x2_t sendmem01_w0, sendmem23_w0;
-	uint64x2_t sendmem01_w1, sendmem23_w1;
+	uint64x2_t senddesc01_w0 = {0}, senddesc23_w0 = {0};
+	uint64x2_t senddesc01_w1 = {0}, senddesc23_w1 = {0};
+	uint64x2_t sendext01_w0 = {0}, sendext23_w0 = {0};
+	uint64x2_t sendext01_w1 = {0}, sendext23_w1 = {0};
+	uint64x2_t sendmem01_w0 = {0}, sendmem23_w0 = {0};
+	uint64x2_t sendmem01_w1 = {0}, sendmem23_w1;
 	uint8_t segdw[NIX_DESCS_PER_LOOP + 1];
 	uint64x2_t sgdesc01_w0, sgdesc23_w0;
 	uint64x2_t sgdesc01_w1, sgdesc23_w1;
@@ -2181,13 +2181,13 @@ cn10k_nix_xmit_pkts_vector(void *tx_queue, uint64_t *ws,
 	rte_iova_t io_addr = txq->io_addr;
 	uint8_t lnum, shift = 0, loff = 0;
 	uintptr_t laddr = txq->lmt_base;
-	uint8_t c_lnum, c_shft, c_loff;
+	uint8_t c_lnum = 0, c_shft = 0, c_loff = 0;
 	uint64x2_t ltypes01, ltypes23;
 	uint64x2_t xtmp128, ytmp128;
 	uint64x2_t xmask01, xmask23;
 	uintptr_t c_laddr = laddr;
-	rte_iova_t c_io_addr;
-	uint64_t sa_base;
+	rte_iova_t c_io_addr = 0;
+	uint64_t sa_base = 0;
 	union wdata {
 		__uint128_t data128;
 		uint64_t data[2];
diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h
index 14594b6311..8c9e84f64b 100644
--- a/drivers/net/cnxk/cn9k_tx.h
+++ b/drivers/net/cnxk/cn9k_tx.h
@@ -1185,10 +1185,10 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts,
 	uint64_t *mbuf0, *mbuf1, *mbuf2, *mbuf3;
 	uint64x2_t senddesc01_w0, senddesc23_w0;
 	uint64x2_t senddesc01_w1, senddesc23_w1;
-	uint64x2_t sendext01_w0, sendext23_w0;
-	uint64x2_t sendext01_w1, sendext23_w1;
+	uint64x2_t sendext01_w0 = {0}, sendext23_w0 = {0};
+	uint64x2_t sendext01_w1 = {0}, sendext23_w1 = {0};
 	uint64x2_t sendmem01_w0, sendmem23_w0;
-	uint64x2_t sendmem01_w1, sendmem23_w1;
+	uint64x2_t sendmem01_w1 = {0}, sendmem23_w1;
 	uint64x2_t sgdesc01_w0, sgdesc23_w0;
 	uint64x2_t sgdesc01_w1, sgdesc23_w1;
 	struct cn9k_eth_txq *txq = tx_queue;
diff --git a/drivers/net/cnxk/meson.build b/drivers/net/cnxk/meson.build
index 53caa6c171..a0d9849595 100644
--- a/drivers/net/cnxk/meson.build
+++ b/drivers/net/cnxk/meson.build
@@ -52,6 +52,11 @@ if meson.version().version_compare('>=1.1.0')
         endif
 endif
 
+if soc_type == 'all'
+    disable_template = true
+    cflags += '-DCNXK_DIS_TMPLT_FUNC'
+endif
+
 if soc_type == 'cn9k' or soc_type == 'all'
 # CN9K
 sources += files(
-- 
2.39.5


  reply	other threads:[~2026-02-26 21:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24 20:37 [RFC] net/cnxk: only build if platform is specified Stephen Hemminger
2026-02-25  8:01 ` [EXTERNAL] " Pavan Nikhilesh Bhagavatula
2026-02-25 17:43   ` Stephen Hemminger
2026-02-25 19:30     ` Pavan Nikhilesh Bhagavatula
2026-02-25 22:20       ` Stephen Hemminger
2026-02-26  4:50         ` Pavan Nikhilesh Bhagavatula
2026-02-26 21:16           ` Stephen Hemminger [this message]
2026-02-27 13:03             ` Pavan Nikhilesh Bhagavatula

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=20260226131656.455bc76f@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=hkalra@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=pbhagavatula@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.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