All of lore.kernel.org
 help / color / mirror / Atom feed
* Configuring VLAN interface via redfish
@ 2021-12-30 18:08 Zhao, Jiaqing
  2022-01-06 16:21 ` Zhao, Jiaqing
  2022-01-10 14:35 ` Patrick Williams
  0 siblings, 2 replies; 3+ messages in thread
From: Zhao, Jiaqing @ 2021-12-30 18:08 UTC (permalink / raw)
  To: openbmc@lists.ozlabs.org

Hi, all

With systemd-networkd, each VLAN is a virtual interface associated to the physical interface, and it has its own network config like IP address. Currently our phosphor-networkd also supports it well. But in the bmcweb side, we lack the implementation. And there is an issue long ago about it https://github.com/openbmc/bmcweb/issues/79.

In current Redfish implementation, VLAN is only shown at /​redfish/​v1/​Managers/​bmc/​EthernetInterfaces/​<str>/​VLANs/​<str> with very limited information (Only VLAN ID). User cannot configure the interface itself. And the VLanNetworkInterface schema is deprecated on 2021.3.

My proposal is exposing the VLAN virtual interface in the same way as physical interface. In this way, we call utilize existing code of getting/setting interface properties, only need to extend some VLAN-specific properties. This is also the way suggested by Redfish schema.

Details are:

1. In EthernetInterface, use EthernetInterfaceType to indicate whether it is physical or VLAN (Physical/Virtual)
2. Add VLAN-specific properties like VLANId to VLAN interfaces.
3. Add a new API to create VLAN. (This replaces current POST /redfish/v1/Managers/bmc/EthernetInterfaces/<str> /VLANs)
4. Create a DELETE method handler in /redfish/v1/Managers/bmc/EthernetInterfaces/<str> for deleting VLAN interface.

For #3, I got two ideas, I'm not sure which one is preferred

3.1 Action CreateVLAN in each physical interface. Payload will be {"VLANId": 1} format
3.2 POST method of /redfish/v1/Managers/bmc/EthernetInterfaces {"Id": "<Interface>_<VLANId>"}, e.g. {"Id": "eth0_1"}

Any suggestions/alternatives will be appreciated.

Thanks and happy new year,
Jiaqing


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

* Configuring VLAN interface via redfish
  2021-12-30 18:08 Configuring VLAN interface via redfish Zhao, Jiaqing
@ 2022-01-06 16:21 ` Zhao, Jiaqing
  2022-01-10 14:35 ` Patrick Williams
  1 sibling, 0 replies; 3+ messages in thread
From: Zhao, Jiaqing @ 2022-01-06 16:21 UTC (permalink / raw)
  To: openbmc@lists.ozlabs.org

Hi, all

The initial message I sent on Dec 2021 is blocked since I was not a member of this mailing list at that time, please ignore that one.

With systemd-networkd, each VLAN is a virtual interface associated to the physical interface, and it has its own network config like IP address. Currently our phosphor-networkd also supports it well. But in the bmcweb side, we lack the implementation. And there is an issue long ago about it at https://github.com/openbmc/bmcweb/issues/79.

In current Redfish implementation, VLAN is only shown at /​redfish/​v1/​Managers/​bmc/​EthernetInterfaces/​<str>/​VLANs/​<str> with very limited information (Only VLAN ID). User cannot configure the interface itself. And the VLanNetworkInterface schema is deprecated on 2021.3.

My proposal is exposing the VLAN virtual interface in the same way as physical interface. In this way, we call utilize existing code of getting/setting interface properties, only need to extend some VLAN-specific properties. This is also the way suggested by Redfish schema.

Details are:

1. In EthernetInterface, use EthernetInterfaceType to indicate whether it is physical or VLAN (Physical/Virtual)
2. Add VLAN-specific properties like VLANId to VLAN interfaces.
3. Add a new API to create VLAN. (This replaces current POST /redfish/v1/Managers/bmc/EthernetInterfaces/<str>/VLANs)
4. Create a DELETE method handler in /redfish/v1/Managers/bmc/EthernetInterfaces/<str> for deleting VLAN interface.

For #3, my idea is to add an OEM action CreateVLAN in each physical interface, the payload will be in {"VLANId": 1} format. I know this is a non-standard way, but I cannot think of a better idea. POSTing the EthernetInterfaceCollection seems cannot handle which physical interface the VLAN interface belongs to.

Also, I found that changing VLAN ID is not supported in phosphor-networkd, though bmcweb current has a PATCH handler for it, it will not take effect. I am also going to remove it in my patch.

Any suggestions/alternatives will be appreciated.

Thanks,
Jiaqing


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

* Re: Configuring VLAN interface via redfish
  2021-12-30 18:08 Configuring VLAN interface via redfish Zhao, Jiaqing
  2022-01-06 16:21 ` Zhao, Jiaqing
@ 2022-01-10 14:35 ` Patrick Williams
  1 sibling, 0 replies; 3+ messages in thread
From: Patrick Williams @ 2022-01-10 14:35 UTC (permalink / raw)
  To: Zhao, Jiaqing; +Cc: openbmc@lists.ozlabs.org

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

On Thu, Dec 30, 2021 at 06:08:38PM +0000, Zhao, Jiaqing wrote:

> For #3, I got two ideas, I'm not sure which one is preferred
> 
> 3.1 Action CreateVLAN in each physical interface. Payload will be {"VLANId": 1} format
> 3.2 POST method of /redfish/v1/Managers/bmc/EthernetInterfaces {"Id": "<Interface>_<VLANId>"}, e.g. {"Id": "eth0_1"}

Shouldn't this be discussed at the Redfish forum?  If it isn't documented in
their schemas whatever we implement is effectively OEM.

-- 
Patrick Williams

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2022-01-10 14:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-30 18:08 Configuring VLAN interface via redfish Zhao, Jiaqing
2022-01-06 16:21 ` Zhao, Jiaqing
2022-01-10 14:35 ` Patrick Williams

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.