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

tomahawk2_tdm.h (4041B)


      1 /*
      2  * 
      3  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4  * 
      5  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      6  *
      7  * File:        tomahawk2_tdm.h
      8  */
      9 
     10 #ifndef _SOC_TOMAHAWK2_TDM_H_
     11 #define _SOC_TOMAHAWK2_TDM_H_
     12 
     13 #include <soc/esw/port.h>
     14 
     15 
     16 /*** START SDK API COMMON CODE ***/
     17 
     18 extern int _soc_tomahawk2_tdm_mmu_calendar_set(
     19     int                        unit,
     20     soc_port_schedule_state_t *port_schedule_state);
     21 
     22 
     23 extern int _soc_tomahawk2_tdm_idb_calendar_set(
     24     int                        unit,
     25     soc_port_schedule_state_t *port_schedule_state);
     26 
     27 
     28 extern int _soc_tomahawk2_tdm_oversub_group_set(
     29     int                        unit,
     30     soc_port_schedule_state_t *port_schedule_state);
     31 
     32 
     33 extern int _soc_tomahawk2_tdm_oversub_group_set_sel(
     34     int unit,
     35     soc_port_schedule_state_t *port_schedule_state,
     36     int set_idb, int set_mmu);
     37 
     38 
     39 extern void _soc_tomahawk2_speed_to_ovs_class_mapping(int  unit,
     40                                                       int  speed,
     41                                                       int *ovs_class);
     42 
     43 extern void soc_tomahawk2_get_hsp_info(int  unit,
     44                                         int  speed,
     45                                         int  is_idb,
     46                                         int  is_mmu,
     47                                         int *is_hsp,
     48                                         int *same_spacing);
     49 
     50 extern void soc_tomahawk2_port_ratio_get(
     51     int unit,
     52     soc_port_schedule_state_t *port_schedule_state,
     53     int clport, int *mode, int prev_or_new);
     54 
     55 
     56 extern int _soc_tomahawk2_tdm_pkt_shaper_calendar_set(
     57     int unit,
     58     soc_port_schedule_state_t *port_schedule_state);
     59 
     60 
     61 extern int _soc_tomahawk2_tdm_idb_opportunistic_set(
     62     int unit,
     63     soc_port_schedule_state_t *port_schedule_state, int cpu_op_en,
     64     int lb_opp_en, int opp1_port_en, int opp2_port_en, int opp_ovr_sub_en);
     65 
     66 
     67 extern int _soc_tomahawk2_tdm_mmu_opportunistic_set(
     68     int unit, soc_port_schedule_state_t *port_schedule_state,
     69     int cpu_op_en, int lb_opp_en, int opp1_port_en, int opp2_port_en,
     70     int opp_ovr_sub_en);
     71 
     72 
     73 extern int _soc_tomahawk2_tdm_idb_hsp_set(
     74     int unit,
     75     soc_port_schedule_state_t *port_schedule_state);
     76 
     77 
     78 extern int _soc_tomahawk2_tdm_mmu_hsp_set(
     79     int unit,
     80     soc_port_schedule_state_t *port_schedule_state);
     81 
     82 
     83 extern int _soc_tomahawk2_tdm_idb_ppe_credit_set(
     84     int unit, soc_port_schedule_state_t *port_schedule_state,
     85     int full_credit_threshold_0,
     86     int opp_credit_threshold_0,
     87     int full_credit_threshold_1,
     88     int opp_credit_threshold_1 );
     89 
     90 
     91 extern int _soc_tomahawk2_tdm_calculation(
     92     int unit,
     93     soc_port_schedule_state_t *port_schedule_state);
     94 
     95 
     96 extern void soc_tomahawk2_pipe_map_get(
     97     int     unit,
     98     soc_port_schedule_state_t *port_schedule_state, uint32 *pipe_map);
     99 
    100 
    101 extern int soc_tomahawk2_tdm_init(
    102     int unit,
    103     soc_port_schedule_state_t *
    104     port_schedule_state);
    105 
    106 
    107 extern int _soc_tomahawk2_tdm_idb_dpp_ctrl_set(
    108     int unit, soc_port_schedule_state_t *port_schedule_state,
    109     int credits);
    110 
    111 
    112 extern void soc_tomahawk2_ovs_pipe_map_get(
    113     int unit, soc_port_schedule_state_t *port_schedule_state,
    114     uint32 *ovs_pipe_map);
    115 
    116 
    117 extern void soc_print_port_schedule_state(
    118     int unit, soc_port_schedule_state_t *port_schedule_state);
    119 
    120 
    121 extern void soc_print_port_map(int unit, soc_port_map_type_t *port_map);
    122 
    123 
    124 extern void soc_print_tdm_schedule_slice( int unit, 
    125     soc_tdm_schedule_t *tdm_schedule, int hpipe, int is_ing);
    126 
    127 
    128 extern void soc_print_port_resource(int unit,
    129     soc_port_resource_t *port_resource, int entry_num);
    130 
    131 extern void
    132 soc_tomahawk2_port_schedule_speed_remap(
    133     int  unit,
    134     soc_port_schedule_state_t *port_schedule_state);
    135 
    136 extern int
    137 soc_tomahawk2_tdm_get_tdm_speed(
    138     int unit,
    139     soc_port_schedule_state_t *port_schedule_state,
    140     int log_port,
    141     int prev_or_new,
    142     int *speed,
    143     int *num_lanes);
    144 
    145 /*** END SDK API COMMON CODE ***/
    146 
    147 #endif	/* !_SOC_TOMAHAWK2_TDM_H_ */