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

bfd_feature.h (2478B)


      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:    bfd_feature.h
      8  */
      9 
     10 #ifndef BFD_FEATURE_H_
     11 #define BFD_FEATURE_H_
     12 
     13 
     14 /*Bit 1 : BFD 64bit packet statistics*/
     15 #define BFD_SDK_BASE_VERSION    0x01000001
     16 #define BFD_SDK_VERSION         BFD_SDK_BASE_VERSION |              \
     17                                 (1 << BFD_FEATURE_64BIT_STAT) | \
     18                                 (1 << BFD_FEATURE_POLL_BIT) | \
     19                                 (1 << BFD_FEATURE_ECHO_MODE) | \
     20                                 (1 << BFD_FEATURE_REMOTE_MEP_ID) | \
     21                                 (1 << BFD_FEATURE_RX_PKT_VLAN_ID) |\
     22                                 (1 << BFD_FEATURE_INIT_CONFIG_FLAGS) | \
     23                                 (1 << BFD_FEATURE_DBG_TRACE) |\
     24                                 (1 << BFD_FEATURE_ECHO_REPLY_PACKETS) | \
     25                                 (1 << BFD_FEATURE_DIP_BASED_LOOKUP) | \
     26                                 (1 << BFD_FEATURE_TX_RAW_INGRESS)
     27 
     28 #define BFD_UC_MIN_VERSION 0x01000200
     29 
     30 /* Indicates the feature supported : Same bit has to be used in SDK and UKERNEL
     31  * 0 , 9 and 24th bit cannot be used as they are set in base version string
     32  * BFD_SDK_VERSION : 0x01000001 BFD_APPL_VERSION : 0x01000200*/
     33 
     34 #define BFD_FEATURE_RESERVED1  0
     35 #define BFD_FEATURE_RESERVED2  9
     36 #define BFD_FEATURE_RESERVED3  24
     37 #define BFD_FEATURE_64BIT_STAT 1
     38 #define BFD_FEATURE_POLL_BIT   2
     39 #define BFD_FEATURE_ECHO_MODE  3
     40 #define BFD_FEATURE_REMOTE_MEP_ID 4
     41 #define BFD_FEATURE_RX_PKT_VLAN_ID 5
     42 /*
     43  * Below feature also introduced msg_init.config_flags
     44  * which could be used for configuring multiple
     45  * init time flags on BFD firmware. This is useful
     46  * for conveying config properties on the SDK side.
     47  */
     48 #define BFD_FEATURE_INIT_CONFIG_FLAGS 6
     49 
     50 /* Debug trace enable */
     51 #define BFD_FEATURE_DBG_TRACE 11
     52 
     53 /* Protection Packet Feature  */
     54 #define BFD_FEATURE_PROTECTION_PKT 12
     55 
     56 /* Echo reply processed packets */
     57 #define BFD_FEATURE_ECHO_REPLY_PACKETS 13
     58 
     59 /* DIP address to de-multiplex BFD session for zero Your-discriminator packets */
     60 #define BFD_FEATURE_DIP_BASED_LOOKUP 14
     61 
     62 /* BFD TX Raw ingress */
     63 #define BFD_FEATURE_TX_RAW_INGRESS 15
     64 
     65 extern uint32 bfd_firmware_version;
     66 
     67 /*Macro for BFD feature check*/
     68 #define BFD_UC_FEATURE_CHECK(feature)  (bfd_firmware_version & (1 << feature))
     69 
     70 #endif /* BFD_FEAT_H_ */