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_tdm.h (2037B)


      1 /**
      2  * \file algo_tdm.h
      3  * Internal DNX TDM Managment APIs
      4  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      5  * 
      6  * Copyright 2007-2020 Broadcom Inc. All rights reserved. 
      7  */
      8 
      9 #ifndef ALGO_TDM_H_INCLUDED
     10 /*
     11  * { 
     12  */
     13 #define ALGO_TDM_H_INCLUDED
     14 
     15 #include <sal/types.h>
     16 #include <shared/shrextend/shrextend_debug.h>
     17 #include <shared/bitop.h>
     18 
     19 #include <bcm_int/dnx/algo/template_mngr/template_manager_types.h>
     20 #include <soc/dnx/dnx_data/auto_generated/dnx_data_max_fabric.h>
     21 
     22 #ifndef BCM_DNX_SUPPORT
     23 #error "This file is for use by DNX (JR2) family only!"
     24 #endif
     25 
     26 /**
     27  * Resource name defines for algo tdm.
     28  * {
     29  */
     30 #define DNX_ALGO_TDM_LINK_MASK_TEMPLATE     "TDM Link Mask Template"
     31 
     32 #define DNX_TDM_LINK_MASK_DEFAULT_ID            0
     33 
     34 /**
     35  * }
     36  */
     37 
     38 /**
     39  * \brief - data for ingress editing context.
     40  */
     41 typedef struct
     42 {
     43     /** bits for link mask data */
     44     uint32 link_mask_data[_SHR_BITDCLSIZE(DNX_DATA_MAX_FABRIC_LINKS_NOF_LINKS)];
     45 } dnx_tdm_link_mask_t;
     46 
     47 /**
     48  * \brief - Print an entry of the vsi profile template. See
     49  *       \ref dnx_algo_template_print_data_cb for more details.
     50  * 
     51  * \param [in] unit - unit id
     52  * \param [in] data - Pointer to the struct to be printed.
     53  *      \b As \b input - \n
     54  *       The pointer is expected to hold a struct of type uint32[2]. \n
     55  *       It's the user's responsibility to verify it beforehand.
     56  * \return
     57  * \remark
     58  *   * None
     59  * \see
     60  *   * None
     61  */
     62 void dnx_tdm_link_mask_print_cb(
     63     int unit,
     64     const void *data);
     65 
     66 /**
     67  * \brief - Initialize tdm algorithms.
     68  * 
     69  * \param [in] unit - unit id
     70  *   
     71  * \return
     72  *   shr_error_e 
     73  *   
     74  * \remark
     75  *   * None
     76  * \see
     77  *   * None
     78  */
     79 shr_error_e dnx_algo_tdm_init(
     80     int unit);
     81 
     82 /**
     83  * \brief - De-Initialize tdm algorithms.
     84  * 
     85  * \param [in] unit - unit ID
     86  *   
     87  * \return
     88  *   shr_error_e 
     89  *   
     90  * \remark
     91  *   * None
     92  * \see
     93  *   * None
     94  */
     95 shr_error_e dnx_algo_tdm_deinit(
     96     int unit);
     97 
     98 /*
     99  * } 
    100  */
    101 #endif /* ALGO_TDM_H_INCLUDED */