All of lore.kernel.org
 help / color / mirror / Atom feed
* Proposal to Sync BMC's MAC Address to U-Boot environment
@ 2018-11-27 10:58 Nagaraju Goruganti
  2018-11-27 13:04 ` Alexander A. Filippov
  0 siblings, 1 reply; 6+ messages in thread
From: Nagaraju Goruganti @ 2018-11-27 10:58 UTC (permalink / raw)
  To: openbmc

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

HI All,

As we want to get rid of python, making this proposal to sync BMC's MAC 
Address to U-Boot environment(assuming this is a common requirement across 
OpenBMC based systems).

Proposal:

Platform specific code :

a) Get MAC Address from platform specific NV storage (BMC VPD on OpenPOWER 
systems) into an inventory object. It is being done by 
openpower-vpd-parser on the openpower systems .

Common code:

b) A script (invoked by systemd on the way to BMC ready state) fetches BMC 
MAC Address from (platform specific) inventory object. If this MAC Address 
and the one in u-boot environment are different (or if the u-boot one is 
empty), then the script writes the inventory MAC Address to u-boot using 
fw_setenv.

c) The script can reside in a phosphor layer.

Existing Python script:

The existing python 
script(openbmc/skeleton/pyinventorymgr/sync_inventory_items.py) does the 
same thing.


We need a opinion from the community members on this proposal.

Best Regards,

Nagaraju G


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

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

* Re: Proposal to Sync BMC's MAC Address to U-Boot environment
  2018-11-27 10:58 Proposal to Sync BMC's MAC Address to U-Boot environment Nagaraju Goruganti
@ 2018-11-27 13:04 ` Alexander A. Filippov
  2018-11-28  5:35   ` Ratan Gupta
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander A. Filippov @ 2018-11-27 13:04 UTC (permalink / raw)
  To: Nagaraju Goruganti, openbmc

Hi there,

On our VESNIN servers it work by the same scenario.
This way gives an excess restart of the systemd-network.service and it looks uncomfortable.

For this reason, I wrote an implementation of the aspeed-i2c and VPD-parser for the u-boot-aspeed. 
It has one bug - i2c does not work at the cold start (after the power cord plugged). I will fix it later.

The general idea, why it is not sent to the community yet - the mainline of the u-boot already has the implementation of the aspeed-i2c but has no support (or maybe not full) of ast-2400 (which we are using). It also in our plans but with lower priority.

If you interested in any of these solutions, I can publish them.

--
Regards,
Alexander Filippov
Software Engineer, YADRO. 

________________________________________
От: openbmc <openbmc-bounces+a.filippov=yadro.com@lists.ozlabs.org> от имени Nagaraju Goruganti <ngorugan@in.ibm.com>
Отправлено: 27 ноября 2018 г. 13:58:01
Кому: openbmc@lists.ozlabs.org
Тема: Proposal to Sync BMC's MAC Address to U-Boot environment

HI All,

As we want to get rid of python, making this proposal to sync BMC's MAC Address to U-Boot environment(assuming this is a common requirement across OpenBMC based systems).

Proposal:

Platform specific code :

a) Get MAC Address from platform specific NV storage (BMC VPD on OpenPOWER systems) into an inventory object. It is being done by openpower-vpd-parser on the openpower systems .

Common code:

b) A script (invoked by systemd on the way to BMC ready state) fetches BMC MAC Address from (platform specific) inventory object. If this MAC Address and the one in u-boot environment are different (or if the u-boot one is empty), then the script writes the inventory MAC Address to u-boot using fw_setenv.

c) The script can reside in a phosphor layer.

Existing Python script:

The existing python script(openbmc/skeleton/pyinventorymgr/sync_inventory_items.py) does the same thing.


We need a opinion from the community members on this proposal.

Best Regards,

Nagaraju G

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

* Re: Proposal to Sync BMC's MAC Address to U-Boot environment
  2018-11-27 13:04 ` Alexander A. Filippov
@ 2018-11-28  5:35   ` Ratan Gupta
  2018-11-28  9:19     ` Alexander A. Filippov
  0 siblings, 1 reply; 6+ messages in thread
From: Ratan Gupta @ 2018-11-28  5:35 UTC (permalink / raw)
  To: openbmc, a.filippov

Hi Alexander,

We only restart the systemd-networkd during change of macAddress, if the 
interface is DHCP Enabled.BMC should get new IP from the DHCP server if 
the mac address has got changed. Do you still see a issue?

It would be nice if you can publish your idea also.

--
Regards
Ratan Gupta


On 27/11/18 6:34 PM, Alexander A. Filippov wrote:
> Hi there,
>
> On our VESNIN servers it work by the same scenario.
> This way gives an excess restart of the systemd-network.service and it looks uncomfortable.
>
> For this reason, I wrote an implementation of the aspeed-i2c and VPD-parser for the u-boot-aspeed.
> It has one bug - i2c does not work at the cold start (after the power cord plugged). I will fix it later.
>
> The general idea, why it is not sent to the community yet - the mainline of the u-boot already has the implementation of the aspeed-i2c but has no support (or maybe not full) of ast-2400 (which we are using). It also in our plans but with lower priority.
>
> If you interested in any of these solutions, I can publish them.
>
> --
> Regards,
> Alexander Filippov
> Software Engineer, YADRO.
>
> ________________________________________
> От: openbmc <openbmc-bounces+a.filippov=yadro.com@lists.ozlabs.org> от имени Nagaraju Goruganti <ngorugan@in.ibm.com>
> Отправлено: 27 ноября 2018 г. 13:58:01
> Кому: openbmc@lists.ozlabs.org
> Тема: Proposal to Sync BMC's MAC Address to U-Boot environment
>
> HI All,
>
> As we want to get rid of python, making this proposal to sync BMC's MAC Address to U-Boot environment(assuming this is a common requirement across OpenBMC based systems).
>
> Proposal:
>
> Platform specific code :
>
> a) Get MAC Address from platform specific NV storage (BMC VPD on OpenPOWER systems) into an inventory object. It is being done by openpower-vpd-parser on the openpower systems .
>
> Common code:
>
> b) A script (invoked by systemd on the way to BMC ready state) fetches BMC MAC Address from (platform specific) inventory object. If this MAC Address and the one in u-boot environment are different (or if the u-boot one is empty), then the script writes the inventory MAC Address to u-boot using fw_setenv.
>
> c) The script can reside in a phosphor layer.
>
> Existing Python script:
>
> The existing python script(openbmc/skeleton/pyinventorymgr/sync_inventory_items.py) does the same thing.
>
>
> We need a opinion from the community members on this proposal.
>
> Best Regards,
>
> Nagaraju G
>

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

* Re: Proposal to Sync BMC's MAC Address to U-Boot environment
  2018-11-28  5:35   ` Ratan Gupta
@ 2018-11-28  9:19     ` Alexander A. Filippov
  2018-11-28 12:33       ` Ratan Gupta
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander A. Filippov @ 2018-11-28  9:19 UTC (permalink / raw)
  To: Ratan Gupta; +Cc: openbmc, a.filippov

On Wed, Nov 28, 2018 at 11:05:32AM +0530, Ratan Gupta wrote:
> Hi Alexander,
> 
> We only restart the systemd-networkd during change of macAddress, if the
> interface is DHCP Enabled.BMC should get new IP from the DHCP server if the
> mac address has got changed. Do you still see a issue?

Yes, and because by default is used DHCP and MAC address is randomly generated, 
it happens always at first boot or after resetting to the manufactured settings.

> 
> It would be nice if you can publish your idea also.
> 

https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/16245

> --
> Regards
> Ratan Gupta
> 

--
Cheers, 
Alexander

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

* Re: Proposal to Sync BMC's MAC Address to U-Boot environment
  2018-11-28  9:19     ` Alexander A. Filippov
@ 2018-11-28 12:33       ` Ratan Gupta
  2018-11-28 13:27         ` Alexander A. Filippov
  0 siblings, 1 reply; 6+ messages in thread
From: Ratan Gupta @ 2018-11-28 12:33 UTC (permalink / raw)
  To: Alexander A. Filippov; +Cc: openbmc


On 28/11/18 2:50 PM, Alexander A. Filippov wrote:
> On Wed, Nov 28, 2018 at 11:05:32AM +0530, Ratan Gupta wrote:
>> Hi Alexander,
>>
>> We only restart the systemd-networkd during change of macAddress, if the
>> interface is DHCP Enabled.BMC should get new IP from the DHCP server if the
>> mac address has got changed. Do you still see a issue?
> Yes, and because by default is used DHCP and MAC address is randomly generated,
> it happens always at first boot or after resetting to the manufactured settings.
Do you mean to say that we shouldn't restart the systemd-networkd even 
mac address is getting changed? I think we should get the new IP as the 
mac address is changed.
>
>> It would be nice if you can publish your idea also.
>>
> https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/16245
Sure, thx would go through this change.
>> --
>> Regards
>> Ratan Gupta
>>
> --
> Cheers,
> Alexander
>

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

* Re: Proposal to Sync BMC's MAC Address to U-Boot environment
  2018-11-28 12:33       ` Ratan Gupta
@ 2018-11-28 13:27         ` Alexander A. Filippov
  0 siblings, 0 replies; 6+ messages in thread
From: Alexander A. Filippov @ 2018-11-28 13:27 UTC (permalink / raw)
  To: Ratan Gupta; +Cc: Alexander A. Filippov, openbmc

On Wed, Nov 28, 2018 at 06:03:37PM +0530, Ratan Gupta wrote:
> 
> On 28/11/18 2:50 PM, Alexander A. Filippov wrote:
> > On Wed, Nov 28, 2018 at 11:05:32AM +0530, Ratan Gupta wrote:
> > > Hi Alexander,
> > > 
> > > We only restart the systemd-networkd during change of macAddress, if the
> > > interface is DHCP Enabled.BMC should get new IP from the DHCP server if the
> > > mac address has got changed. Do you still see a issue?
> > Yes, and because by default is used DHCP and MAC address is randomly generated,
> > it happens always at first boot or after resetting to the manufactured settings.
> Do you mean to say that we shouldn't restart the systemd-networkd even mac
> address is getting changed? I think we should get the new IP as the mac
> address is changed.

Sure, I understand that we can't change MAC address without a restart of 
the network interface.

But I think there are too many these restarts.
It happens when the default config for the network interface was generated, 
then after MAC address was changed...

Time to time I see other restarts depended by some actions in ipmi. 
I'm not sure what is it. It's maybe our internal stuff.

And second thing, why we want to move the changing of the MAC address to 
the u-boot - it's the possibility to receive the valid IP address from DHCP 
at early stages.

> > 
> > > It would be nice if you can publish your idea also.
> > > 
> > https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/16245
> Sure, thx would go through this change.
> > > --
> > > Regards
> > > Ratan Gupta
> > > 
> > --
> > Cheers,
> > Alexander
> > 
> 

--
Cheers,
Alexander

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

end of thread, other threads:[~2018-11-28 13:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-27 10:58 Proposal to Sync BMC's MAC Address to U-Boot environment Nagaraju Goruganti
2018-11-27 13:04 ` Alexander A. Filippov
2018-11-28  5:35   ` Ratan Gupta
2018-11-28  9:19     ` Alexander A. Filippov
2018-11-28 12:33       ` Ratan Gupta
2018-11-28 13:27         ` Alexander A. Filippov

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.