From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 65F371B399 for ; Mon, 23 Oct 2017 12:23:26 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP; 23 Oct 2017 03:23:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,422,1503385200"; d="scan'208";a="912696893" Received: from silpixa00381635.ir.intel.com (HELO silpixa00381635.ger.corp.intel.com) ([10.237.222.149]) by FMSMGA003.fm.intel.com with ESMTP; 23 Oct 2017 03:23:23 -0700 From: Jasvinder Singh To: dev@dpdk.org Cc: cristian.dumitrescu@intel.com, john.mcnamara@intel.com Date: Mon, 23 Oct 2017 11:36:00 +0100 Message-Id: <20171023103600.89883-1-jasvinder.singh@intel.com> X-Mailer: git-send-email 2.9.3 Subject: [dpdk-dev] [PATCH] examples/qos_sched: fix uninitialized scalar variable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Oct 2017 10:23:26 -0000 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 --- 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