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

algo_stg.h (1259B)


      1 /**
      2  * \file algo_stg.h
      3  *
      4  *  Internal DNX STG Managment APIs
      5  */
      6 /*
      7  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      8  * 
      9  * Copyright 2007-2020 Broadcom Inc. All rights reserved.
     10  *  All Rights Reserved.
     11  */
     12 
     13 #ifndef ALGO_STG_H_INCLUDED
     14 /*
     15  * {
     16  */
     17 #define ALGO_STG_H_INCLUDED
     18 
     19 #include <shared/shrextend/shrextend_debug.h>
     20 #include <bcm_int/dnx/algo/swstate/auto_generated/access/algo_stg_access.h>
     21 
     22 #ifndef BCM_DNX_SUPPORT
     23 #error "This file is for use by DNX (JR2) family only!"
     24 #endif
     25 
     26 /**
     27  * }
     28  */
     29 
     30 /*
     31  * Defines
     32  * {
     33  */
     34 #define DNX_ALGO_RES_TYPE_STG_ID                 "STG_ID"
     35 
     36 /**
     37  * }
     38  */
     39 
     40 /*
     41  * MACROs
     42  * {
     43  */
     44 
     45 /**
     46  * }
     47  */
     48 
     49 /**
     50  * \brief
     51  *  Initialize STG resources.
     52  *
     53  * \param [in] unit - Unit-ID
     54  *
     55  * \return
     56  *   \retval Zero if no error was detected
     57  *   \retval Negative if error was detected. See \ref shr_error_e
     58 
     59  * \remark
     60  *  The resource of STG IDs is initialized in the range of {1, nof_topology_ids}
     61  *  which is the range of STG IDs BCM APIs are using.
     62  *  Topology IDs in hardware is encoded with STG_ID - 1.
     63  *
     64  * \see
     65  *  dnx_algo_res_create
     66  */
     67 shr_error_e dnx_algo_stg_init(
     68     int unit);
     69 
     70 /*
     71  * }
     72  */
     73 #endif /* ALGO_STG_H_INCLUDED */