STRUCT EFX_PTP_DATA(9)
π NAME π
okay so bestie, this is the manual page for struct efx_ptp_data(9) from the Kernel API Manual β literally the Precision Time Protocol (PTP) state struct. It is giving βthe whole PTP situation in one structβ energy. π
β¨ SYNOPSIS β¨
struct efx_ptp_data {
struct efx_nic *efx;
struct efx_channel *channel;
bool rx_ts_inline;
struct sk_buff_head rxq;
struct sk_buff_head txq;
struct list_head evt_list;
struct list_head evt_free_list;
spinlock_t evt_lock;
struct efx_ptp_event_rx rx_evts[MAX_RECEIVE_EVENTS];
struct workqueue_struct *workwq;
struct work_struct work;
bool reset_required;
u32 rxfilter_event;
u32 rxfilter_general;
bool rxfilter_installed;
struct kernel_hwtstamp_config config;
bool enabled;
unsigned int mode;
void (*ns_to_nic_time)(s64 ns, u32 *nic_major, u32 *nic_minor);
ktime_t (*nic_to_kernel_time)(u32 nic_major, u32 nic_minor, s32
correction);
struct {
u32 minor_max;
u32 sync_event_diff_min;
u32 sync_event_diff_max;
unsigned int sync_event_minor_shift;
} nic_time;
unsigned int min_synchronisation_ns;
unsigned int capabilities;
struct {
s32 ptp_tx;
s32 ptp_rx;
s32 pps_out;
s32 pps_in;
s32 general_tx;
s32 general_rx;
} ts_corrections;
efx_qword_t evt_frags[MAX_EVENT_FRAGS];
int evt_frag_idx;
int evt_code;
struct efx_buffer start;
struct pps_event_time host_time_pps;
unsigned int adjfreq_ppb_shift;
s64 current_adjfreq;
struct ptp_clock *phc_clock;
struct ptp_clock_info phc_clock_info;
struct work_struct pps_work;
struct workqueue_struct *pps_workwq;
bool nic_ts_enabled;
efx_dword_t txbuf[MCDI_TX_BUF_LEN(MC_CMD_PTP_IN_TRANSMIT_LENMAX)];
unsigned int good_syncs;
unsigned int fast_syncs;
unsigned int bad_syncs;
unsigned int sync_timeouts;
unsigned int no_time_syncs;
unsigned int invalid_sync_windows;
unsigned int undersize_sync_windows;
unsigned int oversize_sync_windows;
unsigned int rx_no_timestamp;
struct efx_ptp_timeset
timeset[MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_MAXNUM];
void (*xmit_skb)(struct efx_nic *efx, struct sk_buff *skb);
};
π Members π
efxβ The NIC context. the main character pointer, fr.channelβ The PTP channel. Siena only, bestie.rx_ts_inlineβ Flag for whether RX timestamps are inline; if not, they are separate events. it's giving βtimestamp delivery strategyβ πrxqβ Receive SKB queue, awaiting timestamps.txqβ Transmit SKB queue.evt_listβ List of MC receive events awaiting packets.evt_free_listβ List of free events.evt_lockβ Lock for manipulatingevt_listandevt_free_list.rx_evtsβ Instantiated events, hanging out onevt_listandevt_free_list.workwqβ Work queue for processing pending PTP operations.workβ Work task.reset_requiredβ A serious error has occurred and the PTP task needs to be reset (disable, enable). not a cute vibe, but important πrxfilter_eventβ Receive filter when operating.rxfilter_generalβ Receive filter when operating.rxfilter_installedβ Receive filter installed.configβ Current timestamp configuration.enabledβ PTP operation enabled.modeβ Mode in which PTP operating (PTP version).ns_to_nic_timeβ Function to convert from scalar nanoseconds to NIC time.nic_to_kernel_timeβ Function to convert from NIC to kernel time.nic_timeβ contains time details. nested details below, keep scrolling bestie π«Άnic_time.minor_maxβ Wrap point for NIC minor times.nic_time.sync_event_diff_minβ Minimum acceptable difference between time in packet prefix and last MCDI time sync event i.e. how much earlier than the last sync event time a packet timestamp can be.nic_time.sync_event_diff_maxβ Maximum acceptable difference between time in packet prefix and last MCDI time sync event i.e. how much later than the last sync event time a packet timestamp can be.nic_time.sync_event_minor_shiftβ Shift required to make minor time from field in MCDI time sync event.
min_synchronisation_nsβ Minimum acceptable corrected sync window.capabilitiesβ Capabilities flags from the NIC.ts_correctionsβ contains corrections details. correction era β¨ts_corrections.ptp_txβ Required driver correction of PTP packet transmit timestamps.ts_corrections.ptp_rxβ Required driver correction of PTP packet receive timestamps.ts_corrections.pps_outβ PPS output error (information only).ts_corrections.pps_inβ Required driver correction of PPS input timestamps.ts_corrections.general_txβ Required driver correction of general packet transmit timestamps.ts_corrections.general_rxβ Required driver correction of general packet receive timestamps.
evt_fragsβ Partly assembled PTP events.evt_frag_idxβ Current fragment number.evt_codeβ Last event code.startβ Address at which MC indicates ready for synchronisation.host_time_ppsβ Host time at last PPS.adjfreq_ppb_shiftβ Shift required to convert scaled parts-per-billion frequency adjustment into a fixed point fractional nanosecond format.current_adjfreqβ Current ppb adjustment.phc_clockβ Pointer to registered phc device (if primary function).phc_clock_infoβ Registration structure for phc device.pps_workβ pps work task for handling pps events.pps_workwqβ pps work queue.nic_ts_enabledβ Flag indicating if NIC generated TS events are handled.txbufβ Buffer for use when transmitting (PTP) packets to MC (avoids allocations in main data path).good_syncsβ Number of successful synchronisations.fast_syncsβ Number of synchronisations requiring short delay.bad_syncsβ Number of failed synchronisations.sync_timeoutsβ Number of synchronisation timeouts.no_time_syncsβ Number of synchronisations with no good times.invalid_sync_windowsβ Number of sync windows with bad durations.undersize_sync_windowsβ Number of corrected sync windows that are too small.oversize_sync_windowsβ Number of corrected sync windows that are too large.rx_no_timestampβ Number of packets received without a timestamp.timesetβ Last set of synchronisation statistics.xmit_skbβ Transmit SKB function.
π SEE ALSO π
- Kernel file
./drivers/net/ethernet/sfc/siena/ptp.c struct efx_ptp_match(9)struct efx_ptp_event_rx(9)struct efx_ptp_timeset(9)
mwah π this one lives in ./drivers/net/ethernet/sfc/siena, with version/date October 2026, and it is so struct efx_ptp_data(9) coded. bye bestie, go read the kernel π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms