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

field_port.h (3817B)


      1 /**
      2  * \file bcm_int/dnx/field/field_port.h
      3  *
      4  *
      5  * Field Processor definitions related to port profiles of different types.
      6  */
      7 /*
      8  * 
      9  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
     10  * 
     11  * Copyright 2007-2020 Broadcom Inc. All rights reserved.
     12  */
     13 
     14 #ifndef FIELD_FIELD_PORT_H_INCLUDED
     15 /* { */
     16 #define FIELD_FIELD_PORT_H_INCLUDED
     17 
     18 #ifndef BCM_DNX_SUPPORT
     19 #error "This file is for use by DNX (JR2) family only!"
     20 #endif
     21 
     22 /*
     23  * Include files
     24  * {
     25  */
     26 #include <shared/utilex/utilex_rhlist.h>
     27 #include <bcm_int/dnx/field/field.h>
     28 #include <bcm_int/dnx/field/field_map.h>
     29 #include <include/bcm_int/dnx/lif/in_lif_profile.h>
     30 #include <include/bcm_int/dnx/lif/out_lif_profile.h>
     31 #include <bcm/field.h>
     32 /*
     33  * }
     34  */
     35 
     36 /*
     37  * Defines
     38  * {
     39  */
     40 
     41 /*
     42  * } Defines
     43  */
     44 
     45 /**
     46 * \brief        Set the bit range inside misc. profile qualifiers
     47 * \param [in] unit - Device Id
     48 * \param [in] dnx_profile_type - what kind of profile we are dealing with
     49 * \param [in] start_bit - first bit dedicated to PMF
     50 * \param [in] nof_bits - number of bits in the profile dedicated to PMF
     51 * \return
     52 *   shr_error_e - Error Type
     53 * \remark
     54 *   * Used by In Lif manager to set PMF dedicated bits for FP usage
     55 * \see
     56 *   * None
     57 */
     58 shr_error_e dnx_field_port_profile_bits_set(
     59     int unit,
     60     dnx_field_port_porfile_type_e dnx_profile_type,
     61     int start_bit,
     62     int nof_bits);
     63 
     64 /**
     65 * \brief        Get the bit range inside misc. profile qualifiers
     66 * \param [in] unit - Device Id
     67 * \param [in] dnx_profile_type - what kind of profile we are dealing with
     68 * \param [out] start_bit_p - first bit dedicated to PMF
     69 * \param [out] nof_bits_p - number of bits in the profile dedicated to PMF
     70 * \return
     71 *   shr_error_e - Error Type
     72 * \remark
     73 *   * Used by In Lif manager to set PMF dedicated bits for FP usage
     74 * \see
     75 *   * None
     76 */
     77 shr_error_e dnx_field_port_profile_bits_get(
     78     int unit,
     79     dnx_field_port_porfile_type_e dnx_profile_type,
     80     unsigned int *start_bit_p,
     81     unsigned int *nof_bits_p);
     82 
     83 /**
     84 * \brief        Set the PMF data for port profile according to the profile type.
     85 * \param [in] unit - Device Id
     86 * \param [in] port_class - what kind of profile we are dealing with
     87 * \param [in] port - Gport indicating the port
     88 * \param [in] field_profile - PMF data to set in the port profile
     89 * \return
     90 *   shr_error_e - Error Type
     91 * \remark
     92 * \see
     93 *   * None
     94 */
     95 shr_error_e dnx_field_port_profile_gport_set(
     96     int unit,
     97     bcm_port_class_t port_class,
     98     bcm_gport_t port,
     99     uint32 field_profile);
    100 
    101 /**
    102 * \brief        Get the PMF data for port profile according to the profile type.
    103 * \param [in] unit - Device Id
    104 * \param [in] port_class - what kind of profile we are dealing with
    105 * \param [in] port - Gport indicating the port
    106 * \param [out] field_profile_p - PMF data of the port profile
    107 * \return
    108 *   shr_error_e - Error Type
    109 * \remark
    110 * \see
    111 *   * None
    112 */
    113 shr_error_e dnx_field_port_profile_gport_get(
    114     int unit,
    115     bcm_port_class_t port_class,
    116     bcm_gport_t port,
    117     uint32 *field_profile_p);
    118 
    119 /**
    120 * \brief        Set the PMF data for VSI profile
    121 * \param [in] unit - Device Id
    122 * \param [in] field_profile - PMF data to set in the VSI profile
    123 * \param [in,out] vsi_porfile_p - VSI Profile
    124 * \return
    125 *   shr_error_e - Error Type
    126 * \remark
    127 * \see
    128 *   * None
    129 */
    130 shr_error_e dnx_field_port_profile_vsi_set(
    131     int unit,
    132     int field_profile,
    133     int *vsi_porfile_p);
    134 
    135 /**
    136 * \brief        Get the PMF data for VSI profile
    137 * \param [in] unit - Device Id
    138 * \param [in] vsi_profile - VSI profile
    139 * \param [out] field_profile_p - PMF data for the VSI profile
    140 * \return
    141 *   shr_error_e - Error Type
    142 * \remark
    143 * \see
    144 *   * None
    145 */
    146 shr_error_e dnx_field_port_profile_vsi_get(
    147     int unit,
    148     int vsi_profile,
    149     int *field_profile_p);
    150 
    151 /* } */
    152 #endif