drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.h- Extension
.h- Size
- 2715 bytes
- Lines
- 75
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct port_infoenum ptp_rx_filter_modefunction cxgb4_xmit_with_hwtstampfunction cxgb4_xmit_hwtstamp_pending
Annotated Snippet
#ifndef __CXGB4_PTP_H__
#define __CXGB4_PTP_H__
/* Maximum parts-per-billion adjustment that is acceptable */
#define MAX_PTP_FREQ_ADJ 1000000
#define PTP_CLOCK_MAX_ADJTIME 10000000 /* 10 ms */
#define PTP_MIN_LENGTH 63
#define PTP_IN_TRANSMIT_PACKET_MAXNUM 240
#define PTP_EVENT_PORT 319
enum ptp_rx_filter_mode {
PTP_TS_NONE = 0,
PTP_TS_L2,
PTP_TS_L4,
PTP_TS_L2_L4
};
struct port_info;
static inline bool cxgb4_xmit_with_hwtstamp(struct sk_buff *skb)
{
return skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP;
}
static inline void cxgb4_xmit_hwtstamp_pending(struct sk_buff *skb)
{
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
}
void cxgb4_ptp_init(struct adapter *adap);
void cxgb4_ptp_stop(struct adapter *adap);
bool cxgb4_ptp_is_ptp_tx(struct sk_buff *skb);
bool cxgb4_ptp_is_ptp_rx(struct sk_buff *skb);
int cxgb4_ptprx_timestamping(struct port_info *pi, u8 port, u16 mode);
int cxgb4_ptp_redirect_rx_packet(struct adapter *adap, struct port_info *pi);
int cxgb4_ptp_txtype(struct adapter *adap, u8 port_id);
void cxgb4_ptp_read_hwstamp(struct adapter *adap, struct port_info *pi);
bool is_ptp_enabled(struct sk_buff *skb, struct net_device *dev);
#endif /* __CXGB4_PTP_H__ */
Annotation
- Detected declarations: `struct port_info`, `enum ptp_rx_filter_mode`, `function cxgb4_xmit_with_hwtstamp`, `function cxgb4_xmit_hwtstamp_pending`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.