From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Bin Meng <bmeng.cn@gmail.com>, Jason Wang <jasowang@redhat.com>,
qemu-devel@nongnu.org
Cc: Bin Meng <bin.meng@windriver.com>
Subject: Re: [PATCH] net: Print the packet size in the debug output
Date: Fri, 26 Feb 2021 11:20:35 +0100 [thread overview]
Message-ID: <7224f4c3-92bb-2d82-5736-67c2be43cbd0@redhat.com> (raw)
In-Reply-To: <1614332761-72810-1-git-send-email-bmeng.cn@gmail.com>
On 2/26/21 10:46 AM, Bin Meng wrote:
> From: Bin Meng <bin.meng@windriver.com>
>
> Printing out the packet size is helpful during debug.
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> ---
>
> net/net.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/net.c b/net/net.c
> index 32d71c1..b038370 100644
> --- a/net/net.c
> +++ b/net/net.c
> @@ -641,7 +641,7 @@ static ssize_t qemu_send_packet_async_with_flags(NetClientState *sender,
> int ret;
>
> #ifdef DEBUG_NET
> - printf("qemu_send_packet_async:\n");
> + printf("qemu_send_packet_async: packet size (%d)\n", size);
> qemu_hexdump(stdout, "net", buf, size);
At this point better to convert to trace events (see commit
db1e7afa371):
if (trace_event_get_state_backends(TRACE_NET_SEND_PACKET)) {
net_pkt_hexdump(buf, size);
}
prev parent reply other threads:[~2021-02-26 10:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-26 9:46 [PATCH] net: Print the packet size in the debug output Bin Meng
2021-02-26 10:20 ` Philippe Mathieu-Daudé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7224f4c3-92bb-2d82-5736-67c2be43cbd0@redhat.com \
--to=philmd@redhat.com \
--cc=bin.meng@windriver.com \
--cc=bmeng.cn@gmail.com \
--cc=jasowang@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).