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

ft_interface.h (4021B)


      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-2020 Broadcom Inc. All rights reserved.
      6  *
      7  * File:        ft_field.h
      8  * Purpose:     Flowtracker module specific routines in flowtracker
      9  *              stage in FP.
     10  */
     11 
     12 #ifndef _BCM_INT_FT_API_H
     13 #define _BCM_INT_FT_API_H
     14 
     15 #include <soc/defs.h>
     16 
     17 #if defined(BCM_FLOWTRACKER_SUPPORT)
     18 #include <bcm/flowtracker.h>
     19 
     20 /* API from Field module to Flowtracker module */
     21 extern int
     22 bcmi_esw_ft_group_hw_install(int unit,
     23         bcm_flowtracker_group_t id);
     24 
     25 extern int
     26 bcmi_esw_ft_group_hw_uninstall(int unit,
     27         bcm_flowtracker_group_t id);
     28 
     29 extern int
     30 bcmi_esw_ft_group_extraction_mode_set(int unit,
     31         int key_or_data,
     32         bcm_flowtracker_group_t id,
     33         bcmi_ft_group_key_data_mode_t mode);
     34 
     35 extern int
     36 bcmi_esw_ft_group_extraction_hw_info_set(int unit,
     37         bcm_flowtracker_group_t id,
     38         int key_or_data,
     39         int num_elements,
     40         bcmi_ft_hw_extractor_info_t *elements);
     41 
     42 extern int
     43 bcmi_esw_ft_group_extraction_hw_info_get(int unit,
     44         int key_or_data,
     45         bcm_flowtracker_group_t id,
     46         int max_elements,
     47         bcmi_ft_hw_extractor_info_t *elements,
     48         int *num_elements);
     49 
     50 extern int
     51 bcmi_esw_ft_group_extraction_alu_info_set(int unit,
     52         bcm_flowtracker_group_t id,
     53         int key_or_data,
     54         int num_alu_info,
     55         bcmi_ft_group_alu_info_t *alu_info);
     56 
     57 extern int
     58 bcmi_esw_ft_group_extraction_alu_info_get(int unit,
     59         bcm_flowtracker_group_t id,
     60         int key_or_data,
     61         int max_alu_info,
     62         bcmi_ft_group_alu_info_t *alu_info,
     63         int *num_alu_info);
     64 
     65 extern int
     66 bcmi_esw_ft_group_param_retrieve(int unit,
     67         bcm_flowtracker_group_t id,
     68         bcmi_ft_group_params_t param,
     69         int *arg);
     70 
     71 extern int
     72 bcmi_esw_ft_group_param_update(int unit,
     73         bcm_flowtracker_group_t id,
     74         bcmi_ft_group_params_t param,
     75         bcmi_ft_group_params_operation_t opr,
     76         int arg);
     77 
     78 extern int
     79 bcmi_esw_ft_group_entry_add_check(int unit,
     80         bcm_flowtracker_group_type_t group_type,
     81         bcm_flowtracker_group_t id);
     82 
     83 extern int
     84 bcmi_esw_ft_check_action_num_operands_get(int unit,
     85         bcm_flowtracker_check_action_t action,
     86         int *num_operands);
     87 
     88 extern int
     89 bcmi_esw_ft_group_tracking_param_mask_status_get(int unit,
     90         bcm_flowtracker_tracking_param_info_t *tp_info,
     91         uint16 qual_size,
     92         int *mask_present,
     93         int *partial_mask);
     94 
     95 extern int
     96 bcmi_esw_ft_type_support_check(int unit,
     97         bcmi_ft_type_t ft_type,
     98         int *support);
     99 
    100 extern int
    101 bcmi_esw_ft_group_state_transition_type_get(int unit,
    102         bcm_flowtracker_group_t id,
    103         bcm_flowtracker_state_transition_type_t *st_type);
    104 
    105 extern int
    106 bcmi_esw_ft_group_checks_bitmap_get(
    107         int unit,
    108         bcm_flowtracker_group_t id,
    109         uint32 num_checks,
    110         bcm_field_flowtrackercheck_t *check_list,
    111         uint32 *check_bmp_data,
    112         uint32 *check_bmp_mask);
    113 
    114 extern int
    115 bcmi_esw_ft_group_checks_list_get(
    116         int unit,
    117         bcm_flowtracker_group_t id,
    118         uint32 check_bmp_data,
    119         uint32 check_bmp_mask,
    120         uint32 num_checks,
    121         bcm_field_flowtrackercheck_t *check_list,
    122         uint32 *actual_num_checks);
    123 
    124 #if defined(BCM_FLOWTRACKER_V3_SUPPORT)
    125 extern int
    126 bcmi_esw_ftv3_user_entry_entry_add_check(int unit,
    127         bcm_flowtracker_group_type_t group_type,
    128         bcm_flowtracker_group_t id,
    129         int flow_index);
    130 
    131 extern int
    132 bcmi_esw_ftv3_aggregate_class_entry_add_check(int unit,
    133         uint32 aggregate_class);
    134 
    135 extern int
    136 bcmi_esw_ftv3_aggregate_class_ref_update(int unit,
    137         uint32 aggregate_class,
    138         int count);
    139 
    140 extern int
    141 bcmi_esw_ftv3_user_entry_ref_update(int unit,
    142         bcm_flowtracker_group_type_t group_type,
    143         int flow_index,
    144         int count);
    145 
    146 #endif /* BCM_FLWOTRACKER_V3_SUPPORT */
    147 #endif /* BCM_FLOWTRACKER_SUPPORT */
    148 #endif /* _BCM_INT_FT_API_H */