From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by dpdk.org (Postfix) with ESMTP id 5B47A8E8F for ; Tue, 20 Oct 2015 08:59:31 +0200 (CEST) Received: by wicll6 with SMTP id ll6so13372915wic.1 for ; Mon, 19 Oct 2015 23:59:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=kvyi3x1iedDfjXXpZ+/Or/mJ8Op6+sJqhDTiNARNzP8=; b=YHX++iDNPlYD0RWeUL+hzBInqK/ZBrzex8aKUpOBvTdJGdbxFd6XHt1CCEjzjQIf6a qOctT5jcUUWFVcZSbhZLR/PTWDFWMaINcSDon4Y4K8WqlGfz6E7KUpEHd/zErN16Gq93 SSr6xtXxiuYm+aXJYCUMjLq7CdlCwrHb3luKXvnR+wI/Sx0mP9HylUcNNYcNNvAMbEAx XZt7ND8CDr90fHPd3nAD3XeJClAa/F/m/YmKXhiLu7YKuvBFCNKNXUoCB48qstFSyW7D sZgMDJJDAYADQVfE2ljC6r71IBiWeOz9xDH12yvpxM7KbFeyeA0Xy9Fib96c+2o8lmY2 AQoA== X-Gm-Message-State: ALoCoQllXDmv74OR7rVJsNpDnFyP0ZeHEQEF/7Ro0XmdgqbEx+vl65W9Jzeas2CXGedNkXeEhiEZ X-Received: by 10.180.149.167 with SMTP id ub7mr25814846wib.43.1445324371152; Mon, 19 Oct 2015 23:59:31 -0700 (PDT) Received: from xps13.localnet (115.202.154.77.rev.sfr.net. [77.154.202.115]) by smtp.gmail.com with ESMTPSA id r9sm1834313wjz.35.2015.10.19.23.59.27 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Oct 2015 23:59:30 -0700 (PDT) From: Thomas Monjalon To: Yuanhan Liu Date: Tue, 20 Oct 2015 08:57:52 +0200 Message-ID: <3814429.n33jvMuIcb@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1444369572-1157-5-git-send-email-yuanhan.liu@linux.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> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 06:59:31 -0000 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 > - 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? If you don't like the current log format, it would deserve a separate patch to change them consistently.