From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id C9C423989 for ; Fri, 22 Jul 2016 09:54:12 +0200 (CEST) Received: from alille-653-1-293-182.w90-1.abo.wanadoo.fr ([90.1.53.182] helo=[192.168.1.13]) by mail.droids-corp.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bQVK8-0008Sl-80; Fri, 22 Jul 2016 09:56:45 +0200 To: Stephen Hemminger References: <1469088510-7552-1-git-send-email-olivier.matz@6wind.com> <1469088510-7552-3-git-send-email-olivier.matz@6wind.com> <20160721141543.3da73f64@xeon-e3> Cc: dev@dpdk.org, yuanhan.liu@linux.intel.com, konstantin.ananyev@intel.com, sugesh.chandran@intel.com, bruce.richardson@intel.com, jianfeng.tan@intel.com, helin.zhang@intel.com, adrien.mazarguil@6wind.com From: Olivier Matz Message-ID: <5798739a-fc0a-90f4-68ce-e88905b65db3@6wind.com> Date: Fri, 22 Jul 2016 09:54:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160721141543.3da73f64@xeon-e3> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 02/12] virtio: setup and start cq in configure callback 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: Fri, 22 Jul 2016 07:54:12 -0000 On 07/21/2016 11:15 PM, Stephen Hemminger wrote: > On Thu, 21 Jul 2016 10:08:20 +0200 > Olivier Matz wrote: > >> + dev_info->max_rx_queues = (uint16_t) >> + ((VIRTIO_MAX_RX_QUEUES < hw->max_queue_pairs) ? >> + VIRTIO_MAX_RX_QUEUES : hw->max_queue_pairs); >> + dev_info->max_tx_queues = (uint16_t) >> + ((VIRTIO_MAX_TX_QUEUES < hw->max_queue_pairs) ? >> + VIRTIO_MAX_TX_QUEUES : hw->max_queue_pairs); > > cast here was always unnecessary. > Why not use RTE_MIN() > Yes, good idea, I'll do that for the v2. Thanks, Olivier