Skip to contentSkip to conversation

examples/qos_sched: fix uninitialized scalar variable

PATCH In review Jasvinder Singh 3 participants 5 messages Oct 23, 2017 – Oct 24, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples/qos_sched: fix uninitialized scalar variable

Fix problem with uninitialized rx/tx deferred_start flags of the struct rte_eth_rxconf/txconf by initializing with 0 value (deferred start of the rx/tx queues is turned off). This setting allows device rx/tx queues to start with rte_eth_dev_start().

CID 194999 (#1 of 1): Uninitialized scalar variable (UNINIT) CID 195009 (#1 of 1): Uninitialized scalar variable (UNINIT)

Fixes de3cfa2c9823 ("sched: initial import")
---
 examples/qos_sched/init.c | 2 ++
 1 file changed, 2 insertions(+)
examples/qos_sched/init.c +2 -0
index 004ac54..038f042 100644
@@ -118,6 +118,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
 	rx_conf.rx_thresh.wthresh = rx_thresh.wthresh;
 	rx_conf.rx_free_thresh = 32;
 	rx_conf.rx_drop_en = 0;
+	rx_conf.rx_deferred_start = 0;
 
 	tx_conf.tx_thresh.pthresh = tx_thresh.pthresh;
 	tx_conf.tx_thresh.hthresh = tx_thresh.hthresh;
@@ -125,6 +126,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
 	tx_conf.tx_free_thresh = 0;
 	tx_conf.tx_rs_thresh = 0;
 	tx_conf.txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS | ETH_TXQ_FLAGS_NOOFFLOADS;
+	tx_conf.tx_deferred_start = 0;
 
 	/* init port */
 	RTE_LOG(INFO, APP, "Initializing port %"PRIu16"... ", portid);
Signature · 1 line
2.9.3
#1 lore raw
Quoted 7 lines · Jasvinder Singh

Fix problem with uninitialized rx/tx deferred_start flags of the struct rte_eth_rxconf/txconf by initializing with 0 value (deferred start of the rx/tx queues is turned off). This setting allows device rx/tx queues to start with rte_eth_dev_start().

CID 194999 (#1 of 1): Uninitialized scalar variable (UNINIT) CID 195009 (#1 of 1): Uninitialized scalar variable (UNINIT)

Is this Coverity ID? If so we have a defined format for it:

Coverity issue: xxxxxx
Fixes: yyyyyyyyyyyy ("..................")
Cc: [email protected] [if required]

Signed-off-by .....

Thanks,
ferruh

Quoted 29 lines
Fixes de3cfa2c9823 ("sched: initial import")
---
 examples/qos_sched/init.c | 2 ++
 1 file changed, 2 insertions(+)
examples/qos_sched/init.c +2 -0
index 004ac54..038f042 100644
@@ -118,6 +118,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
 	rx_conf.rx_thresh.wthresh = rx_thresh.wthresh;
 	rx_conf.rx_free_thresh = 32;
 	rx_conf.rx_drop_en = 0;
+	rx_conf.rx_deferred_start = 0;
 
 	tx_conf.tx_thresh.pthresh = tx_thresh.pthresh;
 	tx_conf.tx_thresh.hthresh = tx_thresh.hthresh;
@@ -125,6 +126,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
 	tx_conf.tx_free_thresh = 0;
 	tx_conf.tx_rs_thresh = 0;
 	tx_conf.txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS | ETH_TXQ_FLAGS_NOOFFLOADS;
+	tx_conf.tx_deferred_start = 0;
 
 	/* init port */
 	RTE_LOG(INFO, APP, "Initializing port %"PRIu16"... ", portid);
#2 lore raw
Quoted 16 lines

-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, October 23, 2017 5:32 PM
To: Singh, Jasvinder <[email protected]>; [email protected]
Cc: Dumitrescu, Cristian <[email protected]>; Mcnamara, John <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] examples/qos_sched: fix uninitialized scalar variable

Quoted 5 lines · Jasvinder Singh

Fix problem with uninitialized rx/tx deferred_start flags of the struct rte_eth_rxconf/txconf by initializing with 0 value (deferred start of the rx/tx queues is turned off). This setting allows device rx/tx queues to start with rte_eth_dev_start().

Quoted 4 lines
Quoted 2 lines

CID 194999 (#1 of 1): Uninitialized scalar variable (UNINIT) CID 195009 (#1 of 1): Uninitialized scalar variable (UNINIT)

Is this Coverity ID? If so we have a defined format for it:

Yes, this is coverity issue.

Quoted 6 lines

Coverity issue: xxxxxx
Fixes: yyyyyyyyyyyy ("..................")
Cc: [email protected] [if required]

Signed-off-by .....

Ok, I will resend the patch.

#3 lore raw

PATCH 1/1 examples/qos_sched: fix uninitialized scalar variable

In reply to Jasvinder Singh

Fix problem with uninitialized rx/tx deferred_start flags of the struct rte_eth_rxconf/txconf by initializing with 0 value (deferred start of the rx/tx queues is turned off). This setting allows device rx/tx queues to start with rte_eth_dev_start().

Coverity issue: 194999, 195009 (Uninitialized scalar variable)

Fixes de3cfa2c9823 ("sched: initial import")
---
 examples/qos_sched/init.c | 2 ++
 1 file changed, 2 insertions(+)
examples/qos_sched/init.c +2 -0
index 004ac54..038f042 100644
@@ -118,6 +118,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
 	rx_conf.rx_thresh.wthresh = rx_thresh.wthresh;
 	rx_conf.rx_free_thresh = 32;
 	rx_conf.rx_drop_en = 0;
+	rx_conf.rx_deferred_start = 0;
 
 	tx_conf.tx_thresh.pthresh = tx_thresh.pthresh;
 	tx_conf.tx_thresh.hthresh = tx_thresh.hthresh;
@@ -125,6 +126,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
 	tx_conf.tx_free_thresh = 0;
 	tx_conf.tx_rs_thresh = 0;
 	tx_conf.txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS | ETH_TXQ_FLAGS_NOOFFLOADS;
+	tx_conf.tx_deferred_start = 0;
 
 	/* init port */
 	RTE_LOG(INFO, APP, "Initializing port %"PRIu16"... ", portid);
Signature · 1 line
2.9.3
#4 lore raw

24/10/2017 11:09, Jasvinder Singh:

Quoted 10 lines

Fix problem with uninitialized rx/tx deferred_start flags of the struct rte_eth_rxconf/txconf by initializing with 0 value (deferred start of the rx/tx queues is turned off). This setting allows device rx/tx queues to start with rte_eth_dev_start().

Coverity issue: 194999, 195009 (Uninitialized scalar variable)

Fixes de3cfa2c9823 ("sched: initial import")

Applied, thanks