Skip to contentSkip to conversation

Configuring synchronous ethernet with ethtool?

DISCUSSION Richard Cochran 2 participants 4 messages Mar 17, 2015 – Apr 4, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Dear list,

I need to configure Synchronous Ethernet (SyncE) on a per-port basis for a current project. So, I have been thinking about how best to implement SyncE. My first idea is to make this into a new ethtool operation, but I would like to get some feedback about the direction.

Apart from ITU-T G.8261, 8262, and 8264, which are not too helpful, I could hardly find any documentation at all about how SyncE is supposed to work. My current understanding is limited to:

* 100 Mbit

- Each link partner generates its own transmit clocks.

- There is at least one 100 Mbit PHY that allows using the recovered clock from the link partner for the PHY's own transmit clock. (SyncE slave mode)

* 1000 Mbit

- With 1000 Mbit, only one of the link partners generates a clock. The decision of which link partner becomes the clock master is a normal part of the Gigabit protocol.

- One switch I have worked with has per-port bits that allow setting MASTER/SLAVE and MANUAL/PREFERRED. I am not sure what the "preferred" modes does.

So, my current idea is to have an ethtool option to set the SyncE mode to one of:

- master (1000 Mbit only)
- slave
- none

I am not sure whether the manual/preferred thing makes any sense. Maybe someone has insight into this?

Thoughts?

Thanks,
Richard

#1 lore raw
Quoted 6 lines · Richard Cochran

Dear list,

I need to configure Synchronous Ethernet (SyncE) on a per-port basis for a current project. So, I have been thinking about how best to implement SyncE. My first idea is to make this into a new ethtool operation, but I would like to get some feedback about the direction.

[...]

Quoted 9 lines

So, my current idea is to have an ethtool option to set the SyncE mode to one of:

- master (1000 Mbit only)
- slave
- none

I am not sure whether the manual/preferred thing makes any sense. Maybe someone has insight into this?

The 'manual' setting matches terminology in IEEE 802.3 (section 40.5.2). There's no mention of 'preferred' there but perhaps this switch will claim to be a single-port if you say it should prefer slave mode.

As you know, 1000BASE-T also uses synchronous TX clocks; so does 10GBASE-T. It might be useful to be able to set the flag for multiport device on Linux systems with multiple ports connected by a software bridge. Both this and the manual settings could be useful for link compatibility testing.

So, I like the idea but it should not be tied to SyncE only.

Ben.

Signature · 2 lines
Ben Hutchings
The most exhausting thing in life is being insincere. - Anne Morrow Lindberg
#2 lore raw
Quoted 3 lines · Ben Hutchings

The 'manual' setting matches terminology in IEEE 802.3 (section 40.5.2). There's no mention of 'preferred' there but perhaps this switch will claim to be a single-port if you say it should prefer slave mode.

Thanks for the reference. The switch I was talking about has control register 9 implemented exactly as described in 802.3, but the TRM description of bit 9.10 adds the word "prefer".

Quoted 1 line

So, I like the idea but it should not be tied to SyncE only.

Something like this?

   | ethtool property        | effect             |
   |-------------------------+--------------------|
   | synce-mode = none       | 9.12 = 0           |
   | synce-mode = master     | 9.12 = 1, 9.11 = 1 |
   | synce-mode = slave      | 9.12 = 1, 9.11 = 0 |
   |                         |                    |
   | port-type = multiport   | 9.10 = 1           |
   | port-type = single-port | 9.10 = 0           |

Thanks,
Richard

#3 lore raw
Quoted 9 lines · Richard Cochran
Quoted 3 lines · Ben Hutchings

The 'manual' setting matches terminology in IEEE 802.3 (section 40.5.2). There's no mention of 'preferred' there but perhaps this switch will claim to be a single-port if you say it should prefer slave mode.

Thanks for the reference. The switch I was talking about has control register 9 implemented exactly as described in 802.3, but the TRM description of bit 9.10 adds the word "prefer".

Quoted 7 lines
Quoted 1 line

So, I like the idea but it should not be tied to SyncE only.

Something like this?

   | ethtool property        | effect             |
   |-------------------------+--------------------|
   | synce-mode = none       | 9.12 = 0           |

That's not 'none', it's just not forced. This would be used for both asynchronous operation and for synchronous operation with negotiated clock mode.

Quoted 2 lines
   | synce-mode = master     | 9.12 = 1, 9.11 = 1 |
   | synce-mode = slave      | 9.12 = 1, 9.11 = 0 |

So there are four different modes that should be selectable through ethtool:

- Asynchronous [100BASE-T only]
- Synchronous, automatic
- Synchronous, master
- Synchronous, slave

Quoted 2 lines
   | port-type = multiport   | 9.10 = 1           |
   | port-type = single-port | 9.10 = 0           |

For backward compatibility ethtool would also need to be able to report 'unknown' when the kernel or driver doesn't support this.

Ben.

Signature · 2 lines
Ben Hutchings
The most exhausting thing in life is being insincere. - Anne Morrow Lindberg