【已评审】新增NPU处理器资源的网络指标属性

背景

新产品的单个NPU处理器端口分别具有各自的网络属性,当前Processor资源下的EthernetInterface属性仅支持展示单组网络资源,不符合实际情况
URL:https://device_ip/redfish/v1/Systems/system_id/Processors/processor_id

"EthernetInterface": {
     "MACAddress": 11:22:33:44:55:66, 
     "IPv4Address": {
         "Address": 192.168.0.1, 
         "SubnetMask": 255.255.255.0, 
         "Gateway": 192.168.0.2
     },
     "PacketsReceived": 123, 
     "PacketsTransmitted": 123, 
     "PacketsDropped": 123
 }

关联ISSUE

支持NPU处理器资源的网络属性

整体方案

按照标准资源实现


网络部分通过EthernetInterface资源实现,度量指标部分通过PortMetrics资源实现

评审点

1、指定处理器端口资源新增标准属性
2、新增指定处理器端口相关的指标资源
3、变更资源协作接口 bmc.kepler.Systems.NetworkPort.Metrics

详细描述

评审点1:指定处理器端口资源新增标准属性

资源URI:/redfish/v1/Systems/:systemid/Processors/:processorid/Ports/:portid
资源版本:Port.v1_17_0
操作类型:GET
属性列表

一级属性 二级属性 三级属性 类型 示例/默认值/取值约束 readonly 易变属性 实现PATCH 操作权限 描述
Links / / / / / / / / /
EthernetInterfaces / 数组 / / / / / 此端口提供的以太网接口链接
@odata.id 字符串 示例:/redfish/v1/Systems/1/EthernetInterfaces/EthernetAdapterBoard1Port1 true / ReadOnly 以太网接口资源的访问路径
Metrics / / / / / / / / /
@odata.id / 字符串 示例:/redfish/v1/Systems/1/Processors/NPU1/Ports/1/Metrics true / ReadOnly 指向该端口相关的指标资源

Schema定义

"Links": {
    Properties: {
        "EthernetInterfaces": {
            "description": "The links to the Ethernet interfaces this port provides.",
            "items": {
                "$ref": "http://redfish.dmtf.org/schemas/v1/EthernetInterface.json#/definitions/EthernetInterface"
            },
            "longDescription": "This property shall contain an array of links to resources of type `EthernetInterface` that represent the Ethernet interfaces this port provides.  This property shall not include Ethernet interfaces that are not directly associated to a physical port.",
                    "readonly": true,
            "type": "array",
            "versionAdded": "v1_7_0"
        }
    }
}
"Metrics": {
    "anyOf": [
        {
            "$ref": "http://redfish.dmtf.org/schemas/v1/PortMetrics.json#/definitions/PortMetrics"
        },
        {
            "type": "null"
        }
    ],
    "description": "The link to the metrics associated with this port.",
    "longDescription": "This property shall contain a link to the metrics associated with this port.",
    "readonly": true,
    "versionAdded": "v1_2_0"
},

评审点2:新增 PortMetrics 标准资源

资源URI:/redfish/v1/Systems/:systemid/Processors/:processorid/Ports/:portid/Metrics
资源版本:PortMetrics.v1_7
Required属性:“@odata.id”,“@odata.type”,“Id”,“Name”
嵌套资源:本资源(PortMetrics)嵌套于Port资源的Metrics属性中
Link资源:无

属性列表

一级属性 二级属性 类型 示例/默认值/取值约束 readonly 易变属性 实现PATCH 操作权限 描述
Networking / / / / / / / /
RXDiscards integer/null 示例:1 true / ReadOnly 最近一次重置后端口接收路径中丢弃的帧总数
RXFrames integer/null 示例:1 true / ReadOnly 最近一次重置后端口上接收到的帧总数
TXDiscards integer/null 示例:1 true / ReadOnly 最近一次重置后端口传输路径中丢弃的帧总数
TXFrames integer/null 示例:1 true / ReadOnly 最近一次重置后端口上传输的帧总数

评审点3:变更资源协作接口 bmc.kepler.Systems.NetworkPort.Metrics

变更描述:接口承载了网口指标的相关信息,新增属性用于描述端口在接收路径和传输路径上丢弃的帧总数。
接口链接bmc.kepler.Systems.NetworkPort.Metrics 定义

属性评审点

变更类型 属性名称 签名 只读 变化通知 属性描述 访问权限 属性来源 持久化类型 变更影响
新增 RXDiscards t true false 最近一次重置后端口接收路径中丢弃的帧总数,默认值为0 Read: ReadOnly 底层软件API 无影响
新增 TXDiscards t true false 最近一次重置后端口传输路径中丢弃的帧总数,默认值为0 Read: ReadOnly 底层软件API 无影响

评审结论

1、同意新增如下标准属性用于处理器端口资源关联以太网接口资源和端口指标资源
资源URI:/redfish/v1/Systems/:systemid/Processors/:processorid/Ports/:portid
资源版本:Port.v1_17_0
变化类型:指定处理器端口资源新增标准属性

EthernetInterfaces:此端口提供的以太网接口链接
Metrics:指向该端口相关的指标资源

2、同意新增如下标准端口指标资源以及相关标准属性
资源URI:/redfish/v1/Systems/:systemid/Processors/:processorid/Ports/:portid/Metrics
资源版本:PortMetrics.v1_7
变化类型:新增 PortMetrics 标准资源,并在 PortMetrics 标准资源下新增标准属性

Networking/RXDiscards:最近一次重置后端口接收路径中丢弃的帧总数,只读,类型为integer/null
Networking/RXFrames:最近一次重置后端口上接收到的帧总数,只读,类型为integer/null
Networking/TXDiscards:最近一次重置后端口传输路径中丢弃的帧总数,只读,类型为integer/null
Networking/TXFrames:最近一次重置后端口上传输的帧总数,只读,类型为integer/null

3、同意新增以下资源协作接口属性
变更描述:接口承载了网口指标的相关信息,新增属性用于描述端口在接收路径和传输路径上丢弃的帧总数。
接口链接bmc.kepler.Systems.NetworkPort.Metrics 定义
变化类型:变更资源协作接口 bmc.kepler.Systems.NetworkPort.Metrics

新增 RXDiscards 属性:最近一次重置后端口接收路径中丢弃的帧总数,类型为t,只读,不发送变化通知,默认值为0
新增 TXDiscards 属性:最近一次重置后端口传输路径中丢弃的帧总数,类型为t,只读,不发送变化通知,默认值为0

遗留问题

1、确认RXDiscards/RXFrames/TXDiscards/TXFrames是否为易变属性
结论:是易变属性,需要屏蔽资源变更事件
2、修改RXDiscards/RXFrames/TXDiscards/TXFrames为“最近一次重置后xxx”
结论:已修改属性描述