From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by dpdk.org (Postfix) with ESMTP id 41B148E9E for ; Tue, 20 Oct 2015 09:25:28 +0200 (CEST) Received: by wicll6 with SMTP id ll6so31394828wic.0 for ; Tue, 20 Oct 2015 00:25:28 -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=/nB03C2lpUYwF4COytiZFKBZMR+M1+afd05aFwh1uzE=; b=UG97P+vXGmnyGdGmXk0TJLv8PCTERR65jk5XGz8JdQKCbeBwVsLQiUQkG0WkDJM+OY soZK25ztOdILQ5DwE5nmX6aBuQvrNeeFbk09C0R4Z2RpIIKFqRzIzZHScvE3Mi1BKfK6 RBtsR+n/D3hpuG7tQtFsVG4Edgvsv78WRv9M826kiuvyoXdyFrT39XJGcVyBWlitYFkW BsWsUNcqlL/UutyarvaJG46ZROfG55yalL0bWlJKSrw9Bl3gahU6u4++oJSpC97XmfGo NqlkDpjoRihkEvE8Df4X0y3pQ2XYk+0QD6npw5Hw42c8M0DLvGWLb8hBM3QHJ4tgMUa7 ktVA== X-Gm-Message-State: ALoCoQmHogD30ohKcnV4fSfEgknRNd9W2PsBzRFHpqhmG71A7MF7tzzqORxAt49Vjx6qEH58/w6H X-Received: by 10.180.206.132 with SMTP id lo4mr8186782wic.94.1445325928106; Tue, 20 Oct 2015 00:25:28 -0700 (PDT) Received: from xps13.localnet (115.202.154.77.rev.sfr.net. [77.154.202.115]) by smtp.gmail.com with ESMTPSA id hs5sm18132074wib.6.2015.10.20.00.25.27 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Oct 2015 00:25:27 -0700 (PDT) From: Thomas Monjalon To: Yuanhan Liu Date: Tue, 20 Oct 2015 09:24:09 +0200 Message-ID: <15234883.iyK6Fa9SCL@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20151020071004.GT3115@yliu-dev.sh.intel.com> References: <1444369572-1157-1-git-send-email-yuanhan.liu@linux.intel.com> <3814429.n33jvMuIcb@xps13> <20151020071004.GT3115@yliu-dev.sh.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 07:25:28 -0000 2015-10-20 15:10, Yuanhan Liu: > On Tue, Oct 20, 2015 at 08:57:52AM +0200, Thomas Monjalon wrote: > > > - 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? No you can use the error level. Actually I was checking the logs in virtio which use some log wrapper to keep some consistency. But the vhost code doesn't seem to have such policy. So you are free :) But I would say you should avoid changing the log format if does not comply with the rest of the library. The __func__ macro is not really used. Maybe Huawei could give a general policy for vhost logs (having a general consistency in all DPDK libs is better).