All of lore.kernel.org
 help / color / mirror / Atom feed
* Using Qemu for BMC with a TAP interface
@ 2021-11-18 20:34 Patrick Venture
  2021-11-22  7:20 ` Joel Stanley
  0 siblings, 1 reply; 8+ messages in thread
From: Patrick Venture @ 2021-11-18 20:34 UTC (permalink / raw)
  To: OpenBMC Maillist; +Cc: Peter Foley

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

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?

Patrick

[-- Attachment #2: Type: text/html, Size: 854 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Using Qemu for BMC with a TAP interface
  2021-11-18 20:34 Using Qemu for BMC with a TAP interface Patrick Venture
@ 2021-11-22  7:20 ` Joel Stanley
  2021-11-22  8:14   ` Cédric Le Goater
  0 siblings, 1 reply; 8+ messages in thread
From: Joel Stanley @ 2021-11-22  7:20 UTC (permalink / raw)
  To: Patrick Venture, Cédric Le Goater; +Cc: OpenBMC Maillist, Peter Foley

On Thu, 18 Nov 2021 at 20:35, Patrick Venture <venture@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.

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

I've cc'd Cédric as he is the king of qemu command lines.

Cheers,

Joel






>
> Patrick

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Using Qemu for BMC with a TAP interface
  2021-11-22  7:20 ` Joel Stanley
@ 2021-11-22  8:14   ` Cédric Le Goater
  2021-12-01  0:54     ` Patrick Venture
  0 siblings, 1 reply; 8+ messages in thread
From: Cédric Le Goater @ 2021-11-22  8:14 UTC (permalink / raw)
  To: Joel Stanley, Patrick Venture; +Cc: OpenBMC Maillist, Peter Foley

Hello,

On 11/22/21 08:20, Joel Stanley wrote:
> On Thu, 18 Nov 2021 at 20:35, Patrick Venture <venture@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,

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
> 
> I've cc'd Cédric as he is the king of qemu command lines.
> 
> Cheers,
> 
> Joel
> 
> 
> 
> 
> 
> 
>>
>> Patrick


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Using Qemu for BMC with a TAP interface
  2021-11-22  8:14   ` Cédric Le Goater
@ 2021-12-01  0:54     ` Patrick Venture
  2021-12-01 15:59       ` Peter Foley
  0 siblings, 1 reply; 8+ messages in thread
From: Patrick Venture @ 2021-12-01  0:54 UTC (permalink / raw)
  To: Cédric Le Goater, Peter Foley; +Cc: OpenBMC Maillist

[-- Attachment #1: Type: text/plain, Size: 3198 bytes --]

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

> Hello,
>
> On 11/22/21 08:20, Joel Stanley wrote:
> > On Thu, 18 Nov 2021 at 20:35, Patrick Venture <venture@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
>
>

[-- Attachment #2: Type: text/html, Size: 4325 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Using Qemu for BMC with a TAP interface
  2021-12-01  0:54     ` Patrick Venture
@ 2021-12-01 15:59       ` Peter Foley
  2021-12-01 17:08         ` Cédric Le Goater
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Foley @ 2021-12-01 15:59 UTC (permalink / raw)
  To: Patrick Venture; +Cc: OpenBMC Maillist, Cédric Le Goater

[-- Attachment #1: Type: text/plain, Size: 3596 bytes --]

The container system we're using (https://research.google/pubs/pub43438)
provides a set of FDs connected to a pre-configured TAP device, so I don't
think manual bridge configuration is an option.

On Tue, Nov 30, 2021 at 7:54 PM Patrick Venture <venture@google.com> wrote:

>
>
> On Mon, Nov 22, 2021 at 12:14 AM Cédric Le Goater <clg@kaod.org> wrote:
>
>> Hello,
>>
>> On 11/22/21 08:20, Joel Stanley wrote:
>> > On Thu, 18 Nov 2021 at 20:35, Patrick Venture <venture@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
>>
>>

[-- Attachment #2: Type: text/html, Size: 4953 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Using Qemu for BMC with a TAP interface
  2021-12-01 15:59       ` Peter Foley
@ 2021-12-01 17:08         ` Cédric Le Goater
  2021-12-01 20:44           ` Patrick Venture
  0 siblings, 1 reply; 8+ messages in thread
From: Cédric Le Goater @ 2021-12-01 17:08 UTC (permalink / raw)
  To: Peter Foley, Patrick Venture; +Cc: OpenBMC Maillist

On 12/1/21 16:59, Peter Foley wrote:
> The container system we're using (https://research.google/pubs/pub43438 <https://research.google/pubs/pub43438>) provides a set of FDs connected to a pre-configured TAP device, so I don't think manual bridge configuration is an option.

ok. That's interesting. You are running QEMU BMC machines (Nuvotons and Aspeed ?)
wrapped in containers. Why BMC machines?

I guess we could reproduce the setup with a single instance to check issues but
it's a lot of work for an uncommon scenario.

Thanks,

C.


> 
> On Tue, Nov 30, 2021 at 7:54 PM Patrick Venture <venture@google.com <mailto:venture@google.com>> wrote:
> 
> 
> 
>     On Mon, Nov 22, 2021 at 12:14 AM Cédric Le Goater <clg@kaod.org <mailto:clg@kaod.org>> wrote:
> 
>         Hello,
> 
>         On 11/22/21 08:20, Joel Stanley wrote:
>          > On Thu, 18 Nov 2021 at 20:35, Patrick Venture <venture@google.com <mailto:venture@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
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Using Qemu for BMC with a TAP interface
  2021-12-01 17:08         ` Cédric Le Goater
@ 2021-12-01 20:44           ` Patrick Venture
  2021-12-05 16:45             ` Patrick Venture
  0 siblings, 1 reply; 8+ messages in thread
From: Patrick Venture @ 2021-12-01 20:44 UTC (permalink / raw)
  To: Cédric Le Goater; +Cc: OpenBMC Maillist, Peter Foley

[-- Attachment #1: Type: text/plain, Size: 4942 bytes --]

On Wed, Dec 1, 2021 at 9:08 AM Cédric Le Goater <clg@kaod.org> wrote:

> On 12/1/21 16:59, Peter Foley wrote:
> > The container system we're using (https://research.google/pubs/pub43438
> <https://research.google/pubs/pub43438>) provides a set of FDs connected
> to a pre-configured TAP device, so I don't think manual bridge
> configuration is an option.
>
> ok. That's interesting. You are running QEMU BMC machines (Nuvotons and
> Aspeed ?)
> wrapped in containers. Why BMC machines?
>

We're running BMC machines to validate BMC firmware.


>
> I guess we could reproduce the setup with a single instance to check
> issues but
> it's a lot of work for an uncommon scenario.
>
> Thanks,
>
> C.
>
>
> >
> > On Tue, Nov 30, 2021 at 7:54 PM Patrick Venture <venture@google.com
> <mailto:venture@google.com>> wrote:
> >
> >
> >
> >     On Mon, Nov 22, 2021 at 12:14 AM Cédric Le Goater <clg@kaod.org
> <mailto:clg@kaod.org>> wrote:
> >
> >         Hello,
> >
> >         On 11/22/21 08:20, Joel Stanley wrote:
> >          > On Thu, 18 Nov 2021 at 20:35, Patrick Venture <
> venture@google.com <mailto:venture@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
> >
>
>

[-- Attachment #2: Type: text/html, Size: 6995 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Using Qemu for BMC with a TAP interface
  2021-12-01 20:44           ` Patrick Venture
@ 2021-12-05 16:45             ` Patrick Venture
  0 siblings, 0 replies; 8+ messages in thread
From: Patrick Venture @ 2021-12-05 16:45 UTC (permalink / raw)
  To: Cédric Le Goater; +Cc: OpenBMC Maillist, Peter Foley

[-- Attachment #1: Type: text/plain, Size: 5384 bytes --]

On Wed, Dec 1, 2021 at 12:44 PM Patrick Venture <venture@google.com> wrote:

>
>
> On Wed, Dec 1, 2021 at 9:08 AM Cédric Le Goater <clg@kaod.org> wrote:
>
>> On 12/1/21 16:59, Peter Foley wrote:
>> > The container system we're using (https://research.google/pubs/pub43438
>> <https://research.google/pubs/pub43438>) provides a set of FDs connected
>> to a pre-configured TAP device, so I don't think manual bridge
>> configuration is an option.
>>
>> ok. That's interesting. You are running QEMU BMC machines (Nuvotons and
>> Aspeed ?)
>> wrapped in containers. Why BMC machines?
>>
>
> We're running BMC machines to validate BMC firmware.
>
>
>>
>> I guess we could reproduce the setup with a single instance to check
>> issues but
>> it's a lot of work for an uncommon scenario.
>>
>
https://lists.gnu.org/archive/html/qemu-devel/2021-12/msg00450.html - turns
out at least this was a bug preventing packets from being received.  The
tap fd wasn't being reactivated in all cases.


>
>> Thanks,
>>
>> C.
>>
>>
>> >
>> > On Tue, Nov 30, 2021 at 7:54 PM Patrick Venture <venture@google.com
>> <mailto:venture@google.com>> wrote:
>> >
>> >
>> >
>> >     On Mon, Nov 22, 2021 at 12:14 AM Cédric Le Goater <clg@kaod.org
>> <mailto:clg@kaod.org>> wrote:
>> >
>> >         Hello,
>> >
>> >         On 11/22/21 08:20, Joel Stanley wrote:
>> >          > On Thu, 18 Nov 2021 at 20:35, Patrick Venture <
>> venture@google.com <mailto:venture@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
>> >
>>
>>

[-- Attachment #2: Type: text/html, Size: 8037 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-12-05 16:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 20:34 Using Qemu for BMC with a TAP interface Patrick Venture
2021-11-22  7:20 ` Joel Stanley
2021-11-22  8:14   ` Cédric Le Goater
2021-12-01  0:54     ` Patrick Venture
2021-12-01 15:59       ` Peter Foley
2021-12-01 17:08         ` Cédric Le Goater
2021-12-01 20:44           ` Patrick Venture
2021-12-05 16:45             ` Patrick Venture

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.