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 (2149B)


      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-2019 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 
     26 #define BFD_UC_MIN_VERSION 0x01000200
     27 
     28 /* Indicates the feature supported : Same bit has to be used in SDK and UKERNEL
     29  * 0 , 9 and 24th bit cannot be used as they are set in base version string
     30  * BFD_SDK_VERSION : 0x01000001 BFD_APPL_VERSION : 0x01000200*/
     31 
     32 #define BFD_FEATURE_RESERVED1  0
     33 #define BFD_FEATURE_RESERVED2  9
     34 #define BFD_FEATURE_RESERVED3  24
     35 #define BFD_FEATURE_64BIT_STAT 1
     36 #define BFD_FEATURE_POLL_BIT   2
     37 #define BFD_FEATURE_ECHO_MODE  3
     38 #define BFD_FEATURE_REMOTE_MEP_ID 4
     39 #define BFD_FEATURE_RX_PKT_VLAN_ID 5
     40 /*
     41  * Below feature also introduced msg_init.config_flags
     42  * which could be used for configuring multiple
     43  * init time flags on BFD firmware. This is useful
     44  * for conveying config properties on the SDK side.
     45  */
     46 #define BFD_FEATURE_INIT_CONFIG_FLAGS 6
     47 
     48 /* Debug trace enable */
     49 #define BFD_FEATURE_DBG_TRACE 11
     50 
     51 /* Protection Packet Feature  */
     52 #define BFD_FEATURE_PROTECTION_PKT 12
     53 
     54 /* Echo reply processed packets */
     55 #define BFD_FEATURE_ECHO_REPLY_PACKETS 13
     56 
     57 extern uint32 bfd_firmware_version;
     58 
     59 /*Macro for BFD feature check*/
     60 #define BFD_UC_FEATURE_CHECK(feature)  (bfd_firmware_version & (1 << feature))
     61 
     62 #endif /* BFD_FEAT_H_ */