From: Johnathan Mantey <johnathanx.mantey@intel.com>
To: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>, <openbmc@lists.ozlabs.org>
Cc: wak@google.com
Subject: Re: VLAN issue with NICEnabled property
Date: Wed, 11 May 2022 13:31:51 -0700 [thread overview]
Message-ID: <b64651cc-7da1-d8d4-eaa1-de4cd7555828@intel.com> (raw)
In-Reply-To: <93ff730f-ee5c-b5a1-9e14-873248ff969f@linux.intel.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 2517 bytes --]
On 4/15/22 05:28, Jiaqing Zhao wrote:
> Hi, all
>
> In phosphor-networkd, setting NICEnabled to false write "Unmanaged=yes" in network configuration file. There was an issue with this property and its VLAN. Reboot bmc after setting NICEnabled to false, its VLAN interfaces disappears, and if set it to true, all previously configured VLANs for this interfaces will be lost.
>
> The reason is, since the interface is set to Unmanaged in config file, systemd-networkd will not configure the interface on boot, including creating VLANs. On the phosphor-networkd side, it creates its interface list from getifaddrs(), as VLAN interfaces are not created, they will not be added to the list. When setting NICEnabled back to true, it rewrites the config file with the VLANs in that list, so no VLAN is written, essentially removes the previously configured VLAN from the system with dangling vlan netdev and config files.
>
> To solve this issue, my proposal is to write "ActivationPolicy=down" when NICEnabled is false, this option tells systemd-networkd not to bring up the interface on boot. But it is still managed, meaning that its VLAN interfaces will be created.
This control was the result of using the Unmanaged entry for disabling
the NIC. The phosphor-network code needs to change to the
ActivationPolicy configuration option, IMO.
>
> But there is a question of this proposal, how to set nicEnabled property when creating the interface? Using "ActivationPolicy=down" still
What do you mean by "creating the interface"?
Are you referring to what the systemd-networkd service will do?
Are you referring to how phosphor-network captures the network
configuration in the data structures used to manage systemd.network
configuration files?
> has the issue mentioned inhttps://github.com/openbmc/phosphor-networkd/commit/26275a3f2ecffe62646b65646c00a9e56c75bff8, however, unlike Unmanaged interfaces will have is AdministrativeState==managed, a interface that is down has AdministrativeState==configuring, which is also a possible value for interfaces needs to be brought up on boot, though it will become "configured" when it is up.
>
> One idea I came up with is to us configParser to read the ActivationPolicy from config file. Any other ideas will be appreciated.
>
> Thanks,
> Jiaqing
--
Johnathan Mantey
Senior Software Engineer
*azad te**chnology partners*
Contributing to Technology Innovation since 1992
Phone: (503) 712-6764
Email: johnathanx.mantey@intel.com
[-- Attachment #1.1.2: Type: text/html, Size: 4029 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
next prev parent reply other threads:[~2022-05-11 20:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-15 12:28 VLAN issue with NICEnabled property Jiaqing Zhao
2022-05-11 20:31 ` Johnathan Mantey [this message]
2022-05-12 8:09 ` Jiaqing Zhao
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=b64651cc-7da1-d8d4-eaa1-de4cd7555828@intel.com \
--to=johnathanx.mantey@intel.com \
--cc=jiaqing.zhao@linux.intel.com \
--cc=openbmc@lists.ozlabs.org \
--cc=wak@google.com \
/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 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.