From: Akihiko Odaki <akihiko.odaki@gmail.com>
To: Laurent Vivier <lvivier@redhat.com>, qemu-devel@nongnu.org
Cc: Jason Wang <jasowang@redhat.com>
Subject: Re: [PATCH 2/2] net/dump: Correctly compute Ethernet packet offset
Date: Sat, 18 Jan 2025 19:12:16 +0900 [thread overview]
Message-ID: <cea3fcb3-cec6-496f-ad59-3bd0b5ed9ef0@gmail.com> (raw)
In-Reply-To: <20250117111709.970789-3-lvivier@redhat.com>
On 2025/01/17 20:17, Laurent Vivier wrote:
> When a packet is sent with QEMU_NET_PACKET_FLAG_RAW by QEMU it
> never includes virtio-net header even if qemu_get_vnet_hdr_len()
> is not 0, and filter-dump is not managing this case.
>
> The only user of QEMU_NET_PACKET_FLAG_RAW is announce_self,
> we can show the problem using it and tcpddump:
>
> - QEMU parameters:
>
> .. -monitor stdio \
> -netdev bridge,id=netdev0,br=virbr0 \
> -device virtio-net,mac=9a:2b:2c:2d:2e:2f,netdev=netdev0 \
> -object filter-dump,netdev=netdev0,file=log.pcap,id=pcap0
>
> - HMP command:
>
> (qemu) announce_self
>
> - TCP dump:
>
> $ tcpdump -nxr log.pcap
>
> without the fix:
>
> 08:00:06:04:00:03 > 2e:2f:80:35:00:01, ethertype Unknown (0x9a2b), length 50:
> 0x0000: 2c2d 2e2f 0000 0000 9a2b 2c2d 2e2f 0000
> 0x0010: 0000 0000 0000 0000 0000 0000 0000 0000
> 0x0020: 0000 0000
>
> with the fix:
>
> ARP, Reverse Request who-is 9a:2b:2c:2d:2e:2f tell 9a:2b:2c:2d:2e:2f, length 46
> 0x0000: 0001 0800 0604 0003 9a2b 2c2d 2e2f 0000
> 0x0010: 0000 9a2b 2c2d 2e2f 0000 0000 0000 0000
> 0x0020: 0000 0000 0000 0000 0000 0000 0000
>
> Fixes: 481c52320a26 ("net: Strip virtio-net header when dumping")
> Cc: akihiko.odaki@daynix.com
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
next prev parent reply other threads:[~2025-01-18 10:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-17 11:17 [PATCH 0/2] net: Fix announce_self with vhost Laurent Vivier
2025-01-17 11:17 ` [PATCH 1/2] net: Fix announce_self Laurent Vivier
2025-01-18 10:09 ` Akihiko Odaki
2025-01-20 0:34 ` Jason Wang
2025-01-17 11:17 ` [PATCH 2/2] net/dump: Correctly compute Ethernet packet offset Laurent Vivier
2025-01-18 10:12 ` Akihiko Odaki [this message]
2025-01-20 0:34 ` Jason Wang
2025-01-17 14:05 ` [PATCH 0/2] net: Fix announce_self with vhost Laurent Vivier
2025-02-01 19:36 ` Michael Tokarev
2025-02-02 17:28 ` Laurent Vivier
2025-01-18 20:20 ` Michael Tokarev
2025-01-30 9:29 ` Laurent Vivier
2025-01-30 10:00 ` Michael Tokarev
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=cea3fcb3-cec6-496f-ad59-3bd0b5ed9ef0@gmail.com \
--to=akihiko.odaki@gmail.com \
--cc=jasowang@redhat.com \
--cc=lvivier@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).