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

fabric_mesh.h (3311B)


      1 /*
      2  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      3  * 
      4  * Copyright 2007-2020 Broadcom Inc. All rights reserved.
      5  */
      6 /*
      7  * ! \file bcm_int/dnx/fabric/fabric.h
      8  * Reserved.$ 
      9  */
     10 
     11 #ifndef _DNX_FABRIC_MESH_H_INCLUDED_
     12 /*
     13  * { 
     14  */
     15 #define _DNX_FABRIC_H_INCLUDED_
     16 
     17 #ifndef BCM_DNX_SUPPORT
     18 #error "This file is for use by DNX (JR2) family only!"
     19 #endif
     20 
     21 #include <shared/shrextend/shrextend_error.h>
     22 #include <soc/types.h>
     23 #include <soc/dnxc/fabric.h>
     24 #include <bcm/types.h>
     25 
     26 /*************
     27  * DEFINES   *
     28  */
     29 /* { */
     30 /*
     31  * Group context length in bits
     32  */
     33 #define DNX_FABRIC_GROUP_CTX_LENGTH         (4)
     34 
     35 /*
     36  * MESH MC defines
     37  */
     38 #define DNX_FABRIC_MESH_MC_TABLE_WIDTH (169)
     39 #define DNX_FABRIC_MESH_MC_FAP_GROUP_SIZE       (32)
     40 #define DNX_FABRIC_MESH_MC_REPLICATION_LENGTH   (5)
     41 #define DNX_FABRIC_MESH_MC_REPLICATION_DEST_0_BIT    (0x1)
     42 #define DNX_FABRIC_MESH_MC_REPLICATION_DEST_1_BIT    (0x2)
     43 #define DNX_FABRIC_MESH_MC_REPLICATION_DEST_2_BIT    (0x4)
     44 #define DNX_FABRIC_MESH_MC_REPLICATION_LOCAL_0_BIT   (0x8)
     45 #define DNX_FABRIC_MESH_MC_REPLICATION_LOCAL_1_BIT   (0x10)
     46 /* } */
     47 
     48 /*
     49  * Typedefs:
     50  * {
     51  */
     52 /*
     53  * } 
     54  */
     55 
     56 /*************
     57  * FUNCTIONS *
     58  */
     59 
     60 /**
     61  * \brief
     62  *   Initialization of MESH mode configurations.
     63  * \param [in] unit -
     64  *   The unit number.
     65  * \return
     66  *   See \ref shr_error_e
     67  * \remark
     68  *   * Called as part of the initialization sequence.
     69  * \see
     70  *   * None.
     71  */
     72 shr_error_e dnx_fabric_mesh_init(
     73     int unit);
     74 
     75 /**
     76  * \brief
     77  *   Set local devices ids of Mesh system.
     78  * \param [in] unit -
     79  *   The unit number.
     80  * \param [in] core -
     81  *   local core id.
     82  * \param [in] modid_index -
     83  *   modid index.
     84  * \param [in] modid -
     85  *   The modid to set.
     86  * \return
     87  *   See \ref shr_error_e
     88  * \remark
     89  *   * Setting modid_index 0 will configure all modid_indexes
     90  *     of that core with the same modid.
     91  * \see
     92  *   * None.
     93  */
     94 shr_error_e dnx_fabric_mesh_device_id_local_set(
     95     int unit,
     96     bcm_core_t core,
     97     int modid_index,
     98     bcm_module_t modid);
     99 
    100 /**
    101  * \brief
    102  *   Set local devices ids of Mesh system.
    103  * \param [in] unit -
    104  *   The unit number.
    105  * \param [in] dest_group_id -
    106  *   destination group id.
    107  * \param [in] modid_index -
    108  *   modid index.
    109  * \param [in] modid -
    110  *   The modid to set.
    111  * \return
    112  *   See \ref shr_error_e
    113  * \remark
    114  *   * Setting modid_index 0 will configure all modid_indexes
    115  *     of that group with the same modid.
    116  * \see
    117  *   * None.
    118  */
    119 shr_error_e dnx_fabric_mesh_device_id_dest_set(
    120     int unit,
    121     int dest_group_id,
    122     int modid_index,
    123     bcm_module_t modid);
    124 
    125 /**
    126  * \brief
    127  *   Initialize Mesh Topology.
    128  * \param [in] unit -
    129  *   The unit number.
    130  * \return
    131  *   See \ref shr_error_e
    132  * \remark
    133  *   * None.
    134  * \see
    135  *   * None.
    136  */
    137 shr_error_e dnx_fabric_mesh_topology_init(
    138     int unit);
    139 
    140  /**
    141   * \brief
    142   *   Retreive mesh topology statuses.
    143   * \param [in] unit -
    144   *   The unit number.
    145   * \param [out] mesh_topology_diag -
    146   *   Struct to receive all mesh topology statuses.
    147   * \return
    148   *   See \ref shr_error_e
    149   * \remark
    150   *   * None.
    151   * \see
    152   *   * None.
    153   */
    154 shr_error_e dnx_fabric_mesh_topology_get(
    155     int unit,
    156     soc_dnxc_fabric_mesh_topology_diag_t * mesh_topology_diag);
    157 
    158 #endif /*_DNX_FABRIC_MESH_H_INCLUDED_*/