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

cprimod_internal.h (1157B)


      1 
      2 /*
      3  *         
      4  * 
      5  * 
      6  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      7  * 
      8  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      9  */
     10 
     11 #ifndef _CPRIMOD_INTERNAL_H_
     12 #define _CPRIMOD_INTERNAL_H_
     13 
     14 #include <shared/bsl.h>
     15 #include <soc/cprimod/cprimod.h>
     16 #include <appl/diag/diag.h>
     17 
     18 
     19 #define CPRIMOD_DEBUG_ERROR(stuff_) \
     20     LOG_ERROR(BSL_LS_SOC_PORT,stuff_)
     21 
     22 #define CPRIMOD_DEBUG_WARN(stuff_) \
     23     LOG_WARN(BSL_LS_SOC_PORT, stuff_)
     24 
     25 #define CPRIMOD_RETURN_WITH_ERR(A,B) \
     26     do {   \
     27         CPRIMOD_DEBUG_ERROR(B);\
     28         return A; \
     29     } while (0)
     30 
     31 
     32 #define CPRIMOD_NULL_CHECK(A) \
     33     do {   \
     34         if ((A) == NULL) \
     35         { CPRIMOD_RETURN_WITH_ERR(SOC_E_PARAM,(BSL_META("NULL Parameter\n"))); } \
     36     } while (0)
     37 
     38 
     39 /*!
     40  * cprimod_port_cpm_type_get
     41  *
     42  * @brief Get the pm type of a port.
     43  *
     44  * @param [in]  unit            - unit id
     45  * @param [in]  port            - logical port
     46  * @param [out]  pm_type         - dispatch type
     47  */
     48 int cprimod_port_cpm_type_get(int unit, int port, cprimod_dispatch_type_t* pm_type);
     49 
     50 #endif /*_PORTMOD_INTERNAL_H_*/