From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 8217137A6 for ; Wed, 10 Feb 2016 15:23:34 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 10 Feb 2016 06:23:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,426,1449561600"; d="scan'208";a="743665153" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.159]) by orsmga003.jf.intel.com with SMTP; 10 Feb 2016 06:23:31 -0800 Received: by (sSMTP sendmail emulation); Wed, 10 Feb 2016 14:23:30 +0025 Date: Wed, 10 Feb 2016 14:23:30 +0000 From: Bruce Richardson To: Yuanhan Liu Message-ID: <20160210142330.GB11040@bricha3-MOBL3> References: <1450863919-29684-1-git-send-email-bernard.iremonger@intel.com> <20151224034841.GZ18863@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151224034841.GZ18863@yliu-dev.sh.intel.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] virtio: fix crashes in virtio stats functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2016 14:23:34 -0000 On Thu, Dec 24, 2015 at 11:48:41AM +0800, Yuanhan Liu wrote: > On Wed, Dec 23, 2015 at 09:45:19AM +0000, Bernard Iremonger wrote: > > This initialisation of nb_rx_queues and nb_tx_queues has been removed > > from eth_virtio_dev_init. > > > > The nb_rx_queues and nb_tx_queues were being initialised in eth_virtio_dev_init > > before the tx_queues and rx_queues arrays were allocated. > > > > The arrays are allocated when the ethdev port is configured and the > > nb_tx_queues and nb_rx_queues are initialised. > > > > If any of the following functions were called before the ethdev > > port was configured there was a segmentation fault because > > rx_queues and tx_queues were NULL: > > > > rte_eth_stats_get > > rte_eth_stats_reset > > rte_eth_xstats_get > > rte_eth_xstats_reset > > > > Fixes: 823ad647950a ("virtio: support multiple queues") > > Signed-off-by: Bernard Iremonger > > Acked-by: Yuanhan Liu > > Thanks. > > --yliu Applied to dpdk-next-net/rel_16_04 /Bruce