Using Qemu for BMC with a TAP interface

Patrick Venture venture at google.com
Wed Dec 1 11:54:20 AEDT 2021


On Mon, Nov 22, 2021 at 12:14 AM Cédric Le Goater <clg at kaod.org> wrote:

> Hello,
>
> On 11/22/21 08:20, Joel Stanley wrote:
> > On Thu, 18 Nov 2021 at 20:35, Patrick Venture <venture at google.com>
> wrote:
> >>
> >> Hi;
> >>
> >> We're working on wiring up our Qemu BMC via a TAP configuration, and
> we're not seeing packets inside the Nuvoton NIC itself (a level of
> debugging we had to enable).  We're using the npcm7xx SoC device,
> >>
> >> -nic
> tap,fds=4:5:6:7:8:9:10:11,id=net0,model=npcm7xx-emc,mac=58:cb:52:18:b8:f7
> >>
> >> For the networking parameters, where the tap fds are valid.  I was
> curious if any of y'all got qemu networking working for your BMC SoCs,
> either Aspeed or Nuvoton?
> >
> > I've not tried using the -nic tap option with file descriptors. It's
> > not quite clear what you're trying to do, or what your full setup
> > looks like.
>
> yes. could you explain please ? It is simpler to run with a netdev bridge
> backend :
>
>    -net nic,macaddr=C0:FF:EE:00:00:03,netdev=net0 -netdev
> bridge,id=net0,helper=/usr/libexec/qemu-bridge-helper,br=virbr0
>

Thanks for the replies and help.  I don't know why my mail didn't decide
this should go in my inbox.  Probably user error on my part in the filters.

Peter, would a network bridge simplify life?  I imagine the file descriptor
approach is because of the framework configuring Qemu, but wanted to ask.

>
>
> Thanks,
>
> C.
>
> >
> > I did test it out just now with a manually created tap interface:
> >
> > sudo ip tuntap add test0 mode tap group netdev
> > sudo ip link set test0 up
> > sudo tcpdump -i test0
> >
> > And then when I fired up a qemu instance,
> >
> > qemu-system-arm -nographic -M romulus-bmc -kernel arch/arm/boot/zImage
> > -dtb arch/arm/boot/dts/aspeed-bmc-opp-romulus.dtb -initrd arm.cpio.xz
> > -nic tap,ifname=test0,id=net0
> >
> > I could see packets being decoded by the tcpdump instance (my laptop
> > is 'voyager', qemu came up as fe80::5054:ff:fe12:3456):
> >
> > $ sudo tcpdump -i test0
> > tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
> > listening on test0, link-type EN10MB (Ethernet), snapshot length 262144
> bytes
> > 15:10:32.683930 IP6 voyager > ip6-allrouters: ICMP6, router
> > solicitation, length 16
> > 15:10:33.655994 IP6 voyager.mdns > ff02::fb.mdns: 0 [2q] PTR (QM)?
> > _ipps._tcp.local. PTR (QM)? _ipp._tcp.local. (45)
> > 15:10:37.795242 IP6 fe80::5054:ff:fe12:3456 > ip6-allrouters: ICMP6,
> > router solicitation, length 16
> > 15:11:05.688413 IP6 voyager.mdns > ff02::fb.mdns: 0 [2q] PTR (QM)?
> > _ipps._tcp.local. PTR (QM)? _ipp._tcp.local. (45)
> > 15:11:07.499841 IP6 voyager > ip6-allrouters: ICMP6, router
> > solicitation, length 16
> > 15:11:11.079030 IP6 fe80::5054:ff:fe12:3456 > ip6-allrouters: ICMP6,
> > router solicitation, length 16
>

Thanks, so with the ftgmac100 nic, you're able to talk to qemu via tap.  I
didn't see any obvious differences in the npcm7xx_emc device.


> >
> > I've cc'd Cédric as he is the king of qemu command lines.
> >
> > Cheers,
> >
> > Joel
> >
> >
> >
> >
> >
> >
> >>
> >> Patrick
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20211130/36ec609f/attachment-0001.htm>


More information about the openbmc mailing list