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

st.h (2280B)


      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  */
      8 
      9 /*
     10  * File:    st.h
     11  * Purpose: ST definitions common to SDK and uKernel
     12  *
     13  * Notes:   Definition changes should be avoided in order to
     14  *          maintain compatibility between SDK and uKernel since
     15  *          both images are built and loaded separately.
     16  */
     17 
     18 #ifndef _SOC_SHARED_ST_H
     19 #define _SOC_SHARED_ST_H
     20 
     21 #ifdef BCM_UKERNEL
     22   /* Build for uKernel not SDK */
     23   #include "sdk_typedefs.h"
     24 #else
     25   #include <sal/types.h>
     26 #endif
     27 
     28 
     29 /*
     30  * ST uC Error codes
     31  */
     32 typedef enum shr_st_uc_error_e {
     33     SHR_ST_UC_E_NONE      = 0,
     34     SHR_ST_UC_E_INTERNAL  = 1,
     35     SHR_ST_UC_E_MEMORY    = 2,
     36     SHR_ST_UC_E_UNIT      = 3,
     37     SHR_ST_UC_E_PARAM     = 4,
     38     SHR_ST_UC_E_EMPTY     = 5,
     39     SHR_ST_UC_E_FULL      = 6,
     40     SHR_ST_UC_E_NOT_FOUND = 7,
     41     SHR_ST_UC_E_EXISTS    = 8,
     42     SHR_ST_UC_E_TIMEOUT   = 9,
     43     SHR_ST_UC_E_BUSY      = 10,
     44     SHR_ST_UC_E_FAIL      = 11,
     45     SHR_ST_UC_E_DISABLED  = 12,
     46     SHR_ST_UC_E_BADID     = 13,
     47     SHR_ST_UC_E_RESOURCE  = 14,
     48     SHR_ST_UC_E_CONFIG    = 15,
     49     SHR_ST_UC_E_UNAVAIL   = 16,
     50     SHR_ST_UC_E_INIT      = 17,
     51     SHR_ST_UC_E_PORT      = 18
     52 } shr_st_uc_error_t;
     53 
     54 
     55 /* Max size of the ProtoBuf packet encap */
     56 #define SHR_ST_MAX_COLLECTOR_ENCAP_LENGTH (128)
     57 
     58 /* Max length of the interface name */
     59 #define SHR_ST_MAX_IF_NAME_LENGTH (32)
     60 
     61 /* Max number of lports in all devices supporting ST */
     62 #define SHR_ST_MAX_PORTS (136)
     63 
     64 /* Max length of the system Id in bytes */
     65 #define SHR_ST_MAX_SYSTEM_ID_LENGTH (32)
     66 
     67 /* Max export length supported */
     68 #define SHR_ST_MAX_EXPORT_LENGTH 9000
     69 
     70 /* Max timeout for msging between SDK and UKERNEL */
     71 #define SHR_ST_MAX_UC_MSG_TIMEOUT 5000000 /* 5 secs */
     72 
     73 /* Stat types */
     74 #define SHR_ST_STAT_TYPE_IF_INGRESS        (1 << 0)
     75 #define SHR_ST_STAT_TYPE_IF_EGRESS         (1 << 1)
     76 #define SHR_ST_STAT_TYPE_IF_INGRESS_ERRORS (1 << 2)
     77 #define SHR_ST_STAT_TYPE_QUEUE_EGRESS      (1 << 3)
     78 
     79 /* Supported export interval (1s) */
     80 #define _SHR_ST_EXPORT_INTERVAL_USECS (1 * 1000 * 1000)
     81 
     82 #endif /* _SOC_SHARED_ST_H */