Change-Id: Ia527f22d14db8b1d2a19fdae7fb3991bb0a645da Signed-off-by: Guntaka Umashankar Reddy <umashankarguntaka.reddy@windriver.com>
395 lines
13 KiB
Plaintext
395 lines
13 KiB
Plaintext
{
|
|
// PTP Configuration Expectation for Compute Nodes
|
|
// This file defines the expected PTP configuration for compute nodes in the StarlingX system
|
|
// Values are derived from default.json5 and match the topology diagram
|
|
|
|
// Service types:
|
|
// - TBC: Time Boundary Clock - Receives time from a master clock and distributes it to downstream clocks
|
|
// - TGM: Telecom Grandmaster - Acts as the primary source of time in the network (receives from GNSS or SMA)
|
|
// - T-TSC: Telecom Time Slave Clock - Synchronizes to an upstream master clock
|
|
|
|
// Time sources:
|
|
// - GNSS: Global Navigation Satellite System provides time to Controller-0 NIC1
|
|
// - SMA: SubMiniature version A connector provides clock to Controller-0 NIC2
|
|
|
|
ptp_instances: {
|
|
|
|
ptp4l: [
|
|
|
|
{
|
|
// PTP1 instance - Telecom Grandmaster (TGM)
|
|
// Receives time from GNSS on Controller-0 NIC1
|
|
// Distributes time to controller-1 with Priority 100 (Master)
|
|
name: "ptp1",
|
|
instance_hostnames : ["compute-0", "controller-0", "controller-1"],
|
|
instance_parameters: "priority2=100 tx_timestamp_timeout=700 boundary_clock_jbod=1 domainNumber=24 dataset_comparison=G.8275.x",
|
|
ptp_interface_names: [
|
|
"ptp1if1",
|
|
"ptp1if2",
|
|
],
|
|
},
|
|
|
|
{
|
|
// PTP2 instance - Time Boundary Clock (TBC)
|
|
// Receives time from controller-0 PTP1 (GNSS source)
|
|
// Distributes time to External device type with Priority 110 (Master)
|
|
name: "ptp2",
|
|
instance_hostnames : [],
|
|
instance_parameters: "priority2=110 dataset_comparison=G.8275.x tx_timestamp_timeout=700 boundary_clock_jbod=1 domainNumber=24",
|
|
ptp_interface_names: [
|
|
"ptp2if1",
|
|
"ptp2if2"
|
|
],
|
|
},
|
|
|
|
{
|
|
// PTP3 instance - Telecom Grandmaster (TGM)
|
|
// Receives clock from SMA on Controller-0 NIC2
|
|
// Distributes time to controller-1 with Priority 100 (Master)
|
|
name: "ptp3",
|
|
instance_hostnames : ["controller-0", "compute-0"],
|
|
instance_parameters: "priority2=100 dataset_comparison=G.8275.x tx_timestamp_timeout=700 boundary_clock_jbod=1 domainNumber=24",
|
|
ptp_interface_names: [
|
|
"ptp3if1",
|
|
"ptp3if2"
|
|
],
|
|
},
|
|
|
|
{
|
|
// PTP4 instance - Time Boundary Clock (TBC)
|
|
// Receives time from controller-0 PTP3 (SMA clock source)
|
|
// Distributes time to Spirent Module2_port-5 with Priority 110 (Master)
|
|
name: "ptp4",
|
|
instance_hostnames : ["controller-1"],
|
|
instance_parameters: "boundary_clock_jbod=1 tx_timestamp_timeout=700 priority2=110 dataset_comparison=G.8275.x domainNumber=24",
|
|
ptp_interface_names: [
|
|
"ptp4if1",
|
|
"ptp4if2"
|
|
],
|
|
}
|
|
|
|
],
|
|
|
|
// phc2sys - Synchronizes system clock to PTP hardware clock
|
|
// Used to maintain time synchronization between hardware and system clocks
|
|
phc2sys : [
|
|
{
|
|
// PHC1 instance - Synchronizes controller-0 and compute-0 system clocks
|
|
// Uses controller-0's NIC1 connection to Spirent as reference
|
|
name: "phc1",
|
|
instance_hostnames : ["controller-0", "compute-0"],
|
|
instance_parameters: "cmdline_opts='-s {{controller_0.nic1.conn_to_proxmox}} -O -37 -m'",
|
|
ptp_interface_names: [
|
|
"phc1if1",
|
|
],
|
|
},
|
|
|
|
{
|
|
name: "phc2",
|
|
instance_hostnames : [],
|
|
instance_parameters: "uds_address=/var/run/ptp4l-ptp2 domainNumber=24",
|
|
ptp_interface_names: [
|
|
"phc2if1",
|
|
],
|
|
},
|
|
|
|
{
|
|
name: "phc3",
|
|
instance_hostnames : [],
|
|
instance_parameters: "domainNumber=24 uds_address=/var/run/ptp4l-ptp3",
|
|
ptp_interface_names: [
|
|
"phc3if1",
|
|
],
|
|
},
|
|
|
|
{
|
|
name: "phc4",
|
|
instance_hostnames : ['controller-1'],
|
|
instance_parameters: "domainNumber=24 uds_address=/var/run/ptp4l-ptp4",
|
|
ptp_interface_names: [
|
|
"phc4if1",
|
|
],
|
|
},
|
|
|
|
],
|
|
|
|
// ts2phc - Synchronizes PTP hardware clock to external time source
|
|
// Used with GNSS receivers to provide accurate time reference
|
|
ts2phc : [
|
|
{
|
|
// TS1 instance - Synchronizes controller-0 to GNSS time source
|
|
// Uses NMEA serial port for GNSS connection
|
|
name: "ts1",
|
|
instance_hostnames : ["controller-0", "compute-0"],
|
|
instance_parameters: "ts2phc.nmea_serialport=/dev/gnss0",
|
|
ptp_interface_names: [
|
|
"ts1if1",
|
|
],
|
|
},
|
|
],
|
|
clock : [
|
|
{
|
|
// Clock1 instance - Provides clock signals for controller-0 and compute-0
|
|
// Connects to SMA interfaces for physical clock distribution
|
|
name: "clock1",
|
|
instance_hostnames : ["controller-0","compute-0"],
|
|
instance_parameters: "",
|
|
ptp_interface_names: [
|
|
"clock1if1",
|
|
"clock1if2",
|
|
],
|
|
},
|
|
],
|
|
|
|
},
|
|
|
|
// PTP Host Interfaces - Maps logical PTP interfaces to physical network interfaces
|
|
// Defines which physical interfaces are used for each PTP instance on each host
|
|
ptp_host_ifs: [
|
|
{
|
|
name: "ptp1if1",
|
|
controller_0_interfaces: ["{{ controller_0.nic1.nic_connection.interface }}"],
|
|
controller_1_interfaces: ["{{ controller_1.nic1.nic_connection.interface }}"],
|
|
compute_0_interfaces: ["{{ compute_0.nic1.nic_connection.interface }}"],
|
|
ptp_interface_parameter : "",
|
|
},
|
|
|
|
{
|
|
name: "ptp1if2",
|
|
controller_0_interfaces: ["{{ controller_0.nic1.conn_to_proxmox }}"],
|
|
controller_1_interfaces: ["{{ controller_1.nic1.conn_to_proxmox }}"],
|
|
compute_0_interfaces: [],
|
|
ptp_interface_parameter : "",
|
|
},
|
|
|
|
{
|
|
name: "ptp2if1",
|
|
controller_0_interfaces: [],
|
|
controller_1_interfaces: [],
|
|
compute_0_interfaces: [],
|
|
ptp_interface_parameter : "",
|
|
},
|
|
|
|
{
|
|
name: "ptp2if2",
|
|
controller_0_interfaces: [],
|
|
controller_1_interfaces: [],
|
|
compute_0_interfaces: [],
|
|
ptp_interface_parameter : "",
|
|
},
|
|
|
|
{
|
|
name: "ptp3if1",
|
|
controller_0_interfaces: ["{{ controller_0.nic2.nic_connection.interface }}"],
|
|
controller_1_interfaces: [],
|
|
compute_0_interfaces: ["{{ compute_0.nic2.nic_connection.interface }}"],
|
|
ptp_interface_parameter : "",
|
|
},
|
|
|
|
{
|
|
name: "ptp3if2",
|
|
controller_0_interfaces: ["{{ controller_0.nic2.conn_to_proxmox }}"],
|
|
controller_1_interfaces: [],
|
|
compute_0_interfaces: [],
|
|
ptp_interface_parameter : "",
|
|
},
|
|
|
|
{
|
|
name: "ptp4if1",
|
|
controller_0_interfaces: [],
|
|
controller_1_interfaces: ["{{ controller_1.nic2.nic_connection.interface }}"],
|
|
compute_0_interfaces: [],
|
|
ptp_interface_parameter : "",
|
|
},
|
|
|
|
{
|
|
name: "ptp4if2",
|
|
controller_0_interfaces: [],
|
|
controller_1_interfaces: ["{{ controller_1.nic2.conn_to_proxmox }}"],
|
|
compute_0_interfaces: [],
|
|
ptp_interface_parameter : "",
|
|
},
|
|
|
|
{
|
|
name: "phc1if1",
|
|
controller_0_interfaces: [],
|
|
controller_1_interfaces: [],
|
|
compute_0_interfaces: [],
|
|
ptp_interface_parameter : "",
|
|
},
|
|
|
|
{
|
|
name: "phc2if1",
|
|
controller_0_interfaces: [],
|
|
controller_1_interfaces: [],
|
|
compute_0_interfaces: [],
|
|
ptp_interface_parameter : "",
|
|
},
|
|
|
|
{
|
|
name: "phc3if1",
|
|
controller_0_interfaces: [],
|
|
controller_1_interfaces: [],
|
|
compute_0_interfaces: [],
|
|
ptp_interface_parameter : "",
|
|
},
|
|
|
|
{
|
|
name: "phc4if1",
|
|
controller_0_interfaces: [],
|
|
controller_1_interfaces: ["{{ controller_1.nic2.base_port }}"],
|
|
compute_0_interfaces: [],
|
|
ptp_interface_parameter :"",
|
|
},
|
|
|
|
{
|
|
name: "ts1if1",
|
|
controller_0_interfaces: ["{{ controller_0.nic2.base_port }}", "{{ controller_0.nic1.conn_to_proxmox }}"],
|
|
controller_1_interfaces: ["{{ controller_1.nic1.conn_to_proxmox }}"],
|
|
compute_0_interfaces: ["{{ compute_0.nic1.nic_connection.interface }}", "{{ compute_0.nic2.nic_connection.interface }}"],
|
|
ptp_interface_parameter : "ts2phc.channel=1 ts2phc.pin_index=1",
|
|
},
|
|
|
|
{
|
|
name: "clock1if1",
|
|
controller_0_interfaces: ["{{ controller_0.nic1.conn_to_proxmox }}"],
|
|
controller_1_interfaces: [],
|
|
compute_0_interfaces: ["{{ compute_0.nic1.nic_connection.interface }}"],
|
|
ptp_interface_parameter : "sma1={{ controller_0.nic1.sma1.is_input_or_output }}",
|
|
},
|
|
{
|
|
name: "clock1if2",
|
|
controller_0_interfaces: ["{{ controller_0.nic2.base_port }}"],
|
|
controller_1_interfaces: [],
|
|
compute_0_interfaces: ["{{ compute_0.nic2.nic_connection.interface }}"],
|
|
ptp_interface_parameter : "sma1={{ controller_0.nic2.sma1.is_input_or_output }}",
|
|
},
|
|
],
|
|
// This section is for validation purposes. All expected values are maintained here
|
|
// Used by test framework to verify correct PTP configuration and behavior
|
|
// Defines expected port states, parent-child relationships, and clock settings
|
|
"expected_dict": {
|
|
"ptp4l": [
|
|
{
|
|
"name": "ptp1",
|
|
"controller-0": {
|
|
"parent_data_set" : {{ parent_data_set_tgm_default }},
|
|
"time_properties_data_set": {{ time_properties_data_set_tgm_default }},
|
|
"grandmaster_settings": {{ grandmaster_settings.grandmaster_settings_tgm_default }},
|
|
"port_data_set": [
|
|
{
|
|
"interface" : "{{ controller_0.nic1.nic_connection.interface }}", // ctrl0 NIC1 is MASTER and ctr1 NIC1 is SLAVE
|
|
"port_state": "MASTER"
|
|
},
|
|
{
|
|
"interface" : "{{ controller_0.nic1.conn_to_proxmox }}",
|
|
"port_state": "MASTER"
|
|
}
|
|
]
|
|
},
|
|
"controller-1": {
|
|
"parent_data_set" : {{ parent_data_set_tgm_default }},
|
|
"time_properties_data_set": {{ time_properties_data_set_tgm_default }},
|
|
"grandmaster_settings": {
|
|
"clock_class": [165, 248],
|
|
"clock_accuracy": "0xfe",
|
|
"offset_scaled_log_variance": "0xffff",
|
|
"time_traceable": 0,
|
|
"frequency_traceable": 0,
|
|
"time_source": "0xa0",
|
|
"current_utc_offset_valid": 0
|
|
},
|
|
"port_data_set": [
|
|
{
|
|
"interface" : "{{ controller_1.nic1.nic_connection.interface }}",
|
|
"port_state": "SLAVE",
|
|
"parent_port_identity" : {
|
|
"name": "ptp1",
|
|
"hostname":"controller-0",
|
|
"interface": "{{ controller_0.nic1.nic_connection.interface }}" // ctrl-0 NIC1 is Master and ctrl-1 NIC1 is slave
|
|
},
|
|
},
|
|
{
|
|
"interface" : "{{ controller_1.nic1.conn_to_proxmox }}",
|
|
"port_state": "MASTER"
|
|
}
|
|
],
|
|
},
|
|
"compute-0": {
|
|
"parent_data_set" : {{ parent_data_set_tgm_default }},
|
|
"time_properties_data_set": {{ time_properties_data_set_tgm_default }},
|
|
"grandmaster_settings": {{ grandmaster_settings.grandmaster_settings_tgm_default }},
|
|
"port_data_set": [
|
|
{
|
|
"interface" : "{{ compute_0.nic1.nic_connection.interface }}",
|
|
"port_state": ["LISTENING", "FAULTY"]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "ptp2",
|
|
},
|
|
{
|
|
"name": "ptp3",
|
|
"controller-0" : {
|
|
"parent_data_set" : {{ parent_data_set_tgm_default }},
|
|
"time_properties_data_set": {{ time_properties_data_set_tgm_default }},
|
|
"grandmaster_settings": {{ grandmaster_settings.grandmaster_settings_tgm_default }},
|
|
"port_data_set": [
|
|
{
|
|
"interface": "{{ controller_0.nic2.nic_connection.interface }}", // ctrl0 NIC2 is MASTER and ctr1 NIC2 is SLAVE
|
|
"port_state": "MASTER"
|
|
},
|
|
{
|
|
"interface": "{{ controller_0.nic2.conn_to_proxmox }}",
|
|
"port_state": "MASTER"
|
|
}
|
|
]
|
|
},
|
|
"compute-0" : {
|
|
"parent_data_set" : {{ parent_data_set_tgm_default }},
|
|
"time_properties_data_set": {{ time_properties_data_set_tgm_default }},
|
|
"grandmaster_settings": {{ grandmaster_settings.grandmaster_settings_tgm_default }},
|
|
"port_data_set": [
|
|
{
|
|
"interface": "{{ compute_0.nic2.nic_connection.interface }}",
|
|
"port_state": "MASTER"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "ptp4",
|
|
"controller-1" : {
|
|
"parent_data_set" : {{ parent_data_set_tgm_default }},
|
|
"time_properties_data_set": {{ time_properties_data_set_tgm_default }},
|
|
"grandmaster_settings": {
|
|
"clock_class": [165, 248],
|
|
"clock_accuracy": "0xfe",
|
|
"offset_scaled_log_variance": "0xffff",
|
|
"time_traceable": 0,
|
|
"frequency_traceable": 0,
|
|
"time_source": "0xa0",
|
|
"current_utc_offset_valid": 0
|
|
},
|
|
"port_data_set": [
|
|
{
|
|
"interface": "{{ controller_1.nic2.nic_connection.interface }}",
|
|
"port_state": "SLAVE",
|
|
"parent_port_identity" : {
|
|
"name": "ptp3",
|
|
"hostname":"controller-0",
|
|
"interface": "{{ controller_0.nic2.nic_connection.interface }}" // ctrl-0 NIC2 is Master and ctrl-1 NIC2 is slave
|
|
},
|
|
},
|
|
{
|
|
"interface": "{{ controller_1.nic2.conn_to_proxmox }}",
|
|
"port_state": "MASTER"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
} |