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

qos.h (2881B)


      1 /* 
      2  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      3  * 
      4  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      5  *
      6  * This file contains QOS module definitions internal to the BCM library.
      7  */
      8 
      9 #ifndef _BCM_INT_QOS_H
     10 #define _BCM_INT_QOS_H
     11 
     12 #include <bcm/qos.h>
     13 
     14 #define _BCM_QOS_MAP_TYPE_ING_VFT_PRI_MAP    6
     15 #define _BCM_QOS_MAP_TYPE_EGR_VFT_PRI_MAP    7
     16 #define _BCM_QOS_MAP_TYPE_EGR_VSAN_PRI_MAP   8
     17 #define _BCM_QOS_MAP_TYPE_ING_L2_VLAN_ETAG_MAP   9
     18 #define _BCM_QOS_MAP_TYPE_EGR_L2_VLAN_ETAG_MAP   10
     19 #define _BCM_QOS_VFT_MAP_SHIFT               11
     20 #ifdef BCM_HURRICANE3_SUPPORT
     21 #define _BCM_QOS_MAP_TYPE_MIML_ING_PRI_CNG_MAP    12
     22 #define _BCM_QOS_MAP_TYPE_MIML_EGR_MPLS_MAPS      13
     23 #endif
     24 
     25 #define QOS_MAP_IS_FCOE(map_id)                                                \
     26   (  ((map_id >> _BCM_QOS_VFT_MAP_SHIFT) == _BCM_QOS_MAP_TYPE_ING_VFT_PRI_MAP) \
     27   || ((map_id >> _BCM_QOS_VFT_MAP_SHIFT) == _BCM_QOS_MAP_TYPE_EGR_VFT_PRI_MAP) \
     28   || ((map_id >> _BCM_QOS_VFT_MAP_SHIFT) == _BCM_QOS_MAP_TYPE_EGR_VSAN_PRI_MAP)\
     29   )
     30 
     31 #define QOS_MAP_IS_L2_VLAN_ETAG(map_id)                                        \
     32   (  ((map_id >> _BCM_QOS_VFT_MAP_SHIFT) == _BCM_QOS_MAP_TYPE_ING_L2_VLAN_ETAG_MAP) \
     33   || ((map_id >> _BCM_QOS_VFT_MAP_SHIFT) == _BCM_QOS_MAP_TYPE_EGR_L2_VLAN_ETAG_MAP) \
     34   )
     35 
     36 #define QOS_FLAGS_ARE_FCOE(flags) \
     37   ( (flags & BCM_QOS_MAP_VFT) || (flags & BCM_QOS_MAP_VSAN) )
     38 
     39 #ifdef BCM_WARM_BOOT_SUPPORT
     40 extern int _bcm_esw_qos_sync(int unit);
     41 #endif /* BCM_WARM_BOOT_SUPPORT */
     42 
     43 #ifdef BCM_WARM_BOOT_SUPPORT_SW_DUMP
     44 extern void _bcm_esw_qos_sw_dump(int unit);
     45 #endif /* BCM_WARM_BOOT_SUPPORT_SW_DUMP */
     46 
     47 #ifdef BCM_TRIDENT2_SUPPORT
     48 extern int bcm_td2_qos_get_egr_vsan_hw_idx(int unit, int egr_map_id, 
     49                                             int *hw_index);
     50 extern int bcm_td2_vsan_profile_to_qos_id(int unit, int profile_num, 
     51                                           int *egr_map);
     52 extern int bcm_td2_qos_egr_etag_id2profile(int unit, int map_id, int *profile_num);
     53 extern int bcm_td2_qos_egr_etag_profile2id(int unit, int profile_num, int *map_id);
     54 #endif
     55 
     56 #ifdef BCM_TOMAHAWK_SUPPORT
     57 extern int bcm_th_qos_egr_etag_id2profile(int unit, int map_id, int *profile_num);
     58 extern int bcm_th_qos_egr_etag_profile2id(int unit, int profile_num, int *map_id);
     59 #endif
     60 
     61 #ifdef BCM_TRIUMPH2_SUPPORT
     62 extern void
     63 _bcm_tr2_qos_id_update(int unit, uint32 dscp_map_id, uint32 new_dscp_map_id);
     64 #endif
     65 
     66 #if defined(BCM_HGPROXY_COE_SUPPORT)
     67 extern int bcmi_xgs5_subport_egr_subtag_dot1p_map_add(int unit,
     68                                                       bcm_qos_map_t *map);
     69 extern int bcmi_xgs5_subport_egr_subtag_dot1p_map_delete(int unit,
     70                                                          bcm_qos_map_t *map);
     71 #endif /* BCM_HGPROXY_COE_SUPPORT */
     72 
     73 #endif	/* !_BCM_INT_QOS_H */