/Zephyr-latest/subsys/net/l2/ethernet/gptp/ |
D | gptp.c | 444 struct gptp_port_ds *port_ds; in gptp_init_port_ds() local 453 port_ds = GPTP_PORT_DS(port); in gptp_init_port_ds() 456 memcpy(port_ds->port_id.clk_id, default_ds->clk_id, GPTP_CLOCK_ID_LEN); in gptp_init_port_ds() 457 port_ds->port_id.port_number = port; in gptp_init_port_ds() 459 port_ds->ptt_port_enabled = true; in gptp_init_port_ds() 460 port_ds->prev_ptt_port_enabled = true; in gptp_init_port_ds() 462 port_ds->neighbor_prop_delay = 0; in gptp_init_port_ds() 463 port_ds->neighbor_prop_delay_thresh = GPTP_NEIGHBOR_PROP_DELAY_THR; in gptp_init_port_ds() 464 port_ds->delay_asymmetry = 0; in gptp_init_port_ds() 466 port_ds->ini_log_announce_itv = CONFIG_NET_GPTP_INIT_LOG_ANNOUNCE_ITV; in gptp_init_port_ds() [all …]
|
D | gptp_md.c | 121 struct gptp_port_ds *port_ds; in gptp_set_md_sync_receive() local 133 port_ds = GPTP_PORT_DS(port); in gptp_set_md_sync_receive() 155 prop_delay_rated = port_ds->neighbor_prop_delay; in gptp_set_md_sync_receive() 156 prop_delay_rated /= port_ds->neighbor_rate_ratio; in gptp_set_md_sync_receive() 160 delay_asymmetry_rated = port_ds->delay_asymmetry; in gptp_set_md_sync_receive() 161 delay_asymmetry_rated /= port_ds->neighbor_rate_ratio; in gptp_set_md_sync_receive() 184 struct gptp_port_ds *port_ds; in gptp_md_pdelay_reset() local 189 port_ds = GPTP_PORT_DS(port); in gptp_md_pdelay_reset() 191 if (state->lost_responses < port_ds->allowed_lost_responses) { in gptp_md_pdelay_reset() 194 port_ds->is_measuring_delay = false; in gptp_md_pdelay_reset() [all …]
|
D | gptp_messages.c | 185 struct gptp_port_ds *port_ds; in gptp_prepare_sync() local 203 port_ds = GPTP_PORT_DS(port); in gptp_prepare_sync() 215 hdr->sequence_id = htons(port_ds->sync_seq_id); in gptp_prepare_sync() 233 port_ds->sync_seq_id++; in gptp_prepare_sync() 291 struct gptp_port_ds *port_ds; in gptp_prepare_pdelay_req() local 308 port_ds = GPTP_PORT_DS(port); in gptp_prepare_pdelay_req() 316 hdr->sequence_id = htons(port_ds->pdelay_req_seq_id); in gptp_prepare_pdelay_req() 324 hdr->port_id.port_number = htons(port_ds->port_id.port_number); in gptp_prepare_pdelay_req() 326 hdr->log_msg_interval = port_ds->cur_log_pdelay_req_itv; in gptp_prepare_pdelay_req() 334 port_ds->port_id.clk_id, GPTP_CLOCK_ID_LEN); in gptp_prepare_pdelay_req() [all …]
|
D | gptp_mi.c | 379 struct gptp_port_ds *port_ds; in gptp_mi_pss_rcv_compute() local 384 port_ds = GPTP_PORT_DS(port); in gptp_mi_pss_rcv_compute() 387 state->rate_ratio += (port_ds->neighbor_rate_ratio - 1.0); in gptp_mi_pss_rcv_compute() 389 port_ds->sync_receipt_timeout_time_itv = port_ds->sync_receipt_timeout; in gptp_mi_pss_rcv_compute() 390 port_ds->sync_receipt_timeout_time_itv *= NSEC_PER_SEC; in gptp_mi_pss_rcv_compute() 391 port_ds->sync_receipt_timeout_time_itv *= in gptp_mi_pss_rcv_compute() 400 port_ds->sync_receipt_timeout_time_itv; in gptp_mi_pss_rcv_compute() 405 static void start_rcv_sync_timer(struct gptp_port_ds *port_ds, in start_rcv_sync_timer() argument 410 duration = K_MSEC(port_ds->sync_receipt_timeout_time_itv / in start_rcv_sync_timer() 421 struct gptp_port_ds *port_ds; in gptp_mi_pss_rcv_state_machine() local [all …]
|
D | gptp_data_set.h | 53 (&gptp_domain.port_ds[port - GPTP_PORT_START]) 557 struct gptp_port_ds port_ds[CONFIG_NET_GPTP_NUM_PORTS]; member 589 struct gptp_port_ds **port_ds,
|
/Zephyr-latest/subsys/net/lib/shell/ |
D | gptp.c | 277 struct gptp_port_ds *port_ds; in gptp_print_port_info() local 285 &port_ds, in gptp_print_port_info() 296 NET_ASSERT(port == port_ds->port_id.port_number, in gptp_print_port_info() 298 port_ds->port_id.port_number); in gptp_print_port_info() 300 PR("Port id : %d (%s)\n", port_ds->port_id.port_number, in gptp_print_port_info() 301 selected_role_str(port_ds->port_id.port_number)); in gptp_print_port_info() 304 for (i = 0; i < sizeof(port_ds->port_id.clk_id); i++) { in gptp_print_port_info() 305 PR("%02x", port_ds->port_id.clk_id[i]); in gptp_print_port_info() 307 if (i != (sizeof(port_ds->port_id.clk_id) - 1)) { in gptp_print_port_info() 313 PR("Version : %d\n", port_ds->version); in gptp_print_port_info() [all …]
|
/Zephyr-latest/subsys/net/lib/ptp/ |
D | port.c | 132 port->port_ds.announce_receipt_timeout, in port_synchronize() 133 port->port_ds.log_sync_interval); in port_synchronize() 138 struct ptp_port_ds *ds = &port->port_ds; in port_ds_init() 167 if (!ptp_port_id_eq(&port->port_ds.id, &msg->header.src_port_id) || in port_delay_req_timestamp_cb() 195 port->port_ds.id.port_number, in port_delay_req_timestamp_cb() 215 if (ptp_port_id_eq(&port->port_ds.id, &msg->header.src_port_id) && in port_sync_timestamp_cb() 231 resp->header.src_port_id = port->port_ds.id; in port_sync_timestamp_cb() 233 resp->header.log_msg_interval = port->port_ds.log_sync_interval; in port_sync_timestamp_cb() 244 LOG_DBG("Port %d sends Follow_Up message", port->port_ds.id.port_number); in port_sync_timestamp_cb() 266 msg->header.src_port_id = port->port_ds.id; in port_announce_msg_transmit() [all …]
|
D | tlv.c | 48 struct ptp_tlv_port_ds *port_ds; in tlv_mgmt_post_recv() local 238 port_ds = (struct ptp_tlv_port_ds *)mgmt_tlv->data; in tlv_mgmt_post_recv() 240 port_ds->id.port_number = ntohs(port_ds->id.port_number); in tlv_mgmt_post_recv() 241 port_ds->mean_link_delay = ntohll(port_ds->mean_link_delay); in tlv_mgmt_post_recv() 268 struct ptp_tlv_port_ds *port_ds; in tlv_mgmt_pre_send() local 312 port_ds = (struct ptp_tlv_port_ds *)mgmt_tlv->data; in tlv_mgmt_pre_send() 314 port_ds->id.port_number = htons(port_ds->id.port_number); in tlv_mgmt_pre_send() 315 port_ds->mean_link_delay = htonll(port_ds->mean_link_delay); in tlv_mgmt_pre_send()
|
D | port.h | 42 struct ptp_port_ds port_ds; member
|
D | clock.c | 152 iter->port_ds.id.port_number); in clock_forward_management_msg() 494 if (target_port->port_number == port->port_ds.id.port_number) { in ptp_clock_management_msg_process()
|
D | transport.c | 256 port->port_ds.id.port_number); in ptp_transport_close()
|
D | msg.c | 386 LOG_DBG("Port %d received %s message", port->port_ds.id.port_number, msg_type_str(msg)); in ptp_msg_post_recv()
|
/Zephyr-latest/samples/net/gptp/src/ |
D | gptp.c | 34 struct gptp_port_ds *port_ds; in get_current_status() local 41 ret = gptp_get_port_data(domain, port, &port_ds, in get_current_status() 49 if (port != port_ds->port_id.port_number) { in get_current_status()
|