From: Maciej Machnikowski <maciej.machnikowski@intel.com>
To: maciej.machnikowski@intel.com, netdev@vger.kernel.org,
intel-wired-lan@lists.osuosl.org
Cc: richardcochran@gmail.com, abyagowi@fb.com,
anthony.l.nguyen@intel.com, davem@davemloft.net, kuba@kernel.org,
linux-kselftest@vger.kernel.org, idosch@idosch.org,
mkubecek@suse.cz, saeed@kernel.org, michael.chan@broadcom.com,
petrm@nvidia.com
Subject: [PATCH v3 net-next 6/6] docs: net: Add description of SyncE interfaces
Date: Wed, 10 Nov 2021 12:44:48 +0100 [thread overview]
Message-ID: <20211110114448.2792314-7-maciej.machnikowski@intel.com> (raw)
In-Reply-To: <20211110114448.2792314-1-maciej.machnikowski@intel.com>
Add Documentation/networking/synce.rst describing new RTNL messages
and respective NDO ops supporting SyncE (Synchronous Ethernet).
Signed-off-by: Maciej Machnikowski <maciej.machnikowski@intel.com>
---
Documentation/networking/synce.rst | 124 +++++++++++++++++++++++++++++
1 file changed, 124 insertions(+)
create mode 100644 Documentation/networking/synce.rst
diff --git a/Documentation/networking/synce.rst b/Documentation/networking/synce.rst
new file mode 100644
index 000000000000..a7bb75685c07
--- /dev/null
+++ b/Documentation/networking/synce.rst
@@ -0,0 +1,124 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+=============================
+Synchronous Equipment Clocks
+=============================
+
+Synchronous Equipment Clocks use a physical layer clock to syntonize
+the frequency across different network elements.
+
+Basic Synchronous network node consist of a Synchronous Equipment
+Clock (SEC) and and a PHY that has dedicated outputs of clocks recovered
+from the Receive side and a dedicated TX clock input that is used as
+a reference for the physical frequency of the transmit data to other nodes.
+
+The PHY is able to recover the physical signal frequency of the RX data
+stream on RX ports and redirect it (sometimes dividing it) to recovered
+clock outputs. Number of recovered clock output pins is usually lower than
+the number of RX portx. As a result the RX port to Recovered Clock output
+mapping needs to be configured. the TX frequency is directly depends on the
+input frequency - either on the PHY CLK input, or on a dedicated
+TX clock input.
+
+ ┌──────────┬──────────┐
+ │ RX │ TX │
+ 1 │ ports │ ports │ 1
+ ───►├─────┐ │ ├─────►
+ 2 │ │ │ │ 2
+ ───►├───┐ │ │ ├─────►
+ 3 │ │ │ │ │ 3
+ ───►├─┐ │ │ │ ├─────►
+ │ ▼ ▼ ▼ │ │
+ │ ────── │ │
+ │ \____/ │ │
+ └──┼──┼────┴──────────┘
+ 1│ 2│ ▲
+ RCLK out│ │ │ TX CLK in
+ ▼ ▼ │
+ ┌─────────────┴───┐
+ │ │
+ │ SEC │
+ │ │
+ └─────────────────┘
+
+The SEC can synchronize its frequency to one of the synchronization inputs
+either clocks recovered on traffic interfaces or (in advanced deployments)
+external frequency sources.
+
+Some SEC implementations can automatically select synchronization source
+through priority tables and synchronization status messaging and provide
+necessary filtering and holdover capabilities.
+
+The following interface can be applicable to diffferent packet network types
+following ITU-T G.8261/G.8262 recommendations.
+
+Interface
+=========
+
+The following RTNL messages are used to read/configure SyncE recovered
+clocks.
+
+RTM_GETRCLKSTATE
+-----------------
+Read the state of recovered pins that output recovered clock from
+a given port. The message will contain the number of assigned clocks
+(IFLA_RCLK_STATE_COUNT) and an N pin indexes in IFLA_RCLK_STATE_OUT_STATE
+To support multiple recovered clock outputs from the same port, this message
+will return the IFLA_RCLK_STATE_COUNT attribute containing the number of
+recovered clock outputs (N) and N IFLA_RCLK_STATE_OUT_STATE attributes
+listing the output indexes with the respective GET_RCLK_FLAGS_ENA flag.
+This message will call the ndo_get_rclk_range to determine the allowed
+recovered clock indexes and then will loop through them, calling
+the ndo_get_rclk_state for each of them.
+
+
+Attributes:
+IFLA_RCLK_STATE_COUNT - Returns the number of recovered clock outputs
+IFLA_RCLK_STATE_OUT_STATE - Returns the current state of a single recovered
+ clock output in the struct if_get_rclk_msg.
+struct if_get_rclk_msg {
+ __u32 out_idx; /* output index (from a valid range) */
+ __u32 flags; /* configuration flags */
+};
+
+Currently supported flags:
+#define GET_RCLK_FLAGS_ENA (1U << 0)
+
+
+RTM_SETRCLKSTATE
+-----------------
+Sets the redirection of the recovered clock for a given pin. This message
+expects one attribute:
+struct if_set_rclk_msg {
+ __u32 ifindex; /* interface index */
+ __u32 out_idx; /* output index (from a valid range) */
+ __u32 flags; /* configuration flags */
+};
+
+Supported flags are:
+SET_RCLK_FLAGS_ENA - if set in flags - the given output will be enabled,
+ if clear - the output will be disabled.
+
+RTM_GETEECSTATE
+----------------
+Reads the state of the EEC or equivalent physical clock synchronizer.
+This message returns the following attributes:
+IFLA_EEC_STATE - current state of the EEC or equivalent clock generator.
+ The states returned in this attribute are aligned to the
+ ITU-T G.781 and are:
+ IF_EEC_STATE_INVALID - state is not valid
+ IF_EEC_STATE_FREERUN - clock is free-running
+ IF_EEC_STATE_LOCKED - clock is locked to the reference,
+ but the holdover memory is not valid
+ IF_EEC_STATE_LOCKED_HO_ACQ - clock is locked to the reference
+ and holdover memory is valid
+ IF_EEC_STATE_HOLDOVER - clock is in holdover mode
+State is read from the netdev calling the:
+int (*ndo_get_eec_state)(struct net_device *dev, enum if_eec_state *state,
+ u32 *src_idx, struct netlink_ext_ack *extack);
+
+IFLA_EEC_SRC_IDX - optional attribute returning the index of the reference
+ that is used for the current IFLA_EEC_STATE, i.e.,
+ the index of the pin that the EEC is locked to.
+
+Will be returned only if the ndo_get_eec_src is implemented.
\ No newline at end of file
--
2.26.3
next prev parent reply other threads:[~2021-11-10 12:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-10 11:44 [PATCH v3 net-next 0/6] Add RTNL interface for SyncE Maciej Machnikowski
2021-11-10 11:44 ` [PATCH v3 net-next 1/6] ice: add support detecting features based on netlist Maciej Machnikowski
2021-11-10 11:44 ` [PATCH v3 net-next 2/6] rtnetlink: Add new RTM_GETEECSTATE message to get SyncE status Maciej Machnikowski
2021-11-11 16:01 ` Sabrina Dubroca
2021-11-11 16:22 ` Florian Westphal
2021-11-16 14:40 ` Machnikowski, Maciej
2021-11-16 15:41 ` Florian Westphal
2021-11-16 19:30 ` Jakub Kicinski
2021-11-16 14:37 ` Machnikowski, Maciej
2021-11-10 11:44 ` [PATCH v3 net-next 3/6] ice: add support for reading SyncE DPLL state Maciej Machnikowski
2021-11-10 11:44 ` [PATCH v3 net-next 4/6] rtnetlink: Add support for SyncE recovered clock configuration Maciej Machnikowski
2021-11-10 11:44 ` [PATCH v3 net-next 5/6] ice: add support for SyncE recovered clocks Maciej Machnikowski
2021-11-10 11:44 ` Maciej Machnikowski [this message]
2021-11-11 12:43 ` [PATCH v3 net-next 6/6] docs: net: Add description of SyncE interfaces Petr Machata
2021-11-15 10:24 ` Machnikowski, Maciej
2021-11-16 11:07 ` Petr Machata
2021-11-16 11:52 ` Petr Machata
2021-11-16 14:26 ` Machnikowski, Maciej
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211110114448.2792314-7-maciej.machnikowski@intel.com \
--to=maciej.machnikowski@intel.com \
--cc=abyagowi@fb.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=idosch@idosch.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=petrm@nvidia.com \
--cc=richardcochran@gmail.com \
--cc=saeed@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).