Skip to content

For QEMU 2.5: Network traffic dumping for -netdev devices

Thomas Huth qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 2 repliesIn review
  2. v15 patches 16 repliesSuperseded

Changes in v2 from the cover letter

- Restructured the code a little bit
- Updated target QEMU version from 2.4. to 2.5
- Addressed review feedback from Jason, Stefan and Markus:
- Use iov_copy() instead of copying the iov manually
- Fix return value of net_dump_receive_iov() if fd is invalid
- Use get_vhost_net() to detect vhost devices
- Close the fd when netdev is deleted
- Added some more comments in the source code

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5net/dump: Add support for receive_iov functionnet/clients.h net/dump.c+28 -60 replies
2/5net/dump: Move DumpState into NetClientStateinclude/net/net.h net/dump.c+12 -120 replies
3/5net/dump: Rework net-dump init functionsnet/dump.c+13 -110 replies
4/5net/dump: Add dump option for netdev devicesinclude/net/net.h net/clients.h net/dump.c +2 more+78 -30 replies
5/5qemu options: Add information about dumpfile to help textqemu-options.hx+18 -80 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJason Wang
SeriesR-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/5] For QEMU 2.5: Network traffic dumping for -netdev devices

The "-net dump" option only works with the "-net" option. So far, it is not possible to dump network traffic with the "-netdev" option yet. This patch series now fixes this ugliness by enabling dumping for the "-netdev" option, too.

Unlike with the "-net dump" option, the "-netdev" parameter does not "abuse" the disliked internal vlan hub infrastructure to achieve this functionality. This patch series introduces a new, clean "dumpfile=xxx" option for the -netdev parameters instead.

The patches are intended for QEMU version 2.5, but I'm sending them now already in case somebody got some spare minutes left for reviewing them again.

Note: I did not address multiqueue devices yet (but added a TODO in the source code) ... I will address that later when the basic patches have been accepted.

v2:
- Restructured the code a little bit
- Updated target QEMU version from 2.4. to 2.5
- Addressed review feedback from Jason, Stefan and Markus:
- Use iov_copy() instead of copying the iov manually
- Fix return value of net_dump_receive_iov() if fd is invalid
- Use get_vhost_net() to detect vhost devices
- Close the fd when netdev is deleted
- Added some more comments in the source code

Thomas Huth (5):
net/dump: Add support for receive_iov function net/dump: Move DumpState into NetClientState net/dump: Rework net-dump init functions net/dump: Add dump option for netdev devices qemu options: Add information about dumpfile to help text

 include/net/net.h |  8 +++++
 net/clients.h     |  6 ++++
 net/dump.c        | 99 +++++++++++++++++++++++++++++++++++++++----------------
 net/net.c         | 38 ++++++++++++++++++++-
 qapi-schema.json  | 12 +++++--
 qemu-options.hx   | 26 ++++++++++-----
 6 files changed, 149 insertions(+), 40 deletions(-)
Signature · 1 line
1.8.3.1