include/linux/dsa/sja1105.h

Source file repositories/reference/linux-study-clean/include/linux/dsa/sja1105.h

File Facts

System
Linux kernel
Corpus path
include/linux/dsa/sja1105.h
Extension
.h
Size
2273 bytes
Lines
76
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct sja1105_deferred_xmit_work {
	struct dsa_port *dp;
	struct sk_buff *skb;
	struct kthread_work work;
};

/* Global tagger data */
struct sja1105_tagger_data {
	void (*xmit_work_fn)(struct kthread_work *work);
	void (*meta_tstamp_handler)(struct dsa_switch *ds, int port, u8 ts_id,
				    enum sja1110_meta_tstamp dir, u64 tstamp);
};

struct sja1105_skb_cb {
	struct sk_buff *clone;
	u64 tstamp;
	/* Only valid for packets cloned for 2-step TX timestamping */
	u8 ts_id;
};

#define SJA1105_SKB_CB(skb) \
	((struct sja1105_skb_cb *)((skb)->cb))

static inline struct sja1105_tagger_data *
sja1105_tagger_data(struct dsa_switch *ds)
{
	BUG_ON(ds->dst->tag_ops->proto != DSA_TAG_PROTO_SJA1105 &&
	       ds->dst->tag_ops->proto != DSA_TAG_PROTO_SJA1110);

	return ds->tagger_data;
}

#endif /* _NET_DSA_SJA1105_H */

Annotation

Implementation Notes