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_mpls.h (2869B)


      1 /**
      2  * \file algo_mpls.h Internal DNX MPLS Managment APIs
      3 PIs This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4 PIs 
      5 PIs Copyright 2007-2020 Broadcom Inc. All rights reserved. 
      6  */
      7 
      8 #ifndef ALGO_MPLS_H_INCLUDED
      9 /*
     10  * { 
     11  */
     12 #define ALGO_MPLS_H_INCLUDED
     13 
     14 #include <shared/shrextend/shrextend_debug.h>
     15 
     16 #include <bcm_int/dnx/algo/template_mngr/template_manager_types.h>
     17 
     18 #ifndef BCM_DNX_SUPPORT
     19 #error "This file is for use by DNX (JR2) family only!"
     20 #endif
     21 
     22 /**
     23  * Resource name defines for algo mpls 
     24  * {
     25  */
     26 
     27 #define DNX_MPLS_TERMINATION_PROFILE_TEMPLATE "TERMINATION PROFILE"
     28 
     29 #define DNX_MPLS_PUSH_PROFILE_TEMPLATE        "PUSH PROFILE"
     30 
     31 /**
     32  * }
     33  */
     34 
     35 typedef struct
     36 {
     37     /*
     38      * indicates the ttl model, whether set according to push profile or copy from previous header 
     39      */
     40     uint8 ttl_model;
     41     /*
     42      * indicates the exp model, whether set according to push profile or copy from previous header 
     43      */
     44     uint8 exp_model;
     45     /*
     46      *  Has Control-word. Used to determine whether to add CW
     47      *  under the tunnel header. The value of CW is set
     48      *  according to soc_ppd_eg_encap_glbl_info_set()
     49      */
     50     uint8 has_cw;
     51     /*
     52      *  TTL to set in the tunnel header in case tunnel model is
     53      *  pipe. Range: 0 - 255.
     54      */
     55     uint8 ttl;
     56     /*
     57      *  EXP to set in the pushed label header in case tunnel
     58      *  model is pipe.
     59      */
     60     uint8 exp;
     61     /*
     62      *  Select 1 of 16 Remark profiles.
     63      */
     64     uint8 remark_profile;
     65     /*
     66      *  If set, Entropy label will be added. 
     67      */
     68     uint8 add_entropy_label;
     69     /*
     70      *  If set, Entropy label indicator will be added. 
     71      */
     72     uint8 add_entropy_label_indicator;
     73     /*
     74      *  ESEM extraction command.
     75      */
     76     int esem_command_profile;
     77 } dnx_jr_mode_mpls_push_profile_t;
     78 /**
     79  * \brief 
     80  *   allocate resource pool for all MPLS profiles types
     81  * \param [in] unit - 
     82  *   The unit number. 
     83  * \return  
     84  *   \retval Negative in case of an error. 
     85  *   \retval Zero in case of NO ERROR
     86  */
     87 shr_error_e dnx_algo_mpls_init(
     88     int unit);
     89 
     90 /**
     91 * \brief
     92 *   Print an entry of the enablers vector template. See
     93 *       \ref dnx_algo_template_print_data_cb for more details.
     94 * \param [in] unit - the unit number 
     95 * \param [in] data - Pointer of the struct to be printed.
     96 * \return 
     97 *     None 
     98  */
     99 void dnx_algo_mpls_termination_profile_template_print_cb(
    100     int unit,
    101     const void *data);
    102 
    103 /**
    104 * \brief
    105 *   Print an entry of the push profile template. See
    106 *       \ref dnx_algo_template_print_data_cb for more details.
    107 * \param [in] unit - the unit number 
    108 * \param [in] data - Pointer of the struct to be printed.
    109 * \return 
    110 *     None 
    111  */
    112 
    113 void dnx_algo_mpls_push_profile_template_print_cb(
    114     int unit,
    115     const void *data);
    116 /*
    117  * } 
    118  */
    119 #endif/*_ALGO_MPLS_API_INCLUDED__*/