All of lore.kernel.org
 help / color / mirror / Atom feed
* Configuring synchronous ethernet with ethtool?
@ 2015-03-17 16:11 Richard Cochran
  2015-04-04 13:59 ` Ben Hutchings
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Cochran @ 2015-03-17 16:11 UTC (permalink / raw)
  To: netdev

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Configuring synchronous ethernet with ethtool?
  2015-03-17 16:11 Configuring synchronous ethernet with ethtool? Richard Cochran
@ 2015-04-04 13:59 ` Ben Hutchings
  2015-04-04 20:03   ` Richard Cochran
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Hutchings @ 2015-04-04 13:59 UTC (permalink / raw)
  To: Richard Cochran; +Cc: netdev

[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]

On Tue, 2015-03-17 at 17:11 +0100, Richard Cochran wrote:
> 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.
[...]
> 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.

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Configuring synchronous ethernet with ethtool?
  2015-04-04 13:59 ` Ben Hutchings
@ 2015-04-04 20:03   ` Richard Cochran
  2015-04-04 22:55     ` Ben Hutchings
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Cochran @ 2015-04-04 20:03 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: netdev

On Sat, Apr 04, 2015 at 02:59:10PM +0100, Ben Hutchings wrote:
> 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".

> 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
   

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Configuring synchronous ethernet with ethtool?
  2015-04-04 20:03   ` Richard Cochran
@ 2015-04-04 22:55     ` Ben Hutchings
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Hutchings @ 2015-04-04 22:55 UTC (permalink / raw)
  To: Richard Cochran; +Cc: netdev

[-- Attachment #1: Type: text/plain, Size: 1621 bytes --]

On Sat, 2015-04-04 at 22:03 +0200, Richard Cochran wrote:
> On Sat, Apr 04, 2015 at 02:59:10PM +0100, Ben Hutchings wrote:
> > 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".
> 
> > 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.

>    | 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

>    | 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.

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-04 22:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-17 16:11 Configuring synchronous ethernet with ethtool? Richard Cochran
2015-04-04 13:59 ` Ben Hutchings
2015-04-04 20:03   ` Richard Cochran
2015-04-04 22:55     ` Ben Hutchings

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.