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 <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
This commit is contained in:
Olivier Matz 2022-10-17 10:00:37 +02:00 committed by Chenbo Xia
parent f8fcdc5944
commit 974f216bf9
2 changed files with 6 additions and 3 deletions

View File

@ -2814,7 +2814,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=%u (port=%u)", nb_queues,
dev->data->port_id);
for (i = 0; i < dev->data->nb_rx_queues; i++) {
vq = virtnet_rxq_to_vq(dev->data->rx_queues[i]);
@ -2828,7 +2829,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=%u)",
dev->data->port_id);
for (i = 0; i < dev->data->nb_rx_queues; i++) {
vq = virtnet_rxq_to_vq(dev->data->rx_queues[i]);

View File

@ -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=%u queue=%u)", nbufs,
dev->data->port_id, queue_idx);
VIRTQUEUE_DUMP(vq);