DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/cnxk: fix uninitialized scalar variable
@ 2022-04-24 16:18 Gowrishankar Muthukrishnan
  2022-05-05  8:37 ` Jerin Jacob
  0 siblings, 1 reply; 3+ messages in thread
From: Gowrishankar Muthukrishnan @ 2022-04-24 16:18 UTC (permalink / raw)
  To: dev
  Cc: Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori,
	Satha Rao, Gowrishankar Muthukrishnan

Fix uninitialized scalar variable reported in coverity scan.

Coverity issue: 371876, 371877
Fixes: 39dc567c195 ("net/cnxk: add Tx burst for CN9K")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
 drivers/net/cnxk/cn9k_tx.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h
index f55cd4bdf2..a0611a67c9 100644
--- a/drivers/net/cnxk/cn9k_tx.h
+++ b/drivers/net/cnxk/cn9k_tx.h
@@ -526,7 +526,7 @@ cn9k_nix_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t pkts,
 {
 	struct cn9k_eth_txq *txq = tx_queue;
 	const rte_iova_t io_addr = txq->io_addr;
-	uint64_t lso_tun_fmt, mark_fmt = 0;
+	uint64_t lso_tun_fmt = 0, mark_fmt = 0;
 	void *lmt_addr = txq->lmt_addr;
 	uint8_t mark_flag = 0;
 	uint16_t i;
@@ -574,7 +574,7 @@ cn9k_nix_xmit_pkts_mseg(void *tx_queue, struct rte_mbuf **tx_pkts,
 {
 	struct cn9k_eth_txq *txq = tx_queue;
 	const rte_iova_t io_addr = txq->io_addr;
-	uint64_t lso_tun_fmt, mark_fmt = 0;
+	uint64_t lso_tun_fmt = 0, mark_fmt = 0;
 	void *lmt_addr = txq->lmt_addr;
 	uint8_t mark_flag = 0;
 	uint16_t segdw;
-- 
2.25.1


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

* Re: [PATCH] net/cnxk: fix uninitialized scalar variable
  2022-04-24 16:18 [PATCH] net/cnxk: fix uninitialized scalar variable Gowrishankar Muthukrishnan
@ 2022-05-05  8:37 ` Jerin Jacob
  0 siblings, 0 replies; 3+ messages in thread
From: Jerin Jacob @ 2022-05-05  8:37 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan, Thomas Monjalon
  Cc: dpdk-dev, Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K,
	Sunil Kumar Kori, Satha Rao

On Sun, Apr 24, 2022 at 9:48 PM Gowrishankar Muthukrishnan
<gmuthukrishn@marvell.com> wrote:
>
> Fix uninitialized scalar variable reported in coverity scan.
>
> Coverity issue: 371876, 371877
> Fixes: 39dc567c195 ("net/cnxk: add Tx burst for CN9K")
>
> Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>

Squashed similar patch
https://patchwork.dpdk.org/project/dpdk/patch/20220424162239.1680904-1-gmuthukrishn@marvell.com/

Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-mrvl/for-next-net. Thanks


> ---
>  drivers/net/cnxk/cn9k_tx.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h
> index f55cd4bdf2..a0611a67c9 100644
> --- a/drivers/net/cnxk/cn9k_tx.h
> +++ b/drivers/net/cnxk/cn9k_tx.h
> @@ -526,7 +526,7 @@ cn9k_nix_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t pkts,
>  {
>         struct cn9k_eth_txq *txq = tx_queue;
>         const rte_iova_t io_addr = txq->io_addr;
> -       uint64_t lso_tun_fmt, mark_fmt = 0;
> +       uint64_t lso_tun_fmt = 0, mark_fmt = 0;
>         void *lmt_addr = txq->lmt_addr;
>         uint8_t mark_flag = 0;
>         uint16_t i;
> @@ -574,7 +574,7 @@ cn9k_nix_xmit_pkts_mseg(void *tx_queue, struct rte_mbuf **tx_pkts,
>  {
>         struct cn9k_eth_txq *txq = tx_queue;
>         const rte_iova_t io_addr = txq->io_addr;
> -       uint64_t lso_tun_fmt, mark_fmt = 0;
> +       uint64_t lso_tun_fmt = 0, mark_fmt = 0;
>         void *lmt_addr = txq->lmt_addr;
>         uint8_t mark_flag = 0;
>         uint16_t segdw;
> --
> 2.25.1
>

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

* [PATCH] net/cnxk: fix uninitialized scalar variable
@ 2022-04-24 16:22 Gowrishankar Muthukrishnan
  0 siblings, 0 replies; 3+ messages in thread
From: Gowrishankar Muthukrishnan @ 2022-04-24 16:22 UTC (permalink / raw)
  To: dev
  Cc: Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori,
	Satha Rao, Gowrishankar Muthukrishnan

Fix uninitialized scalar variable reported in coverity scan.

Coverity issue: 371872, 371880
Fixes: 19f3af2371a ("net/cnxk: add Tx burst for CN10K")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
 drivers/net/cnxk/cn10k_tx.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index de88a21e08..5d4003c5d4 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -866,10 +866,10 @@ cn10k_nix_xmit_pkts(void *tx_queue, uint64_t *ws, struct rte_mbuf **tx_pkts,
 	uintptr_t pa, lbase = txq->lmt_base;
 	uint16_t lmt_id, burst, left, i;
 	uintptr_t c_lbase = lbase;
+	uint64_t lso_tun_fmt = 0;
 	uint64_t mark_fmt = 0;
 	uint8_t mark_flag = 0;
 	rte_iova_t c_io_addr;
-	uint64_t lso_tun_fmt;
 	uint16_t c_lmt_id;
 	uint64_t sa_base;
 	uintptr_t laddr;
@@ -999,11 +999,11 @@ cn10k_nix_xmit_pkts_mseg(void *tx_queue, uint64_t *ws,
 	uint16_t segdw, lmt_id, burst, left, i;
 	uint8_t lnum, c_lnum, c_loff;
 	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;
-	uint64_t lso_tun_fmt;
 	uint8_t shft, c_shft;
 	__uint128_t data128;
 	uint16_t c_lmt_id;
-- 
2.25.1


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

end of thread, other threads:[~2022-05-05  8:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-24 16:18 [PATCH] net/cnxk: fix uninitialized scalar variable Gowrishankar Muthukrishnan
2022-05-05  8:37 ` Jerin Jacob
2022-04-24 16:22 Gowrishankar Muthukrishnan

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