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_field.h (3282B)


      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_FIELD_H
     13 #define _BCM_INT_FT_FIELD_H
     14 
     15 #include <soc/defs.h>
     16 
     17 #if defined(BCM_FLOWTRACKER_SUPPORT)
     18 #include <bcm/flowtracker.h>
     19 
     20 /*
     21  * Typedef:
     22  *   ALU Data flags.
     23  * Purpose:
     24  */
     25 typedef enum _bcm_field_ft_alu_data_e {
     26     _bcmFieldFtAluDataTcpFlagsFIN,
     27 
     28     _bcmFieldFtAluDataTcpFlagsSYN,
     29 
     30     _bcmFieldFtAluDataTcpFlagsRST,
     31 
     32     _bcmFieldFtAluDataTcpFlagsPSH,
     33 
     34     _bcmFieldFtAluDataTcpFlagsACK,
     35 
     36     _bcmFieldFtAluDataTcpFlagsURG,
     37 
     38     _bcmFieldFtAluDataTcpFlagsECE,
     39 
     40     _bcmFieldFtAluDataTcpFlagsCWR,
     41 
     42     _bcmFieldFtAluDataCount
     43 } _bcm_field_ft_alu_data_t;
     44 
     45 #define _BCM_FIELD_FT_ALU_DATA_STRINGS \
     46 { \
     47     "TcpFlagsFIN", \
     48     "TcpFlagsSYN", \
     49     "TcpFlagsRST", \
     50     "TcpFlagsPSH", \
     51     "TcpFlagsACK", \
     52     "TcpFlagsURG", \
     53     "TcpFlagsECE", \
     54     "TcpFLagsCWR", \
     55     "AluDataCount", \
     56 }
     57 
     58 /* Extract session key and session data */
     59 extern int
     60 _bcm_field_ft_group_tracking_info_process(
     61         int unit,
     62         bcm_flowtracker_group_t id,
     63         uint8 save_output);
     64 
     65 /* Clear FT group for extraction info */
     66 extern int
     67 _bcm_field_ft_group_extraction_clear(
     68         int unit,
     69         bcm_flowtracker_group_t id);
     70 
     71 /* Setup Group Control to FTFP Entries */
     72 extern int
     73 _bcm_field_ft_group_control_set(
     74         int unit,
     75         bcm_flowtracker_group_t id,
     76         bcm_flowtracker_group_control_type_t control_type,
     77         int param);
     78 
     79 /* Mark FT Group in FTFP Entries as Stale */
     80 extern int
     81 _bcm_field_ft_group_invalidate(int unit);
     82 
     83 /* Get min and max values supported for tracking params */
     84 extern int
     85 _bcm_field_ft_tracking_param_range_get(
     86         int unit,
     87         bcm_flowtracker_tracking_param_type_t param,
     88         uint16 custom_id,
     89         int *num_bits,
     90         uint32 *min_value,
     91         uint32 *max_value);
     92 
     93 extern int
     94 _bcm_field_ft_tracking_param_type_get(
     95         int unit,
     96         bcm_flowtracker_tracking_param_type_t param,
     97         uint16 custom_id, uint32 flags, uint16 *ft_type_bmp);
     98 
     99 /* Get alu data related config. */
    100 extern int
    101 _bcm_field_ft_alu_data_config_get(
    102         int unit,
    103         bcm_flowtracker_group_t id,
    104         _bcm_field_ft_alu_data_t alu_data,
    105         int *offset,
    106         int *width);
    107 
    108 /* Install Session Profiles */
    109 extern int
    110 _bcm_field_ft_session_profiles_install(
    111         int unit,
    112         bcm_flowtracker_group_t id);
    113 
    114 /* Un-install Session Profiles */
    115 extern int
    116 _bcm_field_ft_session_profiles_uninstall(
    117         int unit,
    118         bcm_flowtracker_group_t id);
    119 
    120 /* Recover Session Profiles */
    121 extern int
    122 _bcm_field_ft_session_profiles_recover(
    123         int unit,
    124         bcm_flowtracker_group_t id);
    125 
    126 /* Check if UDF tracking param supported */
    127 extern int
    128 _bcm_field_ft_udf_tracking_param_supported(
    129         int unit,
    130         bcm_flowtracker_tracking_param_type_t param,
    131         uint16 *width);
    132 
    133 /* Show tracking param and stages supported */
    134 extern int
    135 _bcm_field_ft_tracking_param_show(int unit);
    136 
    137 #endif /* BCM_FLOWTRACKER_SUPPORT */
    138 #endif /* _BCM_INT_FT_FIELD_H */