|
DPDK 26.07.0-rc1
|
Go to the source code of this file.
Data Structures | |
| struct | rte_ptp_port_id |
| struct | rte_ptp_hdr |
| struct | rte_ptp_timestamp |
Macros | |
| #define | RTE_IPPORT_PTP_EVENT 319 |
| #define | RTE_IPPORT_PTP_GENERAL 320 |
| #define | RTE_ETHER_ADDR_PTP_MULTICAST { 0x01, 0x1B, 0x19, 0x00, 0x00, 0x00 } |
| #define | RTE_ETHER_ADDR_PTP_MULTICAST_PDELAY { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x0E } |
| #define | RTE_PTP_MSGTYPE_SYNC 0x0 |
| #define | RTE_PTP_MSGTYPE_DELAY_REQ 0x1 |
| #define | RTE_PTP_MSGTYPE_PDELAY_REQ 0x2 |
| #define | RTE_PTP_MSGTYPE_PDELAY_RESP 0x3 |
| #define | RTE_PTP_MSGTYPE_FU 0x8 |
| #define | RTE_PTP_MSGTYPE_DELAY_RESP 0x9 |
| #define | RTE_PTP_MSGTYPE_PDELAY_RESP_FU 0xA |
| #define | RTE_PTP_MSGTYPE_ANNOUNCE 0xB |
| #define | RTE_PTP_MSGTYPE_SIGNALING 0xC |
| #define | RTE_PTP_MSGTYPE_MANAGEMENT 0xD |
| #define | RTE_PTP_FLAG_TWO_STEP (UINT16_C(1) << 9) |
| #define | RTE_PTP_FLAG_UNICAST (UINT16_C(1) << 10) |
| #define | RTE_PTP_FLAG_LI_61 (UINT16_C(1) << 0) |
| #define | RTE_PTP_FLAG_LI_59 (UINT16_C(1) << 1) |
Functions | |
| static bool | rte_ptp_is_event (const struct rte_ptp_hdr *hdr) |
| static bool | rte_ptp_is_two_step (const struct rte_ptp_hdr *hdr) |
| static void | rte_ptp_add_correction (struct rte_ptp_hdr *hdr, uint64_t residence_ns) |
| static uint64_t | rte_ptp_timestamp_to_ns (const struct rte_ptp_timestamp *ts) |
PTP (IEEE 1588) protocol definitions
Definition in file rte_ptp.h.
| #define RTE_IPPORT_PTP_EVENT 319 |
| #define RTE_IPPORT_PTP_GENERAL 320 |
| #define RTE_ETHER_ADDR_PTP_MULTICAST { 0x01, 0x1B, 0x19, 0x00, 0x00, 0x00 } |
| #define RTE_ETHER_ADDR_PTP_MULTICAST_PDELAY { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x0E } |
| #define RTE_PTP_MSGTYPE_SYNC 0x0 |
| #define RTE_PTP_MSGTYPE_DELAY_REQ 0x1 |
| #define RTE_PTP_MSGTYPE_PDELAY_REQ 0x2 |
| #define RTE_PTP_MSGTYPE_PDELAY_RESP 0x3 |
| #define RTE_PTP_MSGTYPE_FU 0x8 |
Follow_Up (general).
| #define RTE_PTP_MSGTYPE_DELAY_RESP 0x9 |
Delay_Resp (general).
| #define RTE_PTP_MSGTYPE_PDELAY_RESP_FU 0xA |
| #define RTE_PTP_MSGTYPE_MANAGEMENT 0xD |
| #define RTE_PTP_FLAG_TWO_STEP (UINT16_C(1) << 9) |
| #define RTE_PTP_FLAG_UNICAST (UINT16_C(1) << 10) |
| #define RTE_PTP_FLAG_LI_61 (UINT16_C(1) << 0) |
| #define RTE_PTP_FLAG_LI_59 (UINT16_C(1) << 1) |
|
inlinestatic |
Check if PTP message type is an event message. Event messages (msg_type 0x0-0x3) require timestamps.
| hdr | Pointer to PTP header. |
|
inlinestatic |
|
inlinestatic |
Add a residence time (in nanoseconds) to the correctionField. Used by Transparent Clocks to account for relay transit delay. The correctionField uses IEEE 1588 scaled nanoseconds (48.16 fixed-point).
| hdr | Pointer to PTP header (will be modified in-place). |
| residence_ns | Residence time in nanoseconds to add. |
|
inlinestatic |