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 E05298EA1 for ; Tue, 20 Oct 2015 09:10:00 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 20 Oct 2015 00:09:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,706,1437462000"; d="scan'208";a="830640595" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.66.49]) by orsmga002.jf.intel.com with ESMTP; 20 Oct 2015 00:09:58 -0700 Date: Tue, 20 Oct 2015 15:10:04 +0800 From: Yuanhan Liu To: Thomas Monjalon Message-ID: <20151020071004.GT3115@yliu-dev.sh.intel.com> References: <1444369572-1157-1-git-send-email-yuanhan.liu@linux.intel.com> <1444369572-1157-5-git-send-email-yuanhan.liu@linux.intel.com> <3814429.n33jvMuIcb@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3814429.n33jvMuIcb@xps13> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: dev@dpdk.org, marcel@redhat.com, "Michael S. Tsirkin" Subject: Re: [dpdk-dev] [PATCH v6 04/13] vhost: rxtx: prepare work for multiple queue support 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: Tue, 20 Oct 2015 07:10:01 -0000 On Tue, Oct 20, 2015 at 08:57:52AM +0200, Thomas Monjalon wrote: > 2015-10-09 13:46, Yuanhan Liu: > > From: Changchun Ouyang > > > > Do not use VIRTIO_RXQ or VIRTIO_TXQ anymore; use the queue_id, > > instead, which will be set to a proper value for a specific queue > > when we have multiple queue support enabled. > > > > For now, queue_id is still set with VIRTIO_RXQ or VIRTIO_TXQ, > > so it should not break anything. > > The title may be more informative. > Example: > vhost: use queue id instead of constant ring index Thanks, that's indeed better. > > > - if (unlikely(queue_id != VIRTIO_RXQ)) { > > - LOG_DEBUG(VHOST_DATA, "mq isn't supported in this version.\n"); > > + if (unlikely(!is_valid_virt_queue_idx(queue_id, 0, dev->virt_qp_nb))) { > > + RTE_LOG(ERR, VHOST_DATA, > > + "%s (%"PRIu64"): virtqueue idx:%d invalid.\n", > > + __func__, dev->device_fh, queue_id); > [...] > > - if (unlikely(queue_id != VIRTIO_RXQ)) { > > - LOG_DEBUG(VHOST_DATA, "mq isn't supported in this version.\n"); > > + if (unlikely(!is_valid_virt_queue_idx(queue_id, 0, dev->virt_qp_nb))) { > > + RTE_LOG(ERR, VHOST_DATA, > > + "%s (%"PRIu64"): virtqueue idx:%d invalid.\n", > > + __func__, dev->device_fh, queue_id); > > + return 0; > [...] > > - if (unlikely(queue_id != VIRTIO_TXQ)) { > > - LOG_DEBUG(VHOST_DATA, "mq isn't supported in this version.\n"); > > + if (unlikely(!is_valid_virt_queue_idx(queue_id, 1, dev->virt_qp_nb))) { > > + RTE_LOG(ERR, VHOST_DATA, > > + "%s (%"PRIu64"): virtqueue idx:%d invalid.\n", > > + __func__, dev->device_fh, queue_id); > > Why not use the log macros in drivers/net/virtio/virtio_logs.h? Do you mean I should keep using LOG_DEBUG instead? > If you don't like the current log format, it would deserve a separate patch > to change them consistently. Changchun made the change, and I don't know why. --yliu