[ipxe-devel] [PATCH 1/2] virtio-net: downgrade iobuf-level debug messages to DBGC2
Laszlo Ersek
lersek at redhat.com
Fri Apr 10 19:53:21 UTC 2015
According to <http://ipxe.org/download#debug_builds>, bit value 1 is for
"basic debug messages", while bit value 2 is for "verbose debug messages
(e.g. one message per event)". iobuf-level debug messages correspond to
individual packets in the virtio-net driver, hence they qualify as DBGC2.
Cc: Michael Brown <mcb30 at ipxe.org>
Cc: Stefan Hajnoczi <stefanha at redhat.com>
Cc: Gerd Hoffmann <kraxel at redhat.com>
Cc: BALATON Zoltan <balaton at eik.bme.hu>
Signed-off-by: Laszlo Ersek <lersek at redhat.com>
---
src/drivers/net/virtio-net.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/drivers/net/virtio-net.c b/src/drivers/net/virtio-net.c
index 8b67d9d..533ccb0 100644
--- a/src/drivers/net/virtio-net.c
+++ b/src/drivers/net/virtio-net.c
@@ -131,8 +131,8 @@ static void virtnet_enqueue_iob ( struct net_device *netdev,
},
};
- DBGC ( virtnet, "VIRTIO-NET %p enqueuing iobuf %p on vq %d\n",
- virtnet, iobuf, vq_idx );
+ DBGC2 ( virtnet, "VIRTIO-NET %p enqueuing iobuf %p on vq %d\n",
+ virtnet, iobuf, vq_idx );
vring_add_buf ( vq, list, out, in, iobuf, 0 );
vring_kick ( virtnet->ioaddr, vq, 1 );
@@ -256,8 +256,8 @@ static void virtnet_process_tx_packets ( struct net_device *netdev ) {
while ( vring_more_used ( tx_vq ) ) {
struct io_buffer *iobuf = vring_get_buf ( tx_vq, NULL );
- DBGC ( virtnet, "VIRTIO-NET %p tx complete iobuf %p\n",
- virtnet, iobuf );
+ DBGC2 ( virtnet, "VIRTIO-NET %p tx complete iobuf %p\n",
+ virtnet, iobuf );
netdev_tx_complete ( netdev, iobuf );
}
@@ -283,8 +283,8 @@ static void virtnet_process_rx_packets ( struct net_device *netdev ) {
iob_unput ( iobuf, RX_BUF_SIZE );
iob_put ( iobuf, len - sizeof ( struct virtio_net_hdr ) );
- DBGC ( virtnet, "VIRTIO-NET %p rx complete iobuf %p len %zd\n",
- virtnet, iobuf, iob_len ( iobuf ) );
+ DBGC2 ( virtnet, "VIRTIO-NET %p rx complete iobuf %p len %zd\n",
+ virtnet, iobuf, iob_len ( iobuf ) );
/* Pass completed packet to the network stack */
netdev_rx ( netdev, iobuf );
--
1.8.3.1
More information about the ipxe-devel
mailing list