Leverage Entity-Manager runtime JSON driven system configuration manager. Device inventory will be defined in a seperate EM json configuration file and link topology details will be defined in a seperate EM json file [like in sample config json hgxb_nvlink_topology.json].
Link mapping excel is expected in below mentioned format. NOTE: Any variation from the mentioned format may give error while running the nvlink_topology_processor.py A sample mapping excel is given in tools/ (HGXB_NVLink_Mapping.xlsx)
Table 1: For each link there are 2 endpoints, for both the endpoints below mentioned data is required. (in column A:F)
[NOTE: - DeviceType is all-caps and possible values are “GPU”, “SWITCH”, “PCIE_BRIDGE” and “CPU”. - Entry in this mapping table is per link (having 2 devices at each end) not per device port.]
Table 2: To give information about each device type is required. (in column H:J)
[NOTE: - DbusInventoryPath should have $INSTANCE_NUMBER which will be replaced with the device ID available in column A & D.]
Table 3: To give information about link prefix used on dbus object. (in column L:N)
[NOTE: - Each link has 2 ends, so when device type in col:L is connected to device type in col:M link prefix in col:N is to be used.]
[NOTE: - When we have external device connected on one end then put the placeholder ‘-’ in column D, E & F.]
| Configuration Property | type | Description |
|---|---|---|
| Type | string | NVLinkTopology |
| Name | string | Name for EM dbus object, which is same as device name. |
| Count | int | The total port count on the device. example: if Count=4 and LinkPrefix=“Port”, then four state.PortMetric PDIs will be populated to /xyz/openbmc_project/.../Ports/Port_0 /xyz/openbmc_project/.../Ports/Port_1 /xyz/openbmc_project/.../Ports/Port_2 /xyz/openbmc_project/.../Ports/Port_3 |
| Topology | - | Defining details about each port on device. [0 to count-1] |
| Configuration Property | type | Description |
|---|---|---|
| InventoryObjPath | string | Dbus object path of the current device port. |
| LogicalPortNumber | int | Logical port Id of the device as created by the script. |
| Associations | array of string | Associations {forward, backward, absolutePath} to be added on InventoryObjPath. |
Format: python nvlink_topology_processor.py <input_mapping_file> <output_json_file>
python3 nvLink_topology_processor.py HGXB_NVLink_Mapping.xlsx hgxb_nvlink_topology.json