From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v6 04/13] vhost: rxtx: prepare work for multiple queue support Date: Tue, 20 Oct 2015 09:24:09 +0200 Message-ID: <15234883.iyK6Fa9SCL@xps13> 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, marcel@redhat.com, "Michael S. Tsirkin" To: Yuanhan Liu 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) In-Reply-To: <20151020071004.GT3115@yliu-dev.sh.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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).