From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 91809A0556; Mon, 17 Oct 2022 09:38:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EA1840143; Mon, 17 Oct 2022 09:38:44 +0200 (CEST) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mails.dpdk.org (Postfix) with ESMTP id E8112400D7 for ; Mon, 17 Oct 2022 09:38:42 +0200 (CEST) Received: by mail-wr1-f50.google.com with SMTP id a3so17217623wrt.0 for ; Mon, 17 Oct 2022 00:38:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=P1RGSg3zQbStxJnMzTusZdXHkdK4zKksXiE/lxatX+E=; b=bthrQNOU3fpuGGOuJ3qsvR4ef1hl9sJWheELbqV19Eco+GpzfBxJnugK8BEp1AzT/E NurQNgz071lsZAZLuHrD0/YXz7bRsECtM/qpMq24VQ/Jz/8rmRyMIGoY9WFg9Y1ahbe8 ViYNEul/O/a8j78aA4sOF3eZY8Q1vzQs6b5hP+jtv7MfWrAqLfYbXkrXiCvTzAZRALBG B/mhXxk2KB0ZG9xC+eWtbghoPxAUhunvB2N67MuhyYZfyvWjAJ4UehjwOxDhc+sXVaSn 5kQ/3rCPJD2KKr9Byt5e8qrs2U1Zpl/DL3EnBYL/cMN8tjYcYYB38kaMk90woAo5qarH b6mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=P1RGSg3zQbStxJnMzTusZdXHkdK4zKksXiE/lxatX+E=; b=ZOfTI+OZQ+mOjetOIdnBdCfTdHm/NuB854zMwHZcAJklfCaji32FrJb3IoTJfH/Ynh +jrWfJoFd1blqnHDGeY5rhu3sMH/g5ftoDqZ89k1SJ7QACzdYU1d7P7/yzcR7FaYFsSG RjJK4G7XU0IYrDK62IE7OuiIpGRSN4+pwzgOAuUBhfHCufUIBtz0rVMVjJJ1y8jbAeWa nsFM2lRtf54lGbNvlzIF6KZWMigdaNQ5yecLWBn5TEq+N/cxEJsAc8Jfeqze48XgCQUa 3jyfXjYe8V6R9VQqrKBfj1o55VgYrZpPlEtKWa41lp4c4iiM3YEs+Wr/PbUwyA6aK2o4 Pubw== X-Gm-Message-State: ACrzQf1LA2TwDqPPvmixJazSO29Eo02ooKEyOvR2rpVVtUO42NNPxy4a DkRUJeas9DP0PaHRjc/QvGLcmw== X-Google-Smtp-Source: AMsMyM4Fd+pQMWAZIKV96IeJwDN6EO3l7QRJ/hElPsIb5WBq9+nmfEcI0Lx3xOktF/woRmN6+mdjaw== X-Received: by 2002:adf:d1ec:0:b0:22e:3341:a8cb with SMTP id g12-20020adfd1ec000000b0022e3341a8cbmr5175497wrd.151.1665992322569; Mon, 17 Oct 2022 00:38:42 -0700 (PDT) Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25]) by smtp.gmail.com with ESMTPSA id c1-20020a5d4141000000b002238ea5750csm9598424wrq.72.2022.10.17.00.38.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 00:38:41 -0700 (PDT) Date: Mon, 17 Oct 2022 09:38:41 +0200 From: Olivier Matz To: "Xia, Chenbo" Cc: "dev@dpdk.org" , Maxime Coquelin Subject: Re: [PATCH] net/virtio: add queue and port ID in some logs Message-ID: References: <20220929122228.1170-1-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hi Chenbo, On Mon, Oct 17, 2022 at 06:58:59AM +0000, Xia, Chenbo wrote: > Hi Olivier, > > > -----Original Message----- > > From: Olivier Matz > > Sent: Thursday, September 29, 2022 8:22 PM > > To: dev@dpdk.org > > Cc: Maxime Coquelin ; Xia, Chenbo > > > > Subject: [PATCH] net/virtio: add queue and port ID in some logs > > > > Add the queue id and/or the port id in some logs, so it is easier to > > understand what happens. > > > > Signed-off-by: Olivier Matz > > --- > > drivers/net/virtio/virtio_ethdev.c | 6 ++++-- > > drivers/net/virtio/virtio_rxtx.c | 3 ++- > > 2 files changed, 6 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/virtio/virtio_ethdev.c > > b/drivers/net/virtio/virtio_ethdev.c > > index 7e07270a8b..44811c299b 100644 > > --- a/drivers/net/virtio/virtio_ethdev.c > > +++ b/drivers/net/virtio/virtio_ethdev.c > > @@ -2807,7 +2807,8 @@ virtio_dev_start(struct rte_eth_dev *dev) > > return -EINVAL; > > } > > > > - PMD_INIT_LOG(DEBUG, "nb_queues=%d", nb_queues); > > + PMD_INIT_LOG(DEBUG, "nb_queues=%d (port=%d)", nb_queues, > > + dev->data->port_id); > > Better to use %u for all port_id since it's uint16_t Yes, will do. I'll update "nb_queues=%d" too by the way. > > Thanks, > Chenbo > > > > > for (i = 0; i < dev->data->nb_rx_queues; i++) { > > vq = virtnet_rxq_to_vq(dev->data->rx_queues[i]); > > @@ -2821,7 +2822,8 @@ virtio_dev_start(struct rte_eth_dev *dev) > > virtqueue_notify(vq); > > } > > > > - PMD_INIT_LOG(DEBUG, "Notified backend at initialization"); > > + PMD_INIT_LOG(DEBUG, "Notified backend at initialization (port=%d)", > > + dev->data->port_id); > > > > for (i = 0; i < dev->data->nb_rx_queues; i++) { > > vq = virtnet_rxq_to_vq(dev->data->rx_queues[i]); > > diff --git a/drivers/net/virtio/virtio_rxtx.c > > b/drivers/net/virtio/virtio_rxtx.c > > index 4795893ec7..f8a9ee5cdb 100644 > > --- a/drivers/net/virtio/virtio_rxtx.c > > +++ b/drivers/net/virtio/virtio_rxtx.c > > @@ -793,7 +793,8 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev > > *dev, uint16_t queue_idx) > > vq_update_avail_idx(vq); > > } > > > > - PMD_INIT_LOG(DEBUG, "Allocated %d bufs", nbufs); > > + PMD_INIT_LOG(DEBUG, "Allocated %d bufs (port=%d queue=%d)", nbufs, > > + dev->data->port_id, queue_idx); > > > > VIRTQUEUE_DUMP(vq); > > > > -- > > 2.30.2 >