From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 6892C5686 for ; Thu, 5 May 2016 05:15:46 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 04 May 2016 20:15:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,580,1455004800"; d="scan'208";a="799219850" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga003.jf.intel.com with ESMTP; 04 May 2016 20:15:44 -0700 Date: Wed, 4 May 2016 20:19:31 -0700 From: Yuanhan Liu To: Jianfeng Tan Cc: dev@dpdk.org, huawei.xie@intel.com Message-ID: <20160505031931.GV5641@yliu-dev.sh.intel.com> References: <1461673932-128879-1-git-send-email-jianfeng.tan@intel.com> <1461890926-16727-1-git-send-email-jianfeng.tan@intel.com> <1461890926-16727-2-git-send-email-jianfeng.tan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461890926-16727-2-git-send-email-jianfeng.tan@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3 1/2] virtio: cleanup virtio_dev_queue_setup() 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: Thu, 05 May 2016 03:15:46 -0000 On Fri, Apr 29, 2016 at 12:48:45AM +0000, Jianfeng Tan wrote: > + if (queue_type < VTNET_RQ || queue_type > VTNET_CQ) { > + PMD_INIT_LOG(ERR, "invalid queue type: %d", queue_type); > + return -EINVAL; > } I'm thinking this check is not necessary. We can make sure it's a valid queue type. --yliu