History

net: dsa: sja1105: Add a state machine for RX timestamping

Meta frame reception relies on the hardware keeping its promise that it will send no other traffic towards the CPU port between a link-local frame and a meta frame. Otherwise there is no other way to associate the meta frame with the link-local frame it's holding a timestamp of. The receive function is made stateful, and buffers a timestampable frame until its meta frame arrives, then merges the two, drops the meta and releases the link-local frame up the stack.

Vladimir Oltean committed 7 years ago

Commit f3097be1 parent 08fde093 files · +189 −1Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/dsa/sja1105.h+7−0
@@ -45,6 +45,13 @@ struct sja1105_tagger_data { · 44 unmodified lines
45 bool hwts_rx_en;45 bool hwts_rx_en;
46};46};
47 47
48struct sja1105_skb_cb {
49 u32 meta_tstamp;
50};
51
52#define SJA1105_SKB_CB(skb) \
53 ((struct sja1105_skb_cb *)DSA_SKB_CB_PRIV(skb))
54
48struct sja1105_port {55struct sja1105_port {
49 struct sja1105_tagger_data *data;56 struct sja1105_tagger_data *data;
50 struct dsa_port *dp;57 struct dsa_port *dp;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t