* [dpdk-dev] [PATCH] examples/qos_sched: fix uninitialized scalar variable
@ 2017-10-23 10:36 Jasvinder Singh
2017-10-23 16:31 ` Ferruh Yigit
2017-10-24 9:09 ` Jasvinder Singh
0 siblings, 2 replies; 5+ messages in thread
From: Jasvinder Singh @ 2017-10-23 10:36 UTC (permalink / raw)
To: dev; +Cc: cristian.dumitrescu, john.mcnamara
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")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
examples/qos_sched/init.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 004ac54..038f042 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -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.9.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/qos_sched: fix uninitialized scalar variable
2017-10-23 10:36 [dpdk-dev] [PATCH] examples/qos_sched: fix uninitialized scalar variable Jasvinder Singh
@ 2017-10-23 16:31 ` Ferruh Yigit
2017-10-24 8:41 ` Singh, Jasvinder
2017-10-24 9:09 ` Jasvinder Singh
1 sibling, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2017-10-23 16:31 UTC (permalink / raw)
To: Jasvinder Singh, dev; +Cc: cristian.dumitrescu, john.mcnamara
On 10/23/2017 3:36 AM, Jasvinder Singh wrote:
> 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: stable@dpdk.org [if required]
Signed-off-by: .....
Thanks,
ferruh
>
> Fixes: de3cfa2c9823 ("sched: initial import")
>
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> ---
> examples/qos_sched/init.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
> index 004ac54..038f042 100644
> --- a/examples/qos_sched/init.c
> +++ b/examples/qos_sched/init.c
> @@ -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);
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/qos_sched: fix uninitialized scalar variable
2017-10-23 16:31 ` Ferruh Yigit
@ 2017-10-24 8:41 ` Singh, Jasvinder
0 siblings, 0 replies; 5+ messages in thread
From: Singh, Jasvinder @ 2017-10-24 8:41 UTC (permalink / raw)
To: Yigit, Ferruh, dev; +Cc: Dumitrescu, Cristian, Mcnamara, John
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Monday, October 23, 2017 5:32 PM
> To: Singh, Jasvinder <jasvinder.singh@intel.com>; dev@dpdk.org
> Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Mcnamara, John
> <john.mcnamara@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] examples/qos_sched: fix uninitialized scalar
> variable
>
> On 10/23/2017 3:36 AM, Jasvinder Singh wrote:
> > 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:
Yes, this is coverity issue.
> Coverity issue: xxxxxx
> Fixes: yyyyyyyyyyyy ("..................")
> Cc: stable@dpdk.org [if required]
>
> Signed-off-by: .....
>
Ok, I will resend the patch.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH] examples/qos_sched: fix uninitialized scalar variable
2017-10-23 10:36 [dpdk-dev] [PATCH] examples/qos_sched: fix uninitialized scalar variable Jasvinder Singh
2017-10-23 16:31 ` Ferruh Yigit
@ 2017-10-24 9:09 ` Jasvinder Singh
2017-10-24 21:58 ` Thomas Monjalon
1 sibling, 1 reply; 5+ messages in thread
From: Jasvinder Singh @ 2017-10-24 9:09 UTC (permalink / raw)
To: dev; +Cc: cristian.dumitrescu, ferruh.yigit, john.mcnamara, stable
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")
Cc: stable@dpdk.org
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
examples/qos_sched/init.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 004ac54..038f042 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -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.9.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/qos_sched: fix uninitialized scalar variable
2017-10-24 9:09 ` Jasvinder Singh
@ 2017-10-24 21:58 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2017-10-24 21:58 UTC (permalink / raw)
To: Jasvinder Singh
Cc: dev, cristian.dumitrescu, ferruh.yigit, john.mcnamara, stable
24/10/2017 11:09, 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")
> Cc: stable@dpdk.org
>
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-10-24 21:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-23 10:36 [dpdk-dev] [PATCH] examples/qos_sched: fix uninitialized scalar variable Jasvinder Singh
2017-10-23 16:31 ` Ferruh Yigit
2017-10-24 8:41 ` Singh, Jasvinder
2017-10-24 9:09 ` Jasvinder Singh
2017-10-24 21:58 ` Thomas Monjalon
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).