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

mpls_range.h (2156B)


      1 /*
      2  * \file bcm_int/dnx/mpls/mpls_range.h
      3  * Internal DNX MPLS APIs
      4  *
      5  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      6  * 
      7  * Copyright 2007-2020 Broadcom Inc. All rights reserved.
      8  */
      9 
     10 #ifndef __MPLS_RANGE_H_INCLUDED__
     11 /*
     12  * {
     13  */
     14 #define __MPLS_RANGE_H_INCLUDED__
     15 
     16 #ifndef BCM_DNX_SUPPORT
     17 #error "This file is for use by DNX (JR2) family only!"
     18 #endif
     19 
     20 #include <shared/shrextend/shrextend_debug.h>
     21 #include <bcm/mpls.h>
     22 
     23 /**
     24  * \brief
     25  *   Check whether any of the specified labels is within one of
     26  *   the ranges already loaded into HW. If so, indicate that and specify the
     27  *   found range.
     28  *   Note that it is enough for just one of the labels to be 'within range' to
     29  *   make '*is_iml_p' be loaded by a non-zero value.
     30  * \param [in] unit -
     31  *   Identifier of HW platform.
     32  * \param [in] num_labels -
     33  *   Number of labels in the array 'labels' below.
     34  * \param [in] in_labels_p -
     35  *   Pointer to an array of MPLS labels. The number of elements on this array
     36  *   is as per 'num_labels' above. 
     37  *   If ANY of specified labels is within a range which is already in HW then
     38  *     this procedure loads '*is_iml' by TRUE (non-zero value) and, also loads
     39  *     'found_labels' by the labels on the range found in HW.
     40  *   Otherwise, this procedure loads '*is_iml' by FALSE (zero value)
     41  * \param [out] is_iml_p -
     42  *   Pointer to int. 
     43  *   See 'in_labels' above.
     44  * \param [out] found_labels_low_p -
     45  *   Pointer to an MPLS label. To be loaded by the 'low' value, if found.
     46  *   See 'in_labels' above.
     47  * \param [out] found_labels_high_p -
     48  *   Pointer to an MPLS label. To be loaded by the 'high' value, if found.
     49  *   See 'in_labels' above.
     50  * \return
     51  *   Negative in case of an error.
     52  *   Zero in case of NO ERROR
     53  * \see
     54  *   * dnx_mpls_range_action_add_verify
     55  * \remark
     56  *   * None
     57  */
     58 shr_error_e
     59 dnx_mpls_label_iml_range_check(
     60     int unit,
     61     int num_labels,
     62     bcm_mpls_label_t *in_labels_p,
     63     int *is_iml_p,
     64     bcm_mpls_label_t *found_labels_low_p,
     65     bcm_mpls_label_t *found_labels_high_p) ;
     66 
     67 /*
     68  * }
     69  */
     70 #endif/*__MPLS_RANGE_H_INCLUDED__*/