rate.h (2711B)
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-2020 Broadcom Inc. All rights reserved. 7 * 8 * DO NOT EDIT THIS FILE! 9 * This file is auto-generated. 10 * Edits to this file will be lost when it is regenerated. 11 */ 12 13 #ifndef __BCMX_RATE_H__ 14 #define __BCMX_RATE_H__ 15 16 #include <bcm/types.h> 17 #include <bcmx/bcmx.h> 18 #include <bcmx/lport.h> 19 #include <bcm/rate.h> 20 21 /* 22 * Configure/retrieve rate limit and on/off state of DLF, MCAST, and 23 * BCAST limiting. 24 */ 25 extern int bcmx_rate_set( 26 int val, 27 int flags); 28 29 /* 30 * Configure/retrieve rate limit and on/off state of DLF, MCAST, and 31 * BCAST limiting. 32 */ 33 extern int bcmx_rate_get( 34 int *val, 35 int *flags); 36 37 /* 38 * Configure or retrieve rate limit for specified packet type on given 39 * port. 40 */ 41 extern int bcmx_rate_mcast_set( 42 int limit, 43 int flags, 44 bcmx_lport_t port); 45 46 /* 47 * Configure or retrieve rate limit for specified packet type on given 48 * port. 49 */ 50 extern int bcmx_rate_mcast_get( 51 int *limit, 52 int *flags, 53 bcmx_lport_t port); 54 55 /* 56 * Configure or retrieve rate limit for specified packet type on given 57 * port. 58 */ 59 extern int bcmx_rate_dlfbc_set( 60 int limit, 61 int flags, 62 bcmx_lport_t port); 63 64 /* 65 * Configure or retrieve rate limit for specified packet type on given 66 * port. 67 */ 68 extern int bcmx_rate_dlfbc_get( 69 int *limit, 70 int *flags, 71 bcmx_lport_t port); 72 73 /* 74 * Configure or retrieve rate limit for specified packet type on given 75 * port. 76 */ 77 extern int bcmx_rate_bcast_set( 78 int limit, 79 int flags, 80 bcmx_lport_t port); 81 82 /* 83 * Configure or retrieve rate limit for specified packet type on given 84 * port. 85 */ 86 extern int bcmx_rate_bcast_get( 87 int *limit, 88 int *flags, 89 bcmx_lport_t port); 90 91 /* 92 * Front ends to bcmx_*_rate_set/get functions. Uses a single data 93 * structure to write into all the 3 rate control registers. 94 */ 95 extern int bcmx_rate_type_set( 96 bcm_rate_limit_t *rl); 97 98 /* 99 * Front ends to bcmx_*_rate_set/get functions. Uses a single data 100 * structure to write into all the 3 rate control registers. 101 */ 102 extern int bcmx_rate_type_get( 103 bcm_rate_limit_t *rl); 104 105 /* 106 * Configure/retrieve metering rate limit for specified packet type on 107 * given port. 108 */ 109 extern int bcmx_rate_bandwidth_set( 110 bcmx_lport_t port, 111 int flags, 112 uint32 kbits_sec, 113 uint32 kbits_burst); 114 115 /* 116 * Configure/retrieve metering rate limit for specified packet type on 117 * given port. 118 */ 119 extern int bcmx_rate_bandwidth_get( 120 bcmx_lport_t port, 121 int flags, 122 uint32 *kbits_sec, 123 uint32 *kbits_burst); 124 125 #endif /* __BCMX_RATE_H__ */