Skip to content

SAI_1.9.1 Release notes

kannankvs edited this page Jan 7, 2022 · 8 revisions

SAI 1.9.1 Release Notes

The Switch Abstraction Interface(SAI) defines the APIs to provide a vendor-independent way of controlling forwarding elements, such as a switching ASIC, an NPU or a software switch in a uniform manner. This release document covers the SAI API changes from SAI tag 1.8.1 to SAI tag 1.9.1. The previous release notes corresponding to SAI tag 1.8.1 is available at SAI 1.8.1 release notes

This document explains the new SAI features as well as the enhancements and the bug fixes on existing features.

Class-Based Forwarding

This PR defines class-based forwarding. It contains two aspects:

* Assignment of a Forwarding Class to a packet, via QOS map or ACL
* New next-hop group type: SAI_NEXT_HOP_GROUP_TYPE_CLASS_BASED

Where member selection is based on the forwarding-class of the packet. saiacl is updated with new type def SAI_ACL_ENTRY_ATTR_ACTION_SET_FORWARDING_CLASS and sainexthopgroup.h with SAI_NEXT_HOP_GROUP_TYPE_CLASS_BASED


sainexthopgroup.h


typedef enum _sai_next_hop_group_map_type_t
{
    /** Next hop group map forwarding-class to index */
    SAI_NEXT_HOP_GROUP_MAP_TYPE_FORWARDING_CLASS_TO_INDEX

} sai_next_hop_group_map_type_t;

typedef enum _sai_next_hop_group_map_attr_t
{
    /**
     * @brief Start of attributes
     */
    SAI_NEXT_HOP_GROUP_MAP_ATTR_START,

    /**
     * @brief Next hop group map type
     *
     * @type sai_next_hop_group_map_type_t
     * @flags MANDATORY_ON_CREATE | CREATE_ONLY
     */

    SAI_NEXT_HOP_GROUP_MAP_ATTR_TYPE = SAI_NEXT_HOP_GROUP_MAP_ATTR_START,

    /**
     * @brief Next hop group entries associated with this map.
     *
     * @type sai_map_list_t
     * @flags CREATE_AND_SET
     * @default empty
     */
    SAI_NEXT_HOP_GROUP_MAP_ATTR_MAP_TO_VALUE_LIST,

    /**
     * @brief End of attributes
     */
    SAI_NEXT_HOP_GROUP_MAP_ATTR_END,

    /** Custom range base value */
    SAI_NEXT_HOP_GROUP_MAP_ATTR_CUSTOM_RANGE_START = 0x10000000,

    /** End of custom range base */
    SAI_NEXT_HOP_GROUP_MAP_ATTR_CUSTOM_RANGE_END

} sai_next_hop_group_map_attr_t;
	
	
	 @brief Create next hop group map
 *
 * @param[out] next_hop_group_map_id Next hop group map id
 * @param[in] switch_id Switch ID
 * @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_next_hop_group_map_fn)(
        _Out_ sai_object_id_t *next_hop_group_map_id,
        _In_ sai_object_id_t switch_id,
        _In_ uint32_t attr_count,
        _In_ const sai_attribute_t *attr_list);

/**
 * @brief Remove next hop group map
 *
 * @param[in] next_hop_group_map_id Next hop group map ID
 *
 * @return #SAI_STATUS_SUCCESS on success, failure status code on error
 */
typedef sai_status_t (*sai_remove_next_hop_group_map_fn)(
        _In_ sai_object_id_t next_hop_group_map_id);

/**
 * @brief Set Next Hop Group map attribute
 *
 * @param[in] next_hop_group_map_id Next hop group map ID
 * @param[in] attr Attribute
 *
 * @return #SAI_STATUS_SUCCESS on success, failure status code on error
 */
typedef sai_status_t (*sai_set_next_hop_group_map_attribute_fn)(
        _In_ sai_object_id_t next_hop_group_map_id,
        _In_ const sai_attribute_t *attr);

/**
 * @brief Get next hop group map attribute
 *
 * @param[in] next_hop_group_map_id Next hop group map 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_next_hop_group_map_attribute_fn)(
        _In_ sai_object_id_t next_hop_group_map_id,
        _In_ uint32_t attr_count,
        _Inout_ sai_attribute_t *attr_list);
		
	sai_create_next_hop_group_map_fn           create_next_hop_group_map;
    sai_remove_next_hop_group_map_fn           remove_next_hop_group_map;
    sai_set_next_hop_group_map_attribute_fn    set_next_hop_group_map_attribute;
    sai_get_next_hop_group_map_attribute_fn    get_next_hop_group_map_attribute;
	
saiport.h


 /**
     * @brief Enable DSCP -> Forwarding Class MAP on port
     *
     * Map id = #SAI_NULL_OBJECT_ID to disable map on port.
     * Default no map.
     *
     * @type sai_object_id_t
     * @flags CREATE_AND_SET
     * @objects SAI_OBJECT_TYPE_QOS_MAP
     * @allownull true
     * @default SAI_NULL_OBJECT_ID
     */
    SAI_PORT_ATTR_QOS_DSCP_TO_FORWARDING_CLASS_MAP,

    /**
     * @brief Enable EXP -> Forwarding Class MAP on port
     *
     * Map id = #SAI_NULL_OBJECT_ID to disable map on port.
     * Default no map.
     *
     * @type sai_object_id_t
     * @flags CREATE_AND_SET
     * @objects SAI_OBJECT_TYPE_QOS_MAP
     * @allownull true
     * @default SAI_NULL_OBJECT_ID
     */
    SAI_PORT_ATTR_QOS_MPLS_EXP_TO_FORWARDING_CLASS_MAP,
	

The PR related to this feature is available at PR#1193

Adding IPsec support

A new API saiipsec.h has been added part of this current release to add an attribute for supporting both per SA and GLOBAL counters. Globals are aggregates for ingress and egress direction across all SAs. Per SA stats are directional per SA.

The PR related to this feature is available at PR#1206

Updates to SRv6 programming model and related objects/attributes

This implementation will bring SRv6 APIs and attributes in-line with the latest RFCs and SAI MPLS/tunnel pipeline model Also, this implementation doesn't explicitly address the functionality related to Traffic Class, Hop-Limit, ECN marking and load-balancing hash calculation. It's assumed that existing attributes for other IPv6 tunnels will apply to the SRv6 as well.

There are few changes in following API's sainexthop.h, saiobject.h, saisegmentroute.h, saisrv6.h, saiswitch.h, saitunnel.h and saitypes.h for this implementation

The PR related to this feature is available at PR#1193