scorpion.h (2774B)
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: scorpion.h 8 * Purpose: Function declarations for Scorpion bcm functions 9 */ 10 11 #ifndef _BCM_INT_SCORPION_H_ 12 #define _BCM_INT_SCORPION_H_ 13 #if defined(BCM_SCORPION_SUPPORT) 14 #include <bcm_int/esw/mbcm.h> 15 #ifdef BCM_FIELD_SUPPORT 16 #include <bcm_int/esw/field.h> 17 #endif /* BCM_FIELD_SUPPORT */ 18 19 /**************************************************************** 20 * 21 * Scorpion functions 22 */ 23 #if defined(INCLUDE_L3) 24 extern int _bcm_sc_defip_init(int unit); 25 extern int _bcm_sc_defip_deinit(int unit); 26 #endif /* INCLUDE_L3 */ 27 28 #if defined(BCM_FIELD_SUPPORT) 29 30 extern int _bcm_field_sc_init(int unit, _field_control_t *fc); 31 32 #endif /* BCM_FIELD_SUPPORT */ 33 34 extern int bcm_sc_cosq_port_bandwidth_set(int unit, bcm_port_t port, 35 bcm_cos_queue_t cosq, 36 uint32 kbits_sec_min, 37 uint32 kbits_sec_max, 38 uint32 kbits_sec_burst, 39 uint32 flags); 40 extern int bcm_sc_cosq_port_bandwidth_get(int unit, bcm_port_t port, 41 bcm_cos_queue_t cosq, 42 uint32 *kbits_sec_min, 43 uint32 *kbits_sec_max, 44 uint32 *kbits_sec_burst, 45 uint32 *flags); 46 extern int bcm_sc_cosq_discard_set(int unit, uint32 flags); 47 extern int bcm_sc_cosq_discard_get(int unit, uint32 *flags); 48 extern int bcm_sc_cosq_discard_port_set(int unit, bcm_port_t port, 49 bcm_cos_queue_t cosq, uint32 color, 50 int drop_start, int drop_slope, 51 int average_time); 52 extern int bcm_sc_cosq_discard_port_get(int unit, bcm_port_t port, 53 bcm_cos_queue_t cosq, uint32 color, 54 int *drop_start, int *drop_slope, 55 int *average_time); 56 57 extern int bcm_sc_cosq_gport_sched_set(int unit, bcm_gport_t gport, 58 bcm_cos_queue_t cosq, int mode, 59 int weight); 60 extern int bcm_sc_cosq_gport_sched_get(int unit, bcm_gport_t gport, 61 bcm_cos_queue_t cosq, int *mode, 62 int *weight); 63 64 #endif /* BCM_SCORPION_SUPPORT */ 65 66 #endif /* !_BCM_INT_SCORPION_H_ */