From: "Michael S. Tsirkin" <mst@redhat.com>
To: Lange Tang <lange_tang@163.com>
Cc: "jasowang@redhat.com" <jasowang@redhat.com>,
"xuanzhuo@linux.alibaba.com" <xuanzhuo@linux.alibaba.com>,
Tang Longjun <tanglongjun@kylinos.cn>,
"virtualization@lists.linux.dev" <virtualization@lists.linux.dev>
Subject: Re: Re: [PATCH v1 0/7] introduce virtnet_mon for monitor virtio_net
Date: Thu, 11 Dec 2025 02:10:25 -0500 [thread overview]
Message-ID: <20251211021008-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <4820b08f.2d13.19b0b523dcb.Coremail.lange_tang@163.com>
On Thu, Dec 11, 2025 at 10:51:37AM +0800, Lange Tang wrote:
> At 2025-12-10 17:04:04, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> >On Thu, Nov 27, 2025 at 11:24:00AM +0800, Longjun Tang wrote:
> >> From: Tang Longjun <tanglongjun@kylinos.cn>
> >>
> >> hi,
> >> virtnet_mon is used to monitor the data packets of the virtio_net driver
> >> and the related parameters of virtqueue, useful for tracking its status
> >> and troubleshooting faults.
> >>
> >> pls review. tks
> >>
> >> Best regard.
> >
> >what does this achieve that direct use of tracing would not?
>
> I apologize that my explanation of virtnet_mon was not detailed enough.
> virtnet_mon uses kprobe and buffers to monitor virtio_net.
> To monitor virtio_net, it is necessary to track the member parameters of the virtqueue corresponding to each data packet and output them.
> When PPS very high, other tracing techniques, such as ebpf, may not be able to handle it, resulting in data loss because they do not have sufficiently large buffers to batch export log data.
>
> As for the duplicate code, it is only to obtain the layout of the relevant structure, and I have not yet thought of a way to avoid duplication. I would love to hear your suggestions.
add traces as necessary in code and avoid this module completely.
> >
> >> Tang Longjun (7):
> >> tools/virtio/virtnet_mon: create misc driver for virtnet_mon
> >> tools/virtio/virtnet_mon: add kfifo to virtnet_mon
> >> tools/virtio/virtnet_mon: add kprobe start_xmit
> >> tools/virtio/virtnet_mon: add kprobe gro_receive_skb
> >> tools/virtio/virtnet_mon: add kprobe ip_local_deliver
> >> tools/virtio/virtnet_mon: add kprobe skb_xmit_done and skb_recv_done
> >> tools/virtio/virtnet_mon: add README file for virtnet_moin
> >>
> >> tools/virtio/virtnet_mon/Makefile | 10 +
> >> tools/virtio/virtnet_mon/README | 35 +
> >> tools/virtio/virtnet_mon/virtnet_mon.c | 1048 ++++++++++++++++++++++++
> >> 3 files changed, 1093 insertions(+)
> >> create mode 100644 tools/virtio/virtnet_mon/Makefile
> >> create mode 100644 tools/virtio/virtnet_mon/README
> >> create mode 100644 tools/virtio/virtnet_mon/virtnet_mon.c
> >>
> >> --
> >> 2.43.0
next prev parent reply other threads:[~2025-12-11 7:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 3:24 [PATCH v1 0/7] introduce virtnet_mon for monitor virtio_net Longjun Tang
2025-11-27 3:24 ` [PATCH v1 1/7] tools/virtio/virtnet_mon: create misc driver for virtnet_mon Longjun Tang
2025-11-27 3:24 ` [PATCH v1 2/7] tools/virtio/virtnet_mon: add kfifo to virtnet_mon Longjun Tang
2025-11-27 3:24 ` [PATCH v1 3/7] tools/virtio/virtnet_mon: add kprobe start_xmit Longjun Tang
2025-11-28 2:21 ` Jason Wang
2025-11-28 3:25 ` Lange Tang
2025-12-10 9:03 ` Michael S. Tsirkin
2025-11-27 3:24 ` [PATCH v1 4/7] tools/virtio/virtnet_mon: add kprobe gro_receive_skb Longjun Tang
2025-11-27 3:24 ` [PATCH v1 5/7] tools/virtio/virtnet_mon: add kprobe ip_local_deliver Longjun Tang
2025-11-27 3:24 ` [PATCH v1 6/7] tools/virtio/virtnet_mon: add kprobe skb_xmit_done and skb_recv_done Longjun Tang
2025-11-27 3:24 ` [PATCH v1 7/7] tools/virtio/virtnet_mon: add README file for virtnet_moin Longjun Tang
2025-12-10 9:04 ` [PATCH v1 0/7] introduce virtnet_mon for monitor virtio_net Michael S. Tsirkin
2025-12-11 2:51 ` Lange Tang
2025-12-11 7:10 ` Michael S. Tsirkin [this message]
2025-12-11 8:32 ` Jason Wang
2025-12-13 2:41 ` Lange Tang
2025-12-15 6:41 ` Jason Wang
2025-12-15 8:12 ` Lange Tang
2025-12-16 3:59 ` Jason Wang
2025-12-16 7:47 ` Lange Tang
2025-12-16 8:27 ` Jason Wang
2025-12-21 13:46 ` Michael S. Tsirkin
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=20251211021008-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=jasowang@redhat.com \
--cc=lange_tang@163.com \
--cc=tanglongjun@kylinos.cn \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
/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).