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

ccm.h (2416B)


      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:    ccm.h
      8  * Purpose: CCM Application definitions common to SDK and uKernel.
      9  */
     10 #ifndef   _SOC_SHARED_CCM_H_
     11 #define   _SOC_SHARED_CCM_H_
     12 
     13 #define _FP_OAM_CCM_EVENT_THREAD_PRIO   200 /* CCM Event handler thread Prio */
     14 #define _FP_OAM_MAX_MDL     7   /* Max num of MDLs (0-7) */
     15 #define _FP_OAM_MAX_CTRS    3   /* Max num of ctrs that can be modified */
     16 #define _FP_OAM_MAID_LEN    48  /* MAID Length */
     17 
     18 /* MEPID range 1-8191 */
     19 #define _FP_OAM_EP_NAME_MIN 1
     20 #define _FP_OAM_EP_NAME_MAX 8191
     21 
     22 #define _FP_OAM_MEP_TYPE_PORT       1
     23 #define _FP_OAM_MEP_TYPE_CVLAN      2
     24 #define _FP_OAM_MEP_TYPE_SVLAN      3
     25 #define _FP_OAM_MEP_TYPE_S_C_VLAN   4
     26 
     27 /* DA(12) + SA(12) + TAG1(4) + TAG2(4) + ETH_TYPE(2) + Rsvd(4) = 38 (~40) */
     28 #define _FP_OAM_CCM_L2_ENCAP_LEN_MAX    40 /* Max L2 Encap Size */
     29 
     30 #define _FP_OAM_OLP_L2_HDR_LEN          18 /* Size of OLP L2 Hdr */
     31 #define _FP_OAM_OLP_OAM_TX_HDR_LEN      16 /* Size of OLP Tx OAM Hdr */
     32 /* Size of Complete OLP Tx Header (L2 + OAM) */
     33 #define _FP_OAM_OLP_TX_LEN              (_FP_OAM_OLP_L2_HDR_LEN + \
     34                                          _FP_OAM_OLP_OAM_TX_HDR_LEN)
     35 #define _FP_OAM_OLP_OAM_RX_HDR_LEN      20 /* Size of OLP Rx OAM Hdr */
     36 /* Size of Complete OLP Rx Header (L2 + OAM) */
     37 #define _FP_OAM_OLP_RX_LEN              (_FP_OAM_OLP_L2_HDR_LEN + \
     38                                          _FP_OAM_OLP_OAM_RX_HDR_LEN)
     39 
     40 #define _FP_OAM_OLP_CTR_WIDTH       11 /* Num bits for CNTR Idx */
     41 #define _FP_OAM_OLP_CTR_POOL_WIDTH  3  /* Num bits for CNTR POOL */
     42 
     43 #define _FP_OAM_OLP_CTR_LOC_IP      0  /* CTR Location IP */
     44 #define _FP_OAM_OLP_CTR_LOC_EP      1  /* CTR Location EP */
     45 
     46 #define _FP_OAM_OLP_CTR_ACTN_INC    1  /* CTR Action Incr */
     47 #define _FP_OAM_OLP_CTR_ACYN_SAMPLE 2  /* CTR Action Sample */
     48 
     49 /* Group Data Flags */
     50 #define _FP_OAM_GROUP_SW_RDI_FLAG   (1 << 0)
     51 #define _FP_OAM_INVALID_LMEP_ID     (-1)
     52 
     53 /* MEP Data Flags */
     54 #define _FP_OAM_REMOTE_MEP          (1 << 0)
     55 #define _FP_OAM_INTERFACE_STATUS_TX (1 << 1) /* Tx Intf Status TLV */
     56 #define _FP_OAM_PORT_STATUS_TX      (1 << 2) /* Tx Port Status TLV */
     57 #define _FP_OAM_REMOTE_DEFECT_TX    (1 << 3) /* Tx RDI */
     58 #define _FP_OAM_DIRECTION_UP        (1 << 4) /* UP MEP */
     59 
     60 
     61 #endif