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

oob.h (6130B)


      1 /*
      2  * 
      3  *
      4  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      5  * 
      6  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      7  */
      8 
      9 #ifndef _BCM_OOB_H
     10 #define _BCM_OOB_H
     11 
     12 #include <soc/defs.h>
     13 #include <soc/types.h>
     14 
     15 #define _BCM_OOB_UNIT_DRIVER(u)   _bcm_oob_unit_driver[(u)]
     16 
     17 typedef int (*_bcm_oob_fc_tx_config_set_f)(int, bcm_oob_fc_tx_config_t*);
     18 typedef int (*_bcm_oob_fc_tx_config_get_f)(int, bcm_oob_fc_tx_config_t*);
     19 typedef int (*_bcm_oob_fc_tx_info_get_f)(int, bcm_oob_fc_tx_info_t*);
     20 
     21 typedef int (*_bcm_oob_fc_rx_port_tc_mapping_multi_set_f)(int, bcm_oob_fc_rx_intf_id_t,
     22                                                           bcm_gport_t, int, uint32*,
     23                                                           uint32*);
     24 typedef int (*_bcm_oob_fc_rx_port_tc_mapping_multi_get_f)(int, bcm_oob_fc_rx_intf_id_t,
     25                                                           bcm_gport_t, int, uint32*,
     26                                                           uint32*, int*);
     27 typedef int (*_bcm_oob_fc_rx_port_tc_mapping_set_f)(int, bcm_oob_fc_rx_intf_id_t,
     28                                                     bcm_gport_t, uint32, uint32);
     29 typedef int (*_bcm_oob_fc_rx_port_tc_mapping_get_f)(int, bcm_oob_fc_rx_intf_id_t,
     30                                                     bcm_gport_t, uint32, uint32*);
     31 typedef int (*_bcm_oob_fc_rx_config_set_f)(int, bcm_oob_fc_rx_intf_id_t,
     32                                                 bcm_oob_fc_rx_config_t*, int,
     33                                                 bcm_gport_t*);
     34 typedef int (*_bcm_oob_fc_rx_config_get_f)(int, bcm_oob_fc_rx_intf_id_t,
     35                                                 bcm_oob_fc_rx_config_t*, int,
     36                                                 bcm_gport_t*, int*);
     37 typedef int (*_bcm_oob_fc_rx_port_offset_get_f)(int, bcm_oob_fc_rx_intf_id_t,
     38                                                 bcm_gport_t, uint32*);
     39 
     40 typedef int (*_bcm_oob_stats_config_set_f)(int unit, bcm_oob_stats_config_t *config);
     41 typedef int (*_bcm_oob_stats_config_get_f)(int unit, bcm_oob_stats_config_t *config);
     42 typedef int (*_bcm_oob_stats_pool_mapping_multi_set_f)(int unit, int array_count,
     43                                                        int *offset_array, uint8 *dir_array,
     44                                                        bcm_service_pool_id_t *pool_array);
     45 typedef int (*_bcm_oob_stats_pool_mapping_multi_get_f)(int unit, int array_max,
     46                                                        int *offset_array, uint8 *dir_array,
     47                                                        bcm_service_pool_id_t *pool_array,
     48                                                        int *array_count);
     49 typedef int (*_bcm_oob_stats_pool_mapping_set_f)(int unit, int offset, uint8 dir,
     50                                                 bcm_service_pool_id_t pool);
     51 typedef int (*_bcm_oob_stats_pool_mapping_get_f)(int unit, int offset, uint8 *dir,
     52                                                 bcm_service_pool_id_t *pool);
     53 typedef int (*_bcm_oob_stats_queue_mapping_multi_set_f)(int unit, int array_count,
     54                                                      int *offset_array,
     55                                                      bcm_gport_t *gport_array);
     56 typedef int (*_bcm_oob_stats_queue_mapping_multi_get_f)(int unit, int array_max,
     57                                                        int *offset_array,
     58                                                        bcm_gport_t *gport_array,
     59                                                        int *array_count);
     60 typedef int (*_bcm_oob_stats_queue_mapping_set_f)(int unit, int offset,
     61                                                   bcm_gport_t gport);
     62 typedef int (*_bcm_oob_stats_queue_mapping_get_f)(int unit, int offset,
     63                                                   bcm_gport_t *gport);
     64 
     65 typedef struct _bcm_oob_unit_driver_s {
     66     _bcm_oob_fc_tx_config_set_f                     fc_tx_config_set;
     67     _bcm_oob_fc_tx_config_get_f                     fc_tx_config_get;
     68     _bcm_oob_fc_tx_info_get_f                       fc_tx_info_get;
     69     _bcm_oob_fc_rx_port_tc_mapping_multi_set_f      fc_rx_port_tc_mapping_multi_set;
     70     _bcm_oob_fc_rx_port_tc_mapping_multi_get_f      fc_rx_port_tc_mapping_multi_get;
     71     _bcm_oob_fc_rx_port_tc_mapping_set_f            fc_rx_port_tc_mapping_set;
     72     _bcm_oob_fc_rx_port_tc_mapping_get_f            fc_rx_port_tc_mapping_get;
     73     _bcm_oob_fc_rx_config_set_f                     fc_rx_config_set;
     74     _bcm_oob_fc_rx_config_get_f                     fc_rx_config_get;
     75     _bcm_oob_fc_rx_port_offset_get_f                fc_rx_port_offset_get;
     76     _bcm_oob_stats_config_set_f                     stats_config_set;
     77     _bcm_oob_stats_config_get_f                     stats_config_get;
     78     _bcm_oob_stats_pool_mapping_multi_set_f         stats_pool_mapping_multi_set;
     79     _bcm_oob_stats_pool_mapping_multi_get_f         stats_pool_mapping_multi_get;
     80     _bcm_oob_stats_pool_mapping_set_f               stats_pool_mapping_set;
     81     _bcm_oob_stats_pool_mapping_get_f               stats_pool_mapping_get;
     82     _bcm_oob_stats_queue_mapping_multi_set_f        stats_queue_mapping_multi_set;
     83     _bcm_oob_stats_queue_mapping_multi_get_f        stats_queue_mapping_multi_get;
     84     _bcm_oob_stats_queue_mapping_set_f              stats_queue_mapping_set;
     85     _bcm_oob_stats_queue_mapping_get_f              stats_queue_mapping_get;
     86 } _bcm_oob_unit_driver_t;
     87 
     88 extern int _bcm_oob_init(int unit);
     89 extern void _bcm_oob_deinit(int unit);
     90 
     91 #if defined(BCM_TRIDENT3_SUPPORT)
     92 extern int bcm_oob_td3_init(int unit);
     93 #endif /* BCM_TOMAHAWK_SUPPORT */
     94 
     95 
     96 #if defined(BCM_TOMAHAWK_SUPPORT)
     97 extern int bcm_oob_th_init(int unit);
     98 #endif /* BCM_TOMAHAWK_SUPPORT */
     99 
    100 #if defined(BCM_TOMAHAWK3_SUPPORT)
    101 extern int bcm_oob_th3_init(int unit);
    102 #endif /* BCM_TOMAHAWK3_SUPPORT */
    103 
    104 #if defined(BCM_APACHE_SUPPORT)
    105 extern int bcm_oob_ap_init(int unit);
    106 #endif /* BCM_APACHE_SUPPORT */
    107 
    108 #if defined(BCM_KATANA2_SUPPORT)
    109 extern int bcm_oob_kt2_init(int unit);
    110 #endif /* BCM_KATANA2_SUPPORT */
    111 #endif /* _BCM_OOB_H */