openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

bhh_feature.h (4320B)


      1 /*
      2  * 
      3  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4  * 
      5  * Copyright 2007-2020 Broadcom Inc. All rights reserved.
      6  *
      7  * File:    bhh_feature.h
      8  */
      9 
     10 #ifndef BHH_FEATURE_H_
     11 #define BHH_FEATURE_H_
     12 
     13 #define BHH_SDK_BASE_VERSION    0x01000001
     14 
     15 #define BHH_SDK_VERSION    BHH_SDK_BASE_VERSION          | \
     16                            (1 << BHH_WB_SESS_GET)        | \
     17                            (1 << BHH_LOSS_GET)           | \
     18                            (1 << BHH_PM_MODE)            | \
     19                            (1 << BHH_REMOTE_EP_NAME)     | \
     20                            (1 << BHH_FAULTS_GET)         | \
     21                            (1 << BHH_PM_STAT_EXTRA_ELEM) | \
     22                            (1 << BHH_PASSIVE_MEP)        | \
     23                            (1 << BHH_OLP_ENCAP)          | \
     24                            (1 << BHH_OLP_ENCAP_VALID)    | \
     25                            (1 << BHH_PRIORITY_EVENT)     | \
     26                            (1 << BHH_DM_DATA_TLV)        | \
     27                            (1 << BHH_TRUNK_SUPPORT)      | \
     28                            (1 << BHH_KT2_PM_SUPPORT)
     29 
     30 #define BHH_UC_MIN_VERSION 0x01000000
     31 
     32 /* Indicates the feature supported : Same bit has to be used in SDK and UKERNEL
     33  * 0 and 24th bit cannot be used as they are set in base version string
     34  * BHH_SDK_VERSION : 0x01000001 BHH_APPL_VERSION : 0x01000000*/
     35 
     36 #define BHH_FEATURE_RESERVED1  0
     37 #define BHH_FEATURE_RESERVED2  24
     38 
     39 #define BHH_WB_SESS_GET        1
     40 #define BHH_LOSS_GET           2
     41 #define BHH_PM_MODE            3
     42 #define BHH_REMOTE_EP_NAME     4
     43 #define BHH_FAULTS_GET         5
     44 /* Extra elements added in pm_stat structure */
     45 #define BHH_PM_STAT_EXTRA_ELEM 6
     46 #define BHH_PASSIVE_MEP        7 /* Add support to create following endpoints
     47                                   *  - Only Rx CCM
     48                                   *  - Only Tx CCM
     49                                   *  - No Tx/Rx CCM
     50                                   */
     51 #define BHH_OLP_ENCAP          8 /* Enhanced messages to support OLP encap,
     52                                   * loss_add, delay_add and loopback_add
     53                                   * enhnaced to take OLP encap. Corresponding get
     54                                   * messages are enahanced to return OLP encap.
     55                                   * SESS_SET takes inner & outer vlan for hash
     56                                   * calculation for Section MEP. MSG init takes
     57                                   * an additional param to indicate max encap
     58                                   * length. SESS_SET message takes num_counters
     59                                   * to indicate number of counters associated
     60                                   * this endpoint
     61                                   */
     62 #define BHH_OLP_ENCAP_VALID    9 /* Indicates SDK's capability to send OLP
     63                                   * encapsulated BHH packets.
     64                                   * Note that though this is set for all platforms,
     65                                   * On the UKernel side this will be handled only 
     66                                   * for platforms for which BHH_OLP compile flag is
     67                                   * defined, which are Saber2 and Apache.
     68                                   */
     69 #define BHH_PRIORITY_EVENT    10 /* Add support to raise priority mismatch event
     70                                   * for BHH CCM packets received from Peer MEP
     71                                   * BHH: int_pri and pkt_pri handling for
     72                                   * various BHH message types
     73                                   */
     74 #define BHH_DM_DATA_TLV       11 /* Support data tlv in DM */
     75 #define BHH_TRUNK_SUPPORT     12 /* Specify different Rx, Tx port for a session,
     76                                   * Add trunk support for TR3, Hx4 and KT
     77                                   */
     78 
     79 #define BHH_KT2_PM_SUPPORT    13 /* Support for PM added in KT2 for BHH-only Firmware.
     80                                   * It started from (SDK-6.5.6 + uKernel-4.3.3)
     81                                   */
     82 
     83 /* bhh firmware version running in ukernel */
     84 extern uint32 bhh_firmware_version;
     85 
     86 /*Macro for BHH feature check*/
     87 #define BHH_UC_FEATURE_CHECK(feature)  (bhh_firmware_version & (1 << feature))
     88 
     89 #endif /* BHH_FEAT_H_ */