All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Errors when starting sandbox
@ 2018-10-01 17:32 Simon Glass
  2018-10-01 21:14 ` Joe Hershberger
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2018-10-01 17:32 UTC (permalink / raw)
  To: u-boot

Hi Joe,

When I start sandbox now I see these errors every time. It is possible
to fix this?

$ u-boot -D
...
Warning: host_lo MAC addresses don't match:
Address in ROM is          ea:06:97:67:f4:b6
Address in environment is  00:00:11:22:33:44

Warning: host_eth0 MAC addresses don't match:
Address in ROM is          ea:06:97:67:f4:b6
Address in environment is  00:00:11:22:33:45

Warning: host_enp0s31f6 using MAC address from ROM

Warning: host_eth6 MAC addresses don't match:
Address in ROM is          ea:06:97:67:f4:b6
Address in environment is  00:00:11:22:33:46

Warning: host_docker_gwbridge using MAC address from ROM

Warning: host_docker0 MAC addresses don't match:
Address in ROM is          ca:07:52:28:25:66
Address in environment is  00:00:11:22:33:47

Warning: host_veth1f6bcd2 using MAC address from ROM

Regards,
Simon

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

* [U-Boot] Errors when starting sandbox
  2018-10-01 17:32 [U-Boot] Errors when starting sandbox Simon Glass
@ 2018-10-01 21:14 ` Joe Hershberger
  2018-10-01 21:27   ` Simon Glass
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Hershberger @ 2018-10-01 21:14 UTC (permalink / raw)
  To: u-boot

Hi Simon,

On Mon, Oct 1, 2018 at 12:32 PM, Simon Glass <sjg@chromium.org> wrote:
> Hi Joe,
>
> When I start sandbox now I see these errors every time. It is possible
> to fix this?
>
> $ u-boot -D
> ...
> Warning: host_lo MAC addresses don't match:
> Address in ROM is          ea:06:97:67:f4:b6
> Address in environment is  00:00:11:22:33:44
>
> Warning: host_eth0 MAC addresses don't match:
> Address in ROM is          ea:06:97:67:f4:b6
> Address in environment is  00:00:11:22:33:45
>
> Warning: host_enp0s31f6 using MAC address from ROM
>
> Warning: host_eth6 MAC addresses don't match:
> Address in ROM is          ea:06:97:67:f4:b6
> Address in environment is  00:00:11:22:33:46
>
> Warning: host_docker_gwbridge using MAC address from ROM
>
> Warning: host_docker0 MAC addresses don't match:
> Address in ROM is          ca:07:52:28:25:66
> Address in environment is  00:00:11:22:33:47
>
> Warning: host_veth1f6bcd2 using MAC address from ROM

These are warnings based on commit b96ced9cdb6 (sandbox: eth-raw: Make
random MAC addresses available to eth-raw). Because we don't know the
number of interfaces that exist on the given host when we write the
sandbox.dts, we override the MAC addresses with random ones. In the
normal case (real hardware), we would warn, since the hardware should
know its interfaces.

Do you have a proposed different approach? I don't like the idea of
adding sandbox checks in the core code that prints this warning, and
it also doesn't seem like a great idea to add a hook that doesn't warn
just for sandbox.

I'm happy to work on this, but I didn't address it at the time because
I didn't see a clear way to do it that didn't degrade the code in
order to remove warnings in sandbox.

Cheers,
-Joe

> Regards,
> Simon
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot

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

* [U-Boot] Errors when starting sandbox
  2018-10-01 21:14 ` Joe Hershberger
@ 2018-10-01 21:27   ` Simon Glass
  2018-10-01 22:01     ` Joe Hershberger
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2018-10-01 21:27 UTC (permalink / raw)
  To: u-boot

Hi Joe,

On 1 October 2018 at 15:14, Joe Hershberger <joe.hershberger@ni.com> wrote:
>
> Hi Simon,
>
> On Mon, Oct 1, 2018 at 12:32 PM, Simon Glass <sjg@chromium.org> wrote:
> > Hi Joe,
> >
> > When I start sandbox now I see these errors every time. It is possible
> > to fix this?
> >
> > $ u-boot -D
> > ...
> > Warning: host_lo MAC addresses don't match:
> > Address in ROM is          ea:06:97:67:f4:b6
> > Address in environment is  00:00:11:22:33:44
> >
> > Warning: host_eth0 MAC addresses don't match:
> > Address in ROM is          ea:06:97:67:f4:b6
> > Address in environment is  00:00:11:22:33:45
> >
> > Warning: host_enp0s31f6 using MAC address from ROM
> >
> > Warning: host_eth6 MAC addresses don't match:
> > Address in ROM is          ea:06:97:67:f4:b6
> > Address in environment is  00:00:11:22:33:46
> >
> > Warning: host_docker_gwbridge using MAC address from ROM
> >
> > Warning: host_docker0 MAC addresses don't match:
> > Address in ROM is          ca:07:52:28:25:66
> > Address in environment is  00:00:11:22:33:47
> >
> > Warning: host_veth1f6bcd2 using MAC address from ROM
>
> These are warnings based on commit b96ced9cdb6 (sandbox: eth-raw: Make
> random MAC addresses available to eth-raw). Because we don't know the
> number of interfaces that exist on the given host when we write the
> sandbox.dts, we override the MAC addresses with random ones. In the
> normal case (real hardware), we would warn, since the hardware should
> know its interfaces.
>
> Do you have a proposed different approach? I don't like the idea of
> adding sandbox checks in the core code that prints this warning, and
> it also doesn't seem like a great idea to add a hook that doesn't warn
> just for sandbox.
>
> I'm happy to work on this, but I didn't address it at the time because
> I didn't see a clear way to do it that didn't degrade the code in
> order to remove warnings in sandbox.

Can we make it so that the addresses do actually match in sandbox?

Regards,
Simon

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

* [U-Boot] Errors when starting sandbox
  2018-10-01 21:27   ` Simon Glass
@ 2018-10-01 22:01     ` Joe Hershberger
  2018-10-19  1:43       ` Simon Glass
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Hershberger @ 2018-10-01 22:01 UTC (permalink / raw)
  To: u-boot

On Mon, Oct 1, 2018 at 4:27 PM, Simon Glass <sjg@chromium.org> wrote:
> Hi Joe,
>
> On 1 October 2018 at 15:14, Joe Hershberger <joe.hershberger@ni.com> wrote:
>>
>> Hi Simon,
>>
>> On Mon, Oct 1, 2018 at 12:32 PM, Simon Glass <sjg@chromium.org> wrote:
>> > Hi Joe,
>> >
>> > When I start sandbox now I see these errors every time. It is possible
>> > to fix this?
>> >
>> > $ u-boot -D
>> > ...
>> > Warning: host_lo MAC addresses don't match:
>> > Address in ROM is          ea:06:97:67:f4:b6
>> > Address in environment is  00:00:11:22:33:44
>> >
>> > Warning: host_eth0 MAC addresses don't match:
>> > Address in ROM is          ea:06:97:67:f4:b6
>> > Address in environment is  00:00:11:22:33:45
>> >
>> > Warning: host_enp0s31f6 using MAC address from ROM
>> >
>> > Warning: host_eth6 MAC addresses don't match:
>> > Address in ROM is          ea:06:97:67:f4:b6
>> > Address in environment is  00:00:11:22:33:46
>> >
>> > Warning: host_docker_gwbridge using MAC address from ROM
>> >
>> > Warning: host_docker0 MAC addresses don't match:
>> > Address in ROM is          ca:07:52:28:25:66
>> > Address in environment is  00:00:11:22:33:47
>> >
>> > Warning: host_veth1f6bcd2 using MAC address from ROM
>>
>> These are warnings based on commit b96ced9cdb6 (sandbox: eth-raw: Make
>> random MAC addresses available to eth-raw). Because we don't know the
>> number of interfaces that exist on the given host when we write the
>> sandbox.dts, we override the MAC addresses with random ones. In the
>> normal case (real hardware), we would warn, since the hardware should
>> know its interfaces.
>>
>> Do you have a proposed different approach? I don't like the idea of
>> adding sandbox checks in the core code that prints this warning, and
>> it also doesn't seem like a great idea to add a hook that doesn't warn
>> just for sandbox.
>>
>> I'm happy to work on this, but I didn't address it at the time because
>> I didn't see a clear way to do it that didn't degrade the code in
>> order to remove warnings in sandbox.
>
> Can we make it so that the addresses do actually match in sandbox?

The issue is that the eth(N)?addr lives in the default env and the
interfaces are discovered by drivers/net/sandbox-raw-bus.c. Currently
we make sure we don't "run out" of addresses defined in the env by
using a randomly generated one instead. Unfortunately, the env is
shared with all modes of sandbox, so while the addresses are not
shared when running sandbox.dts, they are required when running
test.dts.

Thoughts?

Thanks,
-Joe

> Regards,
> Simon
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot

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

* [U-Boot] Errors when starting sandbox
  2018-10-01 22:01     ` Joe Hershberger
@ 2018-10-19  1:43       ` Simon Glass
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2018-10-19  1:43 UTC (permalink / raw)
  To: u-boot

Hi Joe,

On 1 October 2018 at 16:01, Joe Hershberger <joe.hershberger@ni.com> wrote:
>
> On Mon, Oct 1, 2018 at 4:27 PM, Simon Glass <sjg@chromium.org> wrote:
> > Hi Joe,
> >
> > On 1 October 2018 at 15:14, Joe Hershberger <joe.hershberger@ni.com> wrote:
> >>
> >> Hi Simon,
> >>
> >> On Mon, Oct 1, 2018 at 12:32 PM, Simon Glass <sjg@chromium.org> wrote:
> >> > Hi Joe,
> >> >
> >> > When I start sandbox now I see these errors every time. It is possible
> >> > to fix this?
> >> >
> >> > $ u-boot -D
> >> > ...
> >> > Warning: host_lo MAC addresses don't match:
> >> > Address in ROM is          ea:06:97:67:f4:b6
> >> > Address in environment is  00:00:11:22:33:44
> >> >
> >> > Warning: host_eth0 MAC addresses don't match:
> >> > Address in ROM is          ea:06:97:67:f4:b6
> >> > Address in environment is  00:00:11:22:33:45
> >> >
> >> > Warning: host_enp0s31f6 using MAC address from ROM
> >> >
> >> > Warning: host_eth6 MAC addresses don't match:
> >> > Address in ROM is          ea:06:97:67:f4:b6
> >> > Address in environment is  00:00:11:22:33:46
> >> >
> >> > Warning: host_docker_gwbridge using MAC address from ROM
> >> >
> >> > Warning: host_docker0 MAC addresses don't match:
> >> > Address in ROM is          ca:07:52:28:25:66
> >> > Address in environment is  00:00:11:22:33:47
> >> >
> >> > Warning: host_veth1f6bcd2 using MAC address from ROM
> >>
> >> These are warnings based on commit b96ced9cdb6 (sandbox: eth-raw: Make
> >> random MAC addresses available to eth-raw). Because we don't know the
> >> number of interfaces that exist on the given host when we write the
> >> sandbox.dts, we override the MAC addresses with random ones. In the
> >> normal case (real hardware), we would warn, since the hardware should
> >> know its interfaces.
> >>
> >> Do you have a proposed different approach? I don't like the idea of
> >> adding sandbox checks in the core code that prints this warning, and
> >> it also doesn't seem like a great idea to add a hook that doesn't warn
> >> just for sandbox.
> >>
> >> I'm happy to work on this, but I didn't address it at the time because
> >> I didn't see a clear way to do it that didn't degrade the code in
> >> order to remove warnings in sandbox.
> >
> > Can we make it so that the addresses do actually match in sandbox?
>
> The issue is that the eth(N)?addr lives in the default env and the
> interfaces are discovered by drivers/net/sandbox-raw-bus.c. Currently
> we make sure we don't "run out" of addresses defined in the env by
> using a randomly generated one instead. Unfortunately, the env is
> shared with all modes of sandbox, so while the addresses are not
> shared when running sandbox.dts, they are required when running
> test.dts.
>
> Thoughts?
>

How about a device-tree property that is only present in the test DT,
to control the behaviour?

Regards,
Simon

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

end of thread, other threads:[~2018-10-19  1:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-01 17:32 [U-Boot] Errors when starting sandbox Simon Glass
2018-10-01 21:14 ` Joe Hershberger
2018-10-01 21:27   ` Simon Glass
2018-10-01 22:01     ` Joe Hershberger
2018-10-19  1:43       ` Simon Glass

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.