diff --git a/doc/OTN/images/SAI_with_OTN_objects.png b/doc/OTN/images/SAI_with_OTN_objects.png
new file mode 100644
index 000000000..81c22299d
Binary files /dev/null and b/doc/OTN/images/SAI_with_OTN_objects.png differ
diff --git a/doc/OTN/images/otn-device-overview.png b/doc/OTN/images/otn-device-overview.png
new file mode 100644
index 000000000..a79f7eca2
Binary files /dev/null and b/doc/OTN/images/otn-device-overview.png differ
diff --git a/doc/OTN/images/sonic-otn-packet-optical-system.png b/doc/OTN/images/sonic-otn-packet-optical-system.png
new file mode 100644
index 000000000..3b59bfe6d
Binary files /dev/null and b/doc/OTN/images/sonic-otn-packet-optical-system.png differ
diff --git a/doc/OTN/images/sonic-otn-transponder-open-line-system.png b/doc/OTN/images/sonic-otn-transponder-open-line-system.png
new file mode 100644
index 000000000..66c6fc8ff
Binary files /dev/null and b/doc/OTN/images/sonic-otn-transponder-open-line-system.png differ
diff --git a/doc/OTN/sai_otn_proposal.md b/doc/OTN/sai_otn_proposal.md
new file mode 100644
index 000000000..745a37756
--- /dev/null
+++ b/doc/OTN/sai_otn_proposal.md
@@ -0,0 +1,392 @@
+# SAI for Optical Transport Network (OTN)
+
+## Authors
+
+The SONiC-OTN workgroup members: Alibaba, Microsoft, Molex, Nokia, Cisco and Accelink.
+
+### Definitions and Abbreviations
+
+
+| Abbreviation | Description |
+| ------------ | --------------------------------- |
+| OTN | Optical Transport Network |
+| DCI | Data Center Interconnect |
+| CRUD | CREATE, READ, UPDATE, and DELETE |
+| OA | Optical Amplifier |
+| OSC | Optical Supervisory Channel |
+| OLP | Optical Line Protection |
+| VOA | Optical Attenuator |
+| OTDR | Optical Time Domain Reflectometer |
+
+
+---
+
+### 1. Scope
+
+This document defines the draft technical specifications for the API in Open Compute Project Switch Abstraction Interface (SAI) used to support the management of optical components on Optical Transport Network (OTN) devices.
+
+### 2. Why SONiC for OTN
+
+OTN devices are deployed for Data Center Interconnects (DCIs), serving as the optical transport layer that connects the ports of switches and routers between geographically dispersed data centers. This enables high-speed, low-latency, and reliable optical connections across long distances.
+
+OTN devices typically run vendor-specific, proprietary Network Operating Systems (NOSs). This lack of standardization across NOS capabilities and features increases both Capital Expenditure (CapEx) and Operational Expenditure (OpEx) in large-scale DCI networks.
+
+The **SONiC for OTN project** proposes extending SONiC to support optical transport networks, enabling end-to-end deployment across both packet and optical layers.
+
+For hyperscale network users and service providers, by introducing optical support in SONiC, end-to-end network infrastructure can be managed consistently, from the IP layer (switches and routers) through the optical transport layer (OTN devices). This significantly simplifies network management tools and controllers. Furthermore, it enables a single SDN controller infrastructure across all layers and progress toward an open, converged multi-layer network management solution.
+
+For optical device vendors, existing SONiC NOS infrastructure and generic features, such as user management, security, and management network modules, can be reused. This reduces time to market, improves software quality, and lowers development costs. Joining the SONiC ecosystem also allows vendors and users to work closely through the SONiC open source community as a collaboration platform.
+
+
+
+
+
+#### 2.1 OTN device and components overview
+
+OTN devices typically employ 1RU or 2RU chassis housing multiple optical line cards, fans, power supply units (PSUs), and control modules. Most optical line cards are pluggable and support diverse functions.
+
+
+
+These optical line cards are built on a common set of optical component units that provide core transmission functionality:
+
+- **Variable Optical Attenuator (VOA)** – Adjusts optical signal power levels.
+- **Optical Amplifier (OA)** – Boosts optical signals to extend transmission distance.
+- **Optical Line Protection (OLP) Switch** – Automatically switches traffic to a backup path when a fault occurs.
+- **Optical Supervisory Channel (OSC)** – Transports management and control information.
+- **Wavelength Selective Switch (WSS)** – Dynamically routes specific wavelengths in different directions.
+- **Optical Channel Monitor (OCM)** – Analyzes the optical spectrum.
+- **Optical Time-Domain Reflectometer (OTDR)** – Measures attenuation and reflection losses along fibers.
+- **Transponders and Transceivers** – Convert electrical signals into optical signals for fiber transmission.
+
+### 3. SAI for OTN
+
+The OTN SAI definition provides the following core functions:
+
+- Creation and removal of OTN components
+- Retrieval of current operational status of OTN components
+- Notification handling for failures and hardware data reporting
+- Execution of hardware-specific operations, such as optical path switching and triggering optical measurements
+
+All OTN objects are subobjects of the switch root element and do not associate with or interact with existing non-OTN SAI objects.
+Below is the hierarchy of SAI with OTN objects:
+
+
+
+*The switch object is the root for all OTN objects. It can represent either a physical optical linecard in a multi-linecard system, or the entire optical device (vendor dependent).*
+
+#### 3.1 Experimental OTN Objects
+
+All OTN object definitions are based on OpenConfig models and are designated as experimental objects in SAI. There is no overlap or interaction between IP and OTN objects. This approach is consistent with the DASH and OCS projects and minimizes the impact of OTN changes on SONiC packet switch functionality.
+
+SAI support for OTN objects will be introduced in three phases:
+
+**Phase 1**: Initial OTN support, introducing a minimal set of new objects (OA and VOA) for the simplest optical devices.
+
+**Phase 2**: Incremental support for a complete optical line system, including OCM, OTDR, WSS, APS, and related components.
+
+**Phase 3**: Full OTN support, including transponder objects (logical channels).
+
+In Phase 1, we submitted SAI support for OA and VOA to demonstrate the evaluation and expansion methodology for OTN object support. The corresponding pull request is [PR #2217](https://github.com/opencomputeproject/SAI/pull/2217).
+
+In Phases 2 and 3, we plan to submit additional SAI OTN objects.
+
+Note:
+To minimize disruption to the SAI workgroup due to detailed OTN definitions, we propose the following process: the SONiC-OTN workgroup will first review the changes internally, after which the SAI team will review and approve them.
+
+Below is the list of OTN objects that will be added to SAI:
+
+
+| Object | Description | SAI File | OpenConfig Reference |
+| --------------- | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| OA | Optical amplifier | [saiexperimentalotnoa.h](https://github.com/sonic-otn/SAI/blob/master/experimental/saiexperimentalotnoa.h) | [openconfig-optical-amplifier.yang](https://github.com/openconfig/public/tree/master/release/models/optical-transport/openconfig-optical-amplifier.yang) |
+| VOA | Optical attenuator | [saiexperimentalotnattenuator.h](https://github.com/sonic-otn/SAI/blob/master/experimental/saiexperimentalotnattenuator.h) | [openconfig-optical-attenuator.yang](https://github.com/openconfig/public/tree/master/release/models/optical-transport/openconfig-optical-attenuator.yang) |
+| Optical Port | Optical transport port | TBD | [openconfig-transport-line-common.yang](https://github.com/openconfig/public/tree/master/release/models/optical-transport/openconfig-transport-line-common.yang) |
+| OCH | Optical channel | TBD | [openconfig-terminal-device.yang](https://github.com/openconfig/public/tree/master/release/models/optical-transport/openconfig-terminal-device.yang) |
+| WSS | Wavelength selective switch | TBD | [openconfig-wavelength-router.yang](https://github.com/openconfig/public/tree/master/release/models/optical-transport/openconfig-wavelength-router.yang) |
+| OMC | Optical media channel | TBD | [openconfig-wavelength-router.yang](https://github.com/openconfig/public/tree/master/release/models/optical-transport/openconfig-wavelength-router.yang) |
+| OSC | Optical supervisory channel | [saiexperimentalotnosc.h](https://github.com/sonic-otn/SAI/blob/master/experimental/saiexperimentalotnosc.h) | [openconfig-optical-amplifier.yang](https://github.com/openconfig/public/tree/master/release/models/optical-transport/openconfig-optical-amplifier.yang) |
+| OTDR | Optical time-domain reflectometer | TBD | Not defined yet |
+| OCM | Optical channel monitor | [saiexperimentalotnocm.h](https://github.com/sonic-otn/SAI/blob/master/experimental/saiexperimentalotnocm.h) | [openconfig-channel-monitor.yang](https://github.com/openconfig/public/tree/master/release/models/optical-transport/openconfig-channel-monitor.yang) |
+| APS | Automatic protection switch | TBD | [openconfig-transport-line-protection.yang](https://github.com/openconfig/public/tree/master/release/models/optical-transport/openconfig-transport-line-protection.yang) |
+| APS Port | Automatic protection switch port | TBD | [openconfig-transport-line-protection.yang](https://github.com/openconfig/public/tree/master/release/models/optical-transport/openconfig-transport-line-protection.yang) |
+| Logical Channel | Logical channel | TBD | [openconfig-terminal-device.yang](https://github.com/openconfig/public/tree/master/release/models/optical-transport/openconfig-terminal-device.yang) |
+
+
+---
+
+##### 3.1.1 SAI otnoa object
+
+The file `saiexperimentalotnoa.h` defines the SAI otnoa object, which represents an optical amplifier (OA). OA components amplify optical signals to increase their power and enable long-distance optical transmission.
+
+The OA object supports creation and removal of OA components, configuration of OA components, and retrieval of current operational status.
+
+**otnoa APIs**
+
+```cpp
+/**
+ * @brief Routing interface methods table retrieved with sai_api_query()
+ */
+typedef struct _sai_otn_oa_api_t
+{
+ sai_create_otn_oa_fn create_otn_oa;
+ sai_remove_otn_oa_fn remove_otn_oa;
+ sai_set_otn_oa_attribute_fn set_otn_oa_attribute;
+ sai_get_otn_oa_attribute_fn get_otn_oa_attribute;
+} sai_otn_oa_api_t;
+```
+
+**SAI otnoa object attributes**
+
+
+| SAI Object | SAI Attributes | SAI Data Type | create/get/set |
+| ---------------------- | ----------------------------------- | ------------------------------- | -------------- |
+| SAI_OBJECT_TYPE_OTN_OA | SAI_OTN_OA_ATTR_TYPE | sai_otn_oa_type_t | CREATE_AND_SET |
+| | SAI_OTN_OA_ATTR_TARGET_GAIN | sai_uint32_t | CREATE_AND_SET |
+| | SAI_OTN_OA_ATTR_MIN_GAIN | sai_uint32_t | CREATE_AND_SET |
+| | SAI_OTN_OA_ATTR_MAX_GAIN | sai_uint32_t | CREATE_AND_SET |
+| | SAI_OTN_OA_ATTR_TARGET_GAIN_TILT | sai_uint32_t | CREATE_AND_SET |
+| | SAI_OTN_OA_ATTR_GAIN_RANGE | sai_otn_oa_gain_range_t | CREATE_AND_SET |
+| | SAI_OTN_OA_ATTR_AMP_MODE | sai_otn_oa_amp_mode_t | CREATE_AND_SET |
+| | SAI_OTN_OA_ATTR_TARGET_OUTPUT_POWER | sai_int32_t | CREATE_AND_SET |
+| | SAI_OTN_OA_ATTR_MAX_OUTPUT_POWER | sai_int32_t | CREATE_AND_SET |
+| | SAI_OTN_OA_ATTR_ENABLED | bool | CREATE_AND_SET |
+| | SAI_OTN_OA_ATTR_FIBER_TYPE_PROFILE | sai_otn_oa_fiber_type_profile_t | CREATE_AND_SET |
+| | SAI_OTN_OA_ATTR_INGRESS_PORT | char | READ_ONLY |
+| | SAI_OTN_OA_ATTR_EGRESS_PORT | char | READ_ONLY |
+| | SAI_OTN_OA_ATTR_ACTUAL_GAIN | sai_int32_t | READ_ONLY |
+| | SAI_OTN_OA_ATTR_ACTUAL_GAIN_TILT | sai_int32_t | READ_ONLY |
+| | SAI_OTN_OA_ATTR_INPUT_POWER_TOTAL | sai_int32_t | READ_ONLY |
+| | SAI_OTN_OA_ATTR_INPUT_POWER_C_BAND | sai_int32_t | READ_ONLY |
+| | SAI_OTN_OA_ATTR_INPUT_POWER_L_BAND | sai_int32_t | READ_ONLY |
+| | SAI_OTN_OA_ATTR_OUTPUT_POWER_TOTAL | sai_int32_t | READ_ONLY |
+| | SAI_OTN_OA_ATTR_OUTPUT_POWER_C_BAND | sai_int32_t | READ_ONLY |
+| | SAI_OTN_OA_ATTR_OUTPUT_POWER_L_BAND | sai_int32_t | READ_ONLY |
+| | SAI_OTN_OA_ATTR_LASER_BIAS_CURRENT | sai_int32_t | READ_ONLY |
+| | SAI_OTN_OA_ATTR_OPTICAL_RETURN_LOSS | sai_int32_t | READ_ONLY |
+
+
+---
+
+##### 3.1.2 SAI otnattenuator object
+
+The file `saiexperimentalotnattenuator.h` defines the SAI otnattenuator object, which represents an optical attenuator (VOA). VOA components reduce optical signal power to maintain proper signal levels and prevent receiver saturation.
+
+The VOA object supports creation and removal of VOA components, configuration of VOA components, and retrieval of current operational status.
+
+**otnattenuator APIs**
+
+```cpp
+/**
+ * @brief Routing interface methods table retrieved with sai_api_query()
+ */
+typedef struct _sai_otn_attenuator_api_t
+{
+ sai_create_otn_attenuator_fn create_otn_attenuator;
+ sai_remove_otn_attenuator_fn remove_otn_attenuator;
+ sai_set_otn_attenuator_attribute_fn set_otn_attenuator_attribute;
+ sai_get_otn_attenuator_attribute_fn get_otn_attenuator_attribute;
+} sai_otn_attenuator_api_t;
+```
+
+**SAI otnattenuator object attributes**
+
+
+| SAI Object | SAI Attributes | SAI Data Type | create/get/set |
+| ------------------------- | ---------------------------------------------------------- | ------------------------- | -------------- |
+| SAI_OBJECT_OTN_ATTENUATOR | SAI_OTN_ATTENUATOR_ATTR_ATTENUATION_MODE | sai_otn_attenuator_mode_t | CREATE_AND_SET |
+| | SAI_OTN_ATTENUATOR_ATTR_TARGET_OUTPUT_POWER | sai_uint32_t | CREATE_AND_SET |
+| | SAI_OTN_ATTENUATOR_ATTR_ATTENUATION | sai_uint32_t | CREATE_AND_SET |
+| | SAI_OTN_ATTENUATOR_ATTR_ENABLED | sai_uint32_t | CREATE_AND_SET |
+| | SAI_OTN_ATTENUATOR_ATTR_MAX_OUTPUT_POWER | sai_int32_t | CREATE_AND_SET |
+| | SAI_OTN_ATTENUATOR_ATTR_MAX_OUTPUT_POWER_THRESHOLD | sai_int32_t | CREATE_AND_SET |
+| | SAI_OTN_ATTENUATOR_ATTR_INGRESS_PORT | char | READ_ONLY |
+| | SAI_OTN_ATTENUATOR_ATTR_EGRESS_PORT | char | READ_ONLY |
+| | SAI_OTN_ATTENUATOR_ATTR_SYSTEM_DERIVED_TARGET_OUTPUT_POWER | sai_int32_t | READ_ONLY |
+| | SAI_OTN_ATTENUATOR_ATTR_ACTUAL_ATTENUATION | sai_int32_t | READ_ONLY |
+| | SAI_OTN_ATTENUATOR_ATTR_OUTPUT_POWER_TOTAL | sai_int32_t | READ_ONLY |
+| | SAI_OTN_ATTENUATOR_ATTR_OPTICAL_RETURN_LOSS | sai_int32_t | READ_ONLY |
+
+
+---
+
+#### 3.2 New Tags in SAI OTN Objects
+
+**Precision Tag**
+Many OTN objects include floating-point values (e.g., optical power, attenuation, Pre-FEC BER). These values require different levels of precision — optical power may need two decimal places, while Pre-FEC BER may require up to 18.
+
+Currently, SAI supports only `uint64_t` statistics, without float support. To enable floats without breaking compatibility, we propose introducing the `@precision` tag, allowing attributes and statistics to specify required precision. Here are examples:
+
+```
+ /**
+ * @brief Positive gain applied by the amplifier in units of 0.01dB.
+ * This is used when the amp-mode is in CONSTANT_GAIN or DYNAMIC_GAIN
+ * mode to set the target gain that the amplifier should achieve.
+ *
+ * @type sai_uint32_t
+ * @flags CREATE_AND_SET
+ * @default 2000
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_TARGET_GAIN,
+```
+
+In the SAI metadata, the `valueprecision` field in `attrInfo` is used to represent the precision.
+
+#### 3.3 SAI OTN Notification
+
+SONiC has a notification mechanism supporting notifications from Vendor SAI (driver) to SWSS. Currently the notification is only supported by the root SAI object (switch), in which all notification callback attributes and prototypes are defined in `saiswitch.h`.
+
+In order to separate OTN notification code from the existing switch code, a notification attribute for OTN is declared in SAI extension `saiswitchextensions.h`.
+
+```c
+
+/**
+ * @brief OTN alarm event notification
+ *
+ * @count data[count]
+ *
+ * @param[in] count Number of notifications
+ * @param[in] data Array of OTN alarm events
+ */
+typedef void (*sai_otn_alarm_event_notification_fn)(
+ _In_ uint32_t count,
+ _In_ const sai_otn_alarm_event_data_t *data);
+
+/**
+ * @brief SAI switch attribute extensions.
+ *
+ * @flags free
+ */
+typedef enum _sai_switch_attr_extensions_t
+{
+ ....
+ /**
+ * @brief OTN alarm event notification callback function passed to the adapter.
+ *
+ * Use sai_otn_alarm_event_notification_fn as notification function.
+ *
+ * @type sai_pointer_t sai_otn_alarm_event_notification_fn
+ * @flags CREATE_AND_SET
+ * @default NULL
+ */
+ SAI_SWITCH_ATTR_OTN_ALARM_EVENT_NOTIFY,
+
+ SAI_SWITCH_ATTR_EXTENSIONS_RANGE_END
+
+} sai_switch_attr_extensions_t;
+
+```
+
+### 4. How to Manage OTN objects in Syncd
+
+Syncd provides a bridging function between the common control module SWSS and the vendor-specific SAI driver/SDK. It is mostly transparent to the business logic.
+
+**Code physical separation**
+
+`FlexCounter` manages configuration of Counter DB for SAI object monitoring. Separate `FlexCounterOtn` files are created for managing OTN SAI object attributes in Counter DB. This reduces code-change contention between the OTN project and the rest of SONiC development.
+
+```Diff
+ --- syncd
+ |--- FlexCounter.(h|cpp)
++ |--- FlexCounterOtn.(h|cpp)
+```
+
+Similarly, SAI object (de)serialization is also implemented in separate files `meta/sai_serialize_otn` from the main file `sai-serialize`.
+
+**Runtime logical flow isolation**
+
+Processing for OTN SAI objects and APIs is added to the existing Syncd infrastructure with clear isolation from existing logic. This is done by placing OTN object processing at the end of current logic so that OTN logic is not in the packet-switching code path. The following snippet shows adding the counter plugin for OTN:
+
+```Diff
+FlexCounter.cpp
+
+void FlexCounter::addCounter {
+ ...
+ else
+ {
++ if (m_flexCounterOtn->addCounter(vid, rid, objectType, field, idStrings))
++ {
++ continue;
++ }
+
+ SWSS_LOG_ERROR("Object type and field combination is not supported, object type %s, field %s",
+ sai_serialize_object_type(objectType).c_str(),
+ field.c_str());
+ }
+ }
+
+//same changes for the following functions
+void FlexCounter::addCounterPlugin {}
+void FlexCounter::removeCounter {}
+
+```
+
+### 5. How to manage OTN objects in SWSS
+
+The same design of Syncd is adopted to reuse SWSS infrastructure while keeping the OTN objects relatively isolated from existing packet switching objects.
+
+**Code physical separation**
+
+For the ConfigMgr module, which listens for Config DB changes, a separate daemon is created to process OTN device configuration changes. Upon any change to OTN tables in Config DB, OTN ConfigMgr updates APP DB with the new configuration accordingly.
+
+```Diff
+ --- cfgmgr
+ |--- intfmgr.(h|cpp)
+ |--- intfmgrd.cpp
+ |--- ....
++ |--- otnmgr.(h|cpp)
++ |--- otnmgrd.cpp
+```
+
+For orchagent, which processes changes in APP DB, a separate folder is created to hold the code for processing OTN objects in APP DB.
+
+```Diff
+ --- orchagent
+ |--- switch
+ |--- ....
+ |--- dash
++ |--- otn
++ |--- objectorch.(h|cpp) - generic for all objects
++ |--- attenuatorch.(h|cpp)
++ |--- oaorch.(h|cpp)
++ |--- ocmorch.(h|cpp)
++ |--- ....
++ |--- otnorchdaemon.(h|cpp)
+```
+
+**Runtime logical flow isolation**
+
+In orchagent `main.cpp`, a new switch type for OTN is used to decide which orchagent daemon should be launched. Switch type is configured in the DEVICE_METADATA table.
+
+```Diff
+ shared_ptr orchDaemon;
++ if(gMySwitchType == SWITCH_TYPE_OTN)
++ {
++ orchDaemon = make_shared(&appl_db, &config_db, &state_db, chassis_app_db.get(), zmq_server.get());
++ }
+ else if (gMySwitchType != "fabric")
+ {
+ orchDaemon = make_shared(&appl_db, &config_db, &state_db, chassis_app_db.get(), zmq_server.get());
+ if (gMySwitchType == "voq")
+ {
+ orchDaemon->setFabricEnabled(true);
+ orchDaemon->setFabricPortStatEnabled(true);
+ orchDaemon->setFabricQueueStatEnabled(false);
+ }
+ }
+ else
+ {
+ orchDaemon = make_shared(&appl_db, &config_db, &state_db, chassis_app_db.get(), zmq_server.get());
+ }
+
+```
+
+### 6. Summary
+
+Value proposition of SONiC OTN support:
+
+- A unified open source NOS for packet switches and optical devices in hyper-scale networks, enabling a consistent multi-layer (L0–L4) network orchestration solution.
+- Optical vendors can leverage the SONiC OTN common codebase and community resources for optical NOS evolution.
+- Increased SONiC community influence in the optical networking domain.
+
+The design objective is to reuse existing infrastructure and features while keeping OTN changes isolated, with no regression on packet switches.
\ No newline at end of file
diff --git a/experimental/saiexperimentalotnattenuator.h b/experimental/saiexperimentalotnattenuator.h
new file mode 100644
index 000000000..32d6d1300
--- /dev/null
+++ b/experimental/saiexperimentalotnattenuator.h
@@ -0,0 +1,270 @@
+/**
+ * Copyright (c) 2014 Microsoft Open Technologies, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License. You may obtain
+ * a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
+ * LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS
+ * FOR A PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT.
+ *
+ * See the Apache Version 2.0 License for specific language governing
+ * permissions and limitations under the License.
+ *
+ * Microsoft would like to thank the following companies for their review and
+ * assistance with these files: Intel Corporation, Mellanox Technologies Ltd,
+ * Dell Products, L.P., Facebook, Inc., Marvell International Ltd.
+ *
+ * @file saiexperimentalotnattenuator.h
+ *
+ * @brief This module defines SAI extensions for optical attenuator.
+ * It is derived from openconfig-optical-attenuator.yang, revision 2024-07-10.
+ *
+ * @warning This module is a SAI experimental module
+ */
+
+#if !defined (__SAIEXPERIMENTALOTNATTENUATOR_H_)
+#define __SAIEXPERIMENTALOTNATTENUATOR_H_
+
+#include
+
+/**
+ * @defgroup SAIEXPERIMENTALOTNATTENUATOR SAI - Experimental: Attenuator specific API definitions
+ *
+ * @{
+ */
+
+/**
+ * @brief Type definition for different types of optical attenuator operating modes
+ */
+typedef enum _sai_otn_attenuator_mode_t
+{
+ SAI_OTN_ATTENUATOR_MODE_CONSTANT_POWER,
+ SAI_OTN_ATTENUATOR_MODE_CONSTANT_ATTENUATION,
+ SAI_OTN_ATTENUATOR_MODE_SYSTEM_CONTROLLED,
+} sai_otn_attenuator_mode_t;
+
+/**
+ * @brief Attenuator attribute IDs
+ */
+typedef enum _sai_otn_attenuator_attr_t
+{
+ /**
+ * @brief Start of attributes.
+ */
+ SAI_OTN_ATTENUATOR_ATTR_START,
+
+ /**
+ * @brief User-defined name assigned to identify a specific attenuator in the device.
+ *
+ * @type char
+ * @flags MANDATORY_ON_CREATE | CREATE_ONLY
+ */
+ SAI_OTN_ATTENUATOR_ATTR_NAME = SAI_OTN_ATTENUATOR_ATTR_START,
+
+ /**
+ * @brief The operating mode of the attenuator.
+ *
+ * @type sai_otn_attenuator_mode_t
+ * @flags CREATE_AND_SET
+ * @default SAI_OTN_ATTENUATOR_MODE_CONSTANT_ATTENUATION
+ */
+ SAI_OTN_ATTENUATOR_ATTR_ATTENUATION_MODE,
+
+ /**
+ * @brief Power level set on the output of attenuator in units of 0.01dBm.
+ * This leaf is only relevant when in CONSTANT_POWER mode.
+ *
+ * @type sai_int32_t
+ * @flags CREATE_AND_SET
+ * @default 0
+ * @precision 2
+ */
+ SAI_OTN_ATTENUATOR_ATTR_TARGET_OUTPUT_POWER,
+
+ /**
+ * @brief Attenuation applied by the attenuator in units of 0.01dB.
+ * This leaf is only relevant when in CONSTANT_ATTENUATION mode.
+ *
+ * @type sai_uint32_t
+ * @flags CREATE_AND_SET
+ * @default 500
+ * @precision 2
+ */
+ SAI_OTN_ATTENUATOR_ATTR_ATTENUATION,
+
+ /**
+ * @brief When true, attenuator is set to specified attenuation or varies to
+ * maintain constant output power. When false, the attenuator is set
+ * max attenuation or blocked.
+ *
+ * @type bool
+ * @flags CREATE_AND_SET
+ * @default true
+ */
+ SAI_OTN_ATTENUATOR_ATTR_ENABLED,
+
+ /**
+ * @brief The max power level allowed on the output of attenuator in units of 0.01dBm.
+ * This leaf is optional when in SYSTEM_CONTROLLED mode.
+ *
+ * @type sai_int32_t
+ * @flags CREATE_AND_SET
+ * @default 0
+ * @precision 2
+ */
+ SAI_OTN_ATTENUATOR_ATTR_MAX_OUTPUT_POWER,
+
+ /**
+ * @brief A device alarm will be raised within /system/alarms when
+ * system-derived-target-output-power >= max-output-power + max-output-power-threshold.
+ * This leaf is only relevant when in SYSTEM_CONTROLLED mode.
+ *
+ * @type sai_int32_t
+ * @flags CREATE_AND_SET
+ * @default 300
+ * @precision 2
+ */
+ SAI_OTN_ATTENUATOR_ATTR_MAX_OUTPUT_POWER_THRESHOLD,
+
+ /**
+ * @brief Reference to system-supplied name of the attenuator ingress port.
+ * This leaf is only valid for ports of type INGRESS.
+ *
+ * @type char
+ * @flags READ_ONLY
+ */
+ SAI_OTN_ATTENUATOR_ATTR_INGRESS_PORT,
+
+ /**
+ * @brief Reference to system-supplied name of the attenuator egress port.
+ * This leaf is only valid for ports of type EGRESS.
+ *
+ * @type char
+ * @flags READ_ONLY
+ */
+ SAI_OTN_ATTENUATOR_ATTR_EGRESS_PORT,
+
+ /**
+ * @brief The target output power as determined by the device in units of 0.01dBm.
+ * This leaf is only relevant when in SYSTEM_CONTROLLED mode.
+ *
+ * @type sai_int32_t
+ * @flags READ_ONLY
+ * @precision 2
+ */
+ SAI_OTN_ATTENUATOR_ATTR_SYSTEM_DERIVED_TARGET_OUTPUT_POWER,
+
+ /**
+ * @brief The actual attenuation applied by the attenuator in units of 0.01dB.
+ *
+ * @type sai_int32_t
+ * @flags READ_ONLY
+ * @precision 2
+ */
+ SAI_OTN_ATTENUATOR_ATTR_ACTUAL_ATTENUATION,
+
+ /**
+ * @brief The total output optical power of this port in units of 0.01dBm.
+ *
+ * @type sai_int32_t
+ * @flags READ_ONLY
+ * @precision 2
+ */
+ SAI_OTN_ATTENUATOR_ATTR_OUTPUT_POWER_TOTAL,
+
+ /**
+ * @brief The optical return loss (ORL) is the ratio of the light
+ * reflected back into the port to the light launched out of the port.
+ * ORL is in units of 0.01dB.
+ *
+ * @type sai_int32_t
+ * @flags READ_ONLY
+ * @precision 2
+ */
+ SAI_OTN_ATTENUATOR_ATTR_OPTICAL_RETURN_LOSS,
+
+ /**
+ * @brief End of attributes
+ */
+ SAI_OTN_ATTENUATOR_ATTR_END,
+
+ /** Custom range base value */
+ SAI_OTN_ATTENUATOR_ATTR_CUSTOM_RANGE_START = 0x10000000,
+
+ /** End of custom range base */
+ SAI_OTN_ATTENUATOR_ATTR_CUSTOM_RANGE_END
+
+} sai_otn_attenuator_attr_t;
+
+/**
+ * @brief Create attenuator.
+ *
+ * Allocates and initializes an attenuator.
+ *
+ * @param[out] otn_attenuator_id Attenuator id
+ * @param[in] switch_id Switch id on which the attenuator exists
+ * @param[in] attr_count Number of attributes
+ * @param[in] attr_list Array of attributes
+ *
+ * @return #SAI_STATUS_SUCCESS on success, failure status code on error
+ */
+typedef sai_status_t (*sai_create_otn_attenuator_fn)(
+ _Out_ sai_object_id_t *otn_attenuator_id,
+ _In_ sai_object_id_t switch_id,
+ _In_ uint32_t attr_count,
+ _In_ const sai_attribute_t *attr_list);
+
+/**
+ * @brief Remove attenuator
+ *
+ * @param[in] otn_attenuator_id Attenuator id
+ *
+ * @return #SAI_STATUS_SUCCESS on success, failure status code on error
+ */
+typedef sai_status_t (*sai_remove_otn_attenuator_fn)(
+ _In_ sai_object_id_t otn_attenuator_id);
+
+/**
+ * @brief Set attenuator attribute
+ *
+ * @param[in] otn_attenuator_id Attenuator id
+ * @param[in] attr Attribute
+ *
+ * @return #SAI_STATUS_SUCCESS on success, failure status code on error
+ */
+typedef sai_status_t (*sai_set_otn_attenuator_attribute_fn)(
+ _In_ sai_object_id_t otn_attenuator_id,
+ _In_ const sai_attribute_t *attr);
+
+/**
+ * @brief Get attenuator attribute
+ *
+ * @param[in] otn_attenuator_id Attenuator id
+ * @param[in] attr_count Number of attributes
+ * @param[inout] attr_list Array of attributes
+ *
+ * @return #SAI_STATUS_SUCCESS on success, failure status code on error
+ */
+typedef sai_status_t (*sai_get_otn_attenuator_attribute_fn)(
+ _In_ sai_object_id_t otn_attenuator_id,
+ _In_ uint32_t attr_count,
+ _Inout_ sai_attribute_t *attr_list);
+
+/**
+ * @brief Routing interface methods table retrieved with sai_api_query()
+ */
+typedef struct _sai_otn_attenuator_api_t
+{
+ sai_create_otn_attenuator_fn create_otn_attenuator;
+ sai_remove_otn_attenuator_fn remove_otn_attenuator;
+ sai_set_otn_attenuator_attribute_fn set_otn_attenuator_attribute;
+ sai_get_otn_attenuator_attribute_fn get_otn_attenuator_attribute;
+} sai_otn_attenuator_api_t;
+
+/**
+ * @}
+ */
+#endif /** __SAIEXPERIMENTALOTNATTENUATOR_H_ */
diff --git a/experimental/saiexperimentalotnoa.h b/experimental/saiexperimentalotnoa.h
new file mode 100644
index 000000000..1cec8586b
--- /dev/null
+++ b/experimental/saiexperimentalotnoa.h
@@ -0,0 +1,406 @@
+/**
+ * Copyright (c) 2014 Microsoft Open Technologies, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License. You may obtain
+ * a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
+ * LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS
+ * FOR A PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT.
+ *
+ * See the Apache Version 2.0 License for specific language governing
+ * permissions and limitations under the License.
+ *
+ * Microsoft would like to thank the following companies for their review and
+ * assistance with these files: Intel Corporation, Mellanox Technologies Ltd,
+ * Dell Products, L.P., Facebook, Inc., Marvell International Ltd.
+ *
+ * @file saiexperimentalotnoa.h
+ *
+ * @brief This module defines SAI extensions for optical amplifier (OA).
+ * It is derived from openconfig-optical-amplifier.yang, revision 2019-12-06.
+ *
+ * @warning This module is a SAI experimental module
+ */
+
+#if !defined (__SAIEXPERIMENTALOTNOA_H_)
+#define __SAIEXPERIMENTALOTNOA_H_
+
+#include
+
+/**
+ * @defgroup SAIEXPERIMENTALOTNOA SAI - Experimental: OA specific API definitions
+ *
+ * @{
+ */
+
+/** @brief OA type */
+typedef enum _sai_otn_oa_type_t
+{
+ SAI_OTN_OA_TYPE_EDFA,
+ SAI_OTN_OA_TYPE_FORWARD_RAMAN,
+ SAI_OTN_OA_TYPE_BACKWARD_RAMAN,
+ SAI_OTN_OA_TYPE_HYBRID,
+} sai_otn_oa_type_t;
+
+/** @brief OA gain range */
+typedef enum _sai_otn_oa_gain_range_t
+{
+ SAI_OTN_OA_GAIN_RANGE_LOW_GAIN_RANGE,
+ SAI_OTN_OA_GAIN_RANGE_MID_GAIN_RANGE,
+ SAI_OTN_OA_GAIN_RANGE_HIGH_GAIN_RANGE,
+ SAI_OTN_OA_GAIN_RANGE_FIXED_GAIN_RANGE,
+} sai_otn_oa_gain_range_t;
+
+/** @brief OA amp mode */
+typedef enum _sai_otn_oa_amp_mode_t
+{
+ SAI_OTN_OA_AMP_MODE_CONSTANT_POWER,
+ SAI_OTN_OA_AMP_MODE_CONSTANT_GAIN,
+ SAI_OTN_OA_AMP_MODE_DYNAMIC_GAIN,
+} sai_otn_oa_amp_mode_t;
+
+/** @brief OA fiber type profile */
+typedef enum _sai_otn_oa_fiber_type_profile_t
+{
+ SAI_OTN_OA_FIBER_TYPE_PROFILE_DSF,
+ SAI_OTN_OA_FIBER_TYPE_PROFILE_LEAF,
+ SAI_OTN_OA_FIBER_TYPE_PROFILE_SSMF,
+ SAI_OTN_OA_FIBER_TYPE_PROFILE_TWC,
+ SAI_OTN_OA_FIBER_TYPE_PROFILE_TWRS,
+} sai_otn_oa_fiber_type_profile_t;
+
+/**
+ * @brief OA attribute IDs
+ */
+typedef enum _sai_otn_oa_attr_t
+{
+ /**
+ * @brief Start of attributes
+ */
+ SAI_OTN_OA_ATTR_START,
+
+ /**
+ * @brief User-defined name assigned to identify a specific amplifier in the device.
+ *
+ * @type char
+ * @flags MANDATORY_ON_CREATE | CREATE_ONLY
+ */
+ SAI_OTN_OA_ATTR_NAME = SAI_OTN_OA_ATTR_START,
+
+ /**
+ * @brief Type of the amplifier.
+ *
+ * @type sai_otn_oa_type_t
+ * @flags CREATE_AND_SET
+ * @default SAI_OTN_OA_TYPE_EDFA
+ */
+ SAI_OTN_OA_ATTR_TYPE,
+
+ /**
+ * @brief Positive gain applied by the amplifier in units of 0.01dB.
+ * This is used when the amp-mode is in CONSTANT_GAIN or DYNAMIC_GAIN
+ * mode to set the target gain that the amplifier should achieve.
+ *
+ * @type sai_uint32_t
+ * @flags CREATE_AND_SET
+ * @default 2000
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_TARGET_GAIN,
+
+ /**
+ * @brief The minimum allowed gain of the amplifier in units of 0.01dB.
+ * This is used when the amp-mode is in CONSTANT_POWER or DYNAMIC_GAIN mode
+ * to prevent the gain from dropping below a desired threshold.
+ *
+ * @type sai_uint32_t
+ * @flags CREATE_AND_SET
+ * @default 500
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_MIN_GAIN,
+
+ /**
+ * @brief The maximum allowed gain of the amplifier in units of 0.01dB.
+ * This is used when the amp-mode is in CONSTANT_POWER or DYNAMIC_GAIN mode
+ * to prevent the gain from exceeding a desired threshold.
+ *
+ * @type sai_uint32_t
+ * @flags CREATE_AND_SET
+ * @default 3500
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_MAX_GAIN,
+
+ /**
+ * @brief Gain tilt control in units of 0.01dB.
+ *
+ * @type sai_int32_t
+ * @flags CREATE_AND_SET
+ * @default 0
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_TARGET_GAIN_TILT,
+
+ /**
+ * @brief Selected gain range. The gain range is a platform-defined
+ * value indicating the switched gain amplifier setting.
+ *
+ * @type sai_otn_oa_gain_range_t
+ * @flags CREATE_AND_SET
+ * @default SAI_OTN_OA_GAIN_RANGE_LOW_GAIN_RANGE
+ */
+ SAI_OTN_OA_ATTR_GAIN_RANGE,
+
+ /**
+ * @brief The operating mode of the amplifier.
+ *
+ * @type sai_otn_oa_amp_mode_t
+ * @flags CREATE_AND_SET
+ * @default SAI_OTN_OA_AMP_MODE_CONSTANT_GAIN
+ */
+ SAI_OTN_OA_ATTR_AMP_MODE,
+
+ /**
+ * @brief Output optical power of the amplifier in units of 0.01dBm.
+ *
+ * @type sai_int32_t
+ * @flags CREATE_AND_SET
+ * @default 800
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_TARGET_OUTPUT_POWER,
+
+ /**
+ * @brief The maximum optical output power of the amplifier in units of 0.01dBm.
+ * This may be used to prevent the output power from exceeding a desired threshold.
+ *
+ * @type sai_int32_t
+ * @flags CREATE_AND_SET
+ * @default 2500
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_MAX_OUTPUT_POWER,
+
+ /**
+ * @brief Turns power on / off to the amplifiers gain module.
+ *
+ * @type bool
+ * @flags CREATE_AND_SET
+ * @default false
+ */
+ SAI_OTN_OA_ATTR_ENABLED,
+
+ /**
+ * @brief The fiber type profile specifies details about the
+ * fiber type which are needed to accurately determine
+ * the gain and perform efficient amplification. This is
+ * only needed for Raman type amplifiers.
+ *
+ * @type sai_otn_oa_fiber_type_profile_t
+ * @flags CREATE_AND_SET
+ * @default SAI_OTN_OA_FIBER_TYPE_PROFILE_SSMF
+ */
+ SAI_OTN_OA_ATTR_FIBER_TYPE_PROFILE,
+
+ /**
+ * @brief Reference to system-supplied name of the amplifier ingress port.
+ * This leaf is only valid for ports of type INGRESS.
+ *
+ * @type char
+ * @flags READ_ONLY
+ */
+ SAI_OTN_OA_ATTR_INGRESS_PORT,
+
+ /**
+ * @brief Reference to system-supplied name of the amplifier egress port.
+ * This leaf is only valid for ports of type EGRESS.
+ *
+ * @type char
+ * @flags READ_ONLY
+ */
+ SAI_OTN_OA_ATTR_EGRESS_PORT,
+
+ /**
+ * @brief The actual gain applied by the amplifier in units of 0.01dB.
+ *
+ * @type sai_int32_t
+ * @flags READ_ONLY
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_ACTUAL_GAIN,
+
+ /**
+ * @brief The actual tilt applied by the amplifier in units of 0.01dB.
+ *
+ * @type sai_int32_t
+ * @flags READ_ONLY
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_ACTUAL_GAIN_TILT,
+
+ /**
+ * @brief The total input optical power of this port in units of 0.01dBm.
+ *
+ * @type sai_int32_t
+ * @flags READ_ONLY
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_INPUT_POWER_TOTAL,
+
+ /**
+ * @brief The C band (consisting of approximately 191 to 195 THz or
+ * 1530nm to 1565 nm) input optical power of this port in units of 0.01dBm.
+ *
+ * @type sai_int32_t
+ * @flags READ_ONLY
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_INPUT_POWER_C_BAND,
+
+ /**
+ * @brief The L band (consisting of approximately 184 to 191 THz or
+ * 1565 to 1625 nm) input optical power of this port in units of 0.01dBm.
+ *
+ * @type sai_int32_t
+ * @flags READ_ONLY
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_INPUT_POWER_L_BAND,
+
+ /**
+ * @brief The total output optical power of this port in units of 0.01dBm.
+ *
+ * @type sai_int32_t
+ * @flags READ_ONLY
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_OUTPUT_POWER_TOTAL,
+
+ /**
+ * @brief The C band (consisting of approximately 191 to 195 THz or
+ * 1530nm to 1565 nm)output optical power of this port in units of 0.01dBm.
+ *
+ * @type sai_int32_t
+ * @flags READ_ONLY
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_OUTPUT_POWER_C_BAND,
+
+ /**
+ * @brief The L band (consisting of approximately 184 to 191 THz or
+ * 1565 to 1625 nm)output optical power of this port in units of 0.01dBm.
+ *
+ * @type sai_int32_t
+ * @flags READ_ONLY
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_OUTPUT_POWER_L_BAND,
+
+ /**
+ * @brief The current applied by the system to the transmit laser to
+ * achieve the output power. The current is expressed in mA
+ * with up to two decimal precision.
+ *
+ * @type sai_int32_t
+ * @flags READ_ONLY
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_LASER_BIAS_CURRENT,
+
+ /**
+ * @brief The optical return loss (ORL) is the ratio of the light
+ * reflected back into the port to the light launched out of the port.
+ * ORL is in units of 0.01dB.
+ *
+ * @type sai_int32_t
+ * @flags READ_ONLY
+ * @precision 2
+ */
+ SAI_OTN_OA_ATTR_OPTICAL_RETURN_LOSS,
+
+ /**
+ * @brief End of attributes
+ */
+ SAI_OTN_OA_ATTR_END,
+
+ /** Custom range base value */
+ SAI_OTN_OA_ATTR_CUSTOM_RANGE_START = 0x10000000,
+
+ /** End of custom range base */
+ SAI_OTN_OA_ATTR_CUSTOM_RANGE_END
+
+} sai_otn_oa_attr_t;
+
+/**
+ * @brief Create OA.
+ *
+ * Allocates and initializes an OA.
+ *
+ * @param[out] otn_oa_id OA id
+ * @param[in] switch_id Switch id on which the OA exists
+ * @param[in] attr_count Number of attributes
+ * @param[in] attr_list Array of attributes
+ *
+ * @return #SAI_STATUS_SUCCESS on success, failure status code on error
+ */
+typedef sai_status_t (*sai_create_otn_oa_fn)(
+ _Out_ sai_object_id_t *otn_oa_id,
+ _In_ sai_object_id_t switch_id,
+ _In_ uint32_t attr_count,
+ _In_ const sai_attribute_t *attr_list);
+
+/**
+ * @brief Remove OA
+ *
+ * @param[in] otn_oa_id OA id
+ *
+ * @return #SAI_STATUS_SUCCESS on success, failure status code on error
+ */
+typedef sai_status_t (*sai_remove_otn_oa_fn)(
+ _In_ sai_object_id_t otn_oa_id);
+
+/**
+ * @brief Set OA attribute
+ *
+ * @param[in] otn_oa_id OA id
+ * @param[in] attr Attribute
+ *
+ * @return #SAI_STATUS_SUCCESS on success, failure status code on error
+ */
+typedef sai_status_t (*sai_set_otn_oa_attribute_fn)(
+ _In_ sai_object_id_t otn_oa_id,
+ _In_ const sai_attribute_t *attr);
+
+/**
+ * @brief Get OA attribute
+ *
+ * @param[in] otn_oa_id OA id
+ * @param[in] attr_count Number of attributes
+ * @param[inout] attr_list Array of attributes
+ *
+ * @return #SAI_STATUS_SUCCESS on success, failure status code on error
+ */
+typedef sai_status_t (*sai_get_otn_oa_attribute_fn)(
+ _In_ sai_object_id_t otn_oa_id,
+ _In_ uint32_t attr_count,
+ _Inout_ sai_attribute_t *attr_list);
+
+/**
+ * @brief Routing interface methods table retrieved with sai_api_query()
+ */
+typedef struct _sai_otn_oa_api_t
+{
+ sai_create_otn_oa_fn create_otn_oa;
+ sai_remove_otn_oa_fn remove_otn_oa;
+ sai_set_otn_oa_attribute_fn set_otn_oa_attribute;
+ sai_get_otn_oa_attribute_fn get_otn_oa_attribute;
+} sai_otn_oa_api_t;
+
+/**
+ * @}
+ */
+#endif /** __SAIEXPERIMENTALOTNOA_H_ */
diff --git a/experimental/saiextensions.h b/experimental/saiextensions.h
index f43ee480a..7d4e5e7cc 100644
--- a/experimental/saiextensions.h
+++ b/experimental/saiextensions.h
@@ -52,6 +52,10 @@
#include "saiexperimentaldashacl.h"
#include "saiexperimentalbmtor.h"
+/* OTN Extensions */
+#include "saiexperimentalotnattenuator.h"
+#include "saiexperimentalotnoa.h"
+
/**
* @brief Extensions to SAI APIs
*
@@ -95,6 +99,13 @@ typedef enum _sai_api_extensions_t
SAI_API_DASH_TRUSTED_VNI,
+ /**
+ * @brief OTN Extensions
+ */
+ SAI_API_OTN_ATTENUATOR,
+
+ SAI_API_OTN_OA,
+
/* Add new experimental APIs above this line */
SAI_API_EXTENSIONS_RANGE_END
diff --git a/experimental/saitypesextensions.h b/experimental/saitypesextensions.h
index f5b5d17ca..1e0af7002 100644
--- a/experimental/saitypesextensions.h
+++ b/experimental/saitypesextensions.h
@@ -100,6 +100,13 @@ typedef enum _sai_object_type_extensions_t
SAI_OBJECT_TYPE_ENI_TRUSTED_VNI_ENTRY,
+ /**
+ * @brief OTN Extensions
+ */
+ SAI_OBJECT_TYPE_OTN_ATTENUATOR,
+
+ SAI_OBJECT_TYPE_OTN_OA,
+
/* Add new experimental object types above this line */
SAI_OBJECT_TYPE_EXTENSIONS_RANGE_END
diff --git a/meta/Doxyfile b/meta/Doxyfile
index 4900fd924..b6df5eeb0 100644
--- a/meta/Doxyfile
+++ b/meta/Doxyfile
@@ -236,6 +236,7 @@ ALIASES += "suffix =@par Serialize suffix:^^ @xmlon
ALIASES += "isresourcetype =@par IsResourceType:^^ @xmlonly @@isresourcetype @endxmlonly"
ALIASES += "relaxed =@par Condition Relaxed:^^ @xmlonly @@relaxed @endxmlonly"
ALIASES += "deprecated =@par Deprecated:^^ @xmlonly @@deprecated @endxmlonly"
+ALIASES += "precision =@par Value Precision:^^ @xmlonly @@precision @endxmlonly"
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
diff --git a/meta/Doxyfile.compat b/meta/Doxyfile.compat
index c7fe0c7a7..9b9ab6287 100644
--- a/meta/Doxyfile.compat
+++ b/meta/Doxyfile.compat
@@ -236,6 +236,7 @@ ALIASES += "suffix =@par Serialize suffix:\n @xmlon
ALIASES += "isresourcetype =@par IsResourceType:\n @xmlonly @@isresourcetype @endxmlonly"
ALIASES += "relaxed =@par Condition Relaxed:\n @xmlonly @@relaxed @endxmlonly"
ALIASES += "deprecated =@par Deprecated:\n @xmlonly @@deprecated @endxmlonly"
+ALIASES += "precision =@par Value Precision:\n @xmlonly @@precision @endxmlonly"
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
diff --git a/meta/acronyms.txt b/meta/acronyms.txt
index 8dee66e90..984a60357 100644
--- a/meta/acronyms.txt
+++ b/meta/acronyms.txt
@@ -112,7 +112,10 @@ NRZ - Non Return to Zero
NTPCLIENT - Network Time Protocol Client
NTPSERVER - Network Time Protocol Server
NVGRE - Network Virtualization using Generic Routing Encapsulation
+OA - Optical Amplifier
OAM - Operations Administration and Maintenance
+ORL - Optical Return Loss
+OTN - Optical Transport Network
OUI - Organizationally Unique Identifier
P4RT - Programming Protocol-independent Packet Processors Runtime
PAM4 - Pulse Amplitude Modulation 4-level
diff --git a/meta/aspell.en.pws b/meta/aspell.en.pws
index 452858916..0819cdeee 100644
--- a/meta/aspell.en.pws
+++ b/meta/aspell.en.pws
@@ -9,6 +9,8 @@ api
APIs
Args
armhf
+attenuator
+Attenuator
attr
attrid
attrs
@@ -30,6 +32,7 @@ couldn
cpp
cpu
CtlOS
+dBm
debounce
decap
decapsulation
@@ -105,6 +108,7 @@ loopback
Loopback
lossless
lu
+mA
MACsec
maincursor
Marvell
@@ -133,6 +137,7 @@ netlink
nexthop
nexthopgroup
nextrelease
+nm
NPUs
NRZ
objlist
@@ -142,6 +147,7 @@ OID
OIDs
ok
opcode
+openconfig
optimizations
outsegment
param
@@ -159,6 +165,7 @@ psec
PVID
qos
quantization
+Raman
reachability
routable
runtime
@@ -193,6 +200,7 @@ SysFS
syslog
timespec
timestamp
+THz
TLV
TODO
tx
diff --git a/meta/parse.pl b/meta/parse.pl
index 86c92a512..8fd3c1e57 100755
--- a/meta/parse.pl
+++ b/meta/parse.pl
@@ -96,6 +96,7 @@
"relaxed" , \&ProcessTagRelaxed,
"isresourcetype" , \&ProcessTagIsRecourceType,
"deprecated" , \&ProcessTagDeprecated,
+ "precision" , \&ProcessTagPrecision,
);
my %options = ();
@@ -422,6 +423,18 @@ sub ProcessTagDeprecated
return undef;
}
+sub ProcessTagPrecision
+{
+ my ($precision, $value, $val) = @_;
+
+ # allow only integers >= 0
+ return $val if $val =~ /^\d+$/;
+
+ LogError "precision tag value '$val', expected an integer >= 0";
+
+ return undef;
+}
+
sub ProcessTagRange
{
my ($type, $attrName, $value) = @_;
@@ -514,7 +527,7 @@ sub ProcessDescription
return if scalar@order == 0;
- my $rightOrder = 'type:flags(:objects)?(:allownull)?(:allowempty)?(:isvlan)?(:default)?(:range)?(:condition|:validonly)?(:relaxed)?(:isresourcetype)?(:deprecated)?';
+ my $rightOrder = 'type:flags(:objects)?(:allownull)?(:allowempty)?(:isvlan)?(:default)?(:range)?(:condition|:validonly)?(:relaxed)?(:isresourcetype)?(:deprecated)?(:precision)?';
my $order = join(":",@order);
@@ -2357,6 +2370,23 @@ sub ProcessNextRelease
return "true";
}
+sub ProcessPrecision {
+ my ($stat, $precision) = @_;
+
+ # Default 0 if precision is not provided
+ return 0 unless defined $precision;
+
+ # Must be an integer >= 0
+ if ($precision =~ /^\d+$/)
+ {
+ return int($precision);
+ }
+
+ LogError "Unsupported precision value '$precision'. Expected an integer >= 0";
+
+ return undef;
+}
+
sub ProcessSingleObjectType
{
my ($typedef, $objecttype) = @_;
@@ -2420,6 +2450,7 @@ sub ProcessSingleObjectType
my $isrelaxed = ProcessRelaxedType($attr, $meta{relaxed});
my $apiversion = ProcessApiVersion($attr);
my $nextrelease = ProcessNextRelease($attr);
+ my $precision = ProcessPrecision($attr, $meta{precision});
my $ismandatoryoncreate = ($flags =~ /MANDATORY/) ? "true" : "false";
my $iscreateonly = ($flags =~ /CREATE_ONLY/) ? "true" : "false";
@@ -2481,6 +2512,7 @@ sub ProcessSingleObjectType
WriteSource ".iscustom = ($attr >= 0x10000000) && ($attr < 0x20000000),";
WriteSource ".apiversion = $apiversion,";
WriteSource ".nextrelease = $nextrelease,";
+ WriteSource ".valueprecision = $precision,";
WriteSource "};";
diff --git a/meta/saimetadatatypes.h b/meta/saimetadatatypes.h
index e332ff216..16d5edd89 100644
--- a/meta/saimetadatatypes.h
+++ b/meta/saimetadatatypes.h
@@ -1367,6 +1367,13 @@ typedef struct _sai_attr_metadata_t
*/
bool nextrelease;
+ /**
+ * @brief Specifies value decimal precision for this attribute.
+ *
+ * For example, if precision is 2, then value 1234 means 12.34.
+ */
+ size_t valueprecision;
+
} sai_attr_metadata_t;
/*
diff --git a/meta/saisanitycheck.c b/meta/saisanitycheck.c
index 7a8315116..ef53a7ef1 100644
--- a/meta/saisanitycheck.c
+++ b/meta/saisanitycheck.c
@@ -3751,6 +3751,14 @@ void check_attr_version(
}
}
+void check_attr_precision(
+ _In_ const sai_attr_metadata_t* md)
+{
+ META_LOG_ENTER();
+
+ META_ASSERT_TRUE(md->valueprecision <= 18, "expected precision in range [0, 18]");
+}
+
void check_single_attribute(
_In_ const sai_attr_metadata_t* md)
{
@@ -3799,6 +3807,7 @@ void check_single_attribute(
check_attr_mixed_validonly(md);
check_attr_condition_relaxed(md);
check_attr_version(md);
+ check_attr_precision(md);
define_attr(md);
}