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 C681D2FDD; Wed, 5 Apr 2017 07:25:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491369941; x=1522905941; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=lrJRMIt2ixk/6CYWgzdBJBNBc7zSvTc/ko+p4LUTvzc=; b=S9y+HDgUVF1pN2616yk9K4PLY+5ibKgIrGEu+0TZsDxhQYrZ/925rxnA bUnSUSyGFxiPZVtcEvz115py4e05Xg==; Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Apr 2017 22:25:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,277,1486454400"; d="scan'208";a="73797672" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga004.jf.intel.com with ESMTP; 04 Apr 2017 22:25:38 -0700 Date: Wed, 5 Apr 2017 13:23:06 +0800 From: Yuanhan Liu To: Thomas Monjalon Cc: Wenfeng Liu , dev@dpdk.org, maxime.coquelin@redhat.com, stable@dpdk.org Message-ID: <20170405052306.GF18844@yliu-dev.sh.intel.com> References: <1489486196-7456-1-git-send-email-liuwf@arraynetworks.com.cn> <20170315080820.GM18844@yliu-dev.sh.intel.com> <1865255.2VXnQj2pDH@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1865255.2VXnQj2pDH@xps13> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v2] net/virtio-user: fix overflow 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: Wed, 05 Apr 2017 05:25:41 -0000 On Wed, Apr 05, 2017 at 02:22:27AM +0200, Thomas Monjalon wrote: > 2017-03-15 16:08, Yuanhan Liu: > > On Tue, Mar 14, 2017 at 10:09:56AM +0000, Wenfeng Liu wrote: > > > virtio-user limits the qeueue number to 8 but provides no limit > > > check against the queue number input from user. If a bigger queue > > > number (> 8) is given, there is an overflow issue. Doing a sanity > > > check could avoid it. > > > > > > Fixes: 37a7eb2ae816 ("net/virtio-user: add device emulation layer") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Wenfeng Liu > > > > Applied to dpdk-next-virtio. > > There is a compilation error when RTE_LIBRTE_VIRTIO_DEBUG_INIT is enabled: > drivers/net/virtio/virtio_user_ethdev.c:423:32: > fatal error: format specifies type 'unsigned int' > but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat] > VIRTIO_USER_ARG_QUEUES_NUM, queues, > ^~~~~~ > > I will fix it when pulling next-virtio. Thanks! > Considering this log is about an error, > does it make sense to have a compile option to enable it? I think it makes more sense to print them unconditionally? They are errors after all. --yliu > I was expecting that "git grep 'PMD_INIT_LOG(ERR,' | wc -l" would return 0. > Unfortunately, there are 434 occurences...