|
OpenNSL API Guide and Reference Manual
|
Data Structures | |
| struct | opennsl_cosq_bst_profile_s |
| struct | opennsl_cosq_egress_multicast_config_s |
| multicast configuration settings More... | |
| struct | opennsl_cosq_gport_discard_s |
| For Virtual output queues (system ports) More... | |
| struct | opennsl_cosq_gport_info_s |
| gport information related to getting a handle More... | |
| struct | opennsl_cosq_gport_stat_profile_s |
| Statistics Profile. More... | |
Files | |
| file | cosq.h |
| file | cosqX.h |
Macros | |
| #define | OPENNSL_COSQ_ALL 0x00000001 |
| #define | OPENNSL_COSQ_BW_EAV_MODE 0x00000008 |
| Prioritize selected queue(s) for bandwidth before non-selected queue(s). | |
| #define | OPENNSL_COSQ_BW_LLFC 0x00000010 |
| Link Level Flow Control setting. | |
| #define | OPENNSL_COSQ_BW_NOT_COMMIT 0x00000040 |
| Set rate to SW DB only, commit to HW is done when calling the API with the same GPort type and without NOT_COMMIT flag. | |
| #define | OPENNSL_COSQ_BW_PACKET_MODE 0x00000020 |
| The bandwidth specified is in packets per second instead of kbits per second. | |
| #define | OPENNSL_COSQ_DEFICIT_ROUND_ROBIN 0x05 |
| XGS3 only. | |
| #define | OPENNSL_COSQ_DISCARD_BYTES 0x2000 |
| #define | OPENNSL_COSQ_DISCARD_COLOR_ALL 0x0F00 |
| #define | OPENNSL_COSQ_DISCARD_COLOR_BLACK 0x0800 |
| #define | OPENNSL_COSQ_DISCARD_COLOR_GREEN 0x0100 |
| #define | OPENNSL_COSQ_DISCARD_COLOR_RED 0x0400 |
| #define | OPENNSL_COSQ_DISCARD_COLOR_YELLOW 0x0200 |
| #define | OPENNSL_COSQ_DISCARD_DEVICE 0x10000 |
| #define | OPENNSL_COSQ_DISCARD_DROP_FIRST OPENNSL_COSQ_DISCARD_COLOR_RED |
| #define | OPENNSL_COSQ_DISCARD_ENABLE 0x0001 |
| #define | OPENNSL_COSQ_DISCARD_IFP 0x400000 |
| #define | OPENNSL_COSQ_DISCARD_MARK_CONGESTION 0x4000 |
| #define | OPENNSL_COSQ_DISCARD_NONTCP 0x0004 |
| #define | OPENNSL_COSQ_DISCARD_OUTER_CFI 0x800000 |
| #define | OPENNSL_COSQ_DISCARD_PACKETS 0x1000 |
| #define | OPENNSL_COSQ_DISCARD_PORT 0x8000 |
| #define | OPENNSL_COSQ_DISCARD_PROBABILITY1 0x100000 |
| #define | OPENNSL_COSQ_DISCARD_PROBABILITY2 0x200000 |
| #define | OPENNSL_COSQ_DISCARD_SYSTEM 0x80000 |
| #define | OPENNSL_COSQ_DISCARD_TCP 0x40000 |
| #define | OPENNSL_COSQ_GPORT_DESTMOD_UCAST_QUEUE_GROUP 0x00000010 |
| #define | OPENNSL_COSQ_GPORT_DISABLE 0x00000100 |
| Disable queue, used for OPENNSL_COSQ_GPORT_CALENDAR scheduling discipline. | |
| #define | OPENNSL_COSQ_GPORT_EGRESS_GROUP 0x00000080 |
| #define | OPENNSL_COSQ_GPORT_MCAST_QUEUE 0x00000010 |
| #define | OPENNSL_COSQ_GPORT_MCAST_QUEUE_GROUP 0x00000020 |
| #define | OPENNSL_COSQ_GPORT_OVERLAY 0x00000004 |
| #define | OPENNSL_COSQ_GPORT_SCHEDULER 0x00000002 |
| #define | OPENNSL_COSQ_GPORT_STATS_SHARED 0x00000001 |
| #define | OPENNSL_COSQ_GPORT_SUBSCRIBER 0x00000040 |
| #define | OPENNSL_COSQ_GPORT_UCAST_QUEUE_GROUP 0x00000008 |
| #define | OPENNSL_COSQ_GPORT_WITH_ID 0x00000001 |
| #define | OPENNSL_COSQ_HIGH_PRIORITY -4 |
| #define | OPENNSL_COSQ_LOW_PRIORITY -5 |
| #define | OPENNSL_COSQ_MULTICAST_SCHEDULED 0x00000001 |
| multicast scheduled values are valid | |
| #define | OPENNSL_COSQ_NONE 0x0 |
| Pass through. | |
| #define | OPENNSL_COSQ_PRIO_VALID(prio) ((prio) >= 0 && (prio < 8)) |
| #define | OPENNSL_COSQ_QUEUE_VALID(unit, numq) ((numq) >= 0 && (numq) < NUM_COS(unit)) |
| #define | OPENNSL_COSQ_ROUND_ROBIN 0x02 |
| Weights are ignored. | |
| #define | OPENNSL_COSQ_SP0 0x0C |
| Strict priority level 0. | |
| #define | OPENNSL_COSQ_SP1 0x0D |
| Strict priority level. | |
| #define | OPENNSL_COSQ_STRICT 0x01 |
| Weights are ignored. | |
| #define | OPENNSL_COSQ_WEIGHT_MIN 1 |
| #define | OPENNSL_COSQ_WEIGHT_STRICT 0 |
| #define | OPENNSL_COSQ_WEIGHT_UNLIMITED -1 |
| #define | OPENNSL_COSQ_WEIGHTED_FAIR_QUEUING 0x04 |
| #define | OPENNSL_COSQ_WEIGHTED_ROUND_ROBIN 0x03 |
Functions | |
| int | opennsl_cosq_bst_profile_get (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, opennsl_bst_stat_id_t bid, opennsl_cosq_bst_profile_t *profile) LIB_DLL_EXPORTED |
| Set/Get the BST profile for CosQ objects. | |
| int | opennsl_cosq_bst_profile_set (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, opennsl_bst_stat_id_t bid, opennsl_cosq_bst_profile_t *profile) LIB_DLL_EXPORTED |
| Set/Get the BST profile for CosQ objects. | |
| int | opennsl_cosq_bst_stat_clear (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, opennsl_bst_stat_id_t bid) LIB_DLL_EXPORTED |
| Clear the current statistic/count of specified BST profile. | |
| int | opennsl_cosq_bst_stat_get (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, opennsl_bst_stat_id_t bid, uint32 options, uint64 *value) LIB_DLL_EXPORTED |
| Get the current statistic/count of specified BST profile. | |
| int | opennsl_cosq_bst_stat_multi_get (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, uint32 options, int max_values, opennsl_bst_stat_id_t *id_list, uint64 *values) LIB_DLL_EXPORTED |
| Get the current statistic/count of multiple specified BST profile. | |
| int | opennsl_cosq_bst_stat_sync (int unit, opennsl_bst_stat_id_t bid) LIB_DLL_EXPORTED |
| Sync the HW stats value to SW copy for all or given BST resource. | |
| int | opennsl_cosq_config_get (int unit, int *numq) LIB_DLL_EXPORTED |
| Configure the number of Class of Service Queues (COSQs). | |
| int | opennsl_cosq_config_set (int unit, int numq) LIB_DLL_EXPORTED |
| Configure the number of Class of Service Queues (COSQs). | |
| int | opennsl_cosq_control_get (int unit, opennsl_gport_t port, opennsl_cos_queue_t cosq, opennsl_cosq_control_t type, int *arg) LIB_DLL_EXPORTED |
| Set various features at the gport/cosq level. | |
| int | opennsl_cosq_control_set (int unit, opennsl_gport_t port, opennsl_cos_queue_t cosq, opennsl_cosq_control_t type, int arg) LIB_DLL_EXPORTED |
| Set various features at the gport/cosq level. | |
| int | opennsl_cosq_detach (int unit) LIB_DLL_EXPORTED |
| De-initialize the CoSQ subsystem. | |
| int | opennsl_cosq_discard_get (int unit, uint32 *flags) LIB_DLL_EXPORTED |
| Configure Weighted Random Early Discard (WRED). | |
| int | opennsl_cosq_discard_port_get (int unit, opennsl_port_t port, opennsl_cos_queue_t cosq, uint32 color, int *drop_start, int *drop_slope, int *average_time) LIB_DLL_EXPORTED |
| Configure a port's Weighted Random Early Discard (WRED) parameters. | |
| int | opennsl_cosq_discard_port_set (int unit, opennsl_port_t port, opennsl_cos_queue_t cosq, uint32 color, int drop_start, int drop_slope, int average_time) LIB_DLL_EXPORTED |
| Configure a port's Weighted Random Early Discard (WRED) parameters. | |
| int | opennsl_cosq_discard_set (int unit, uint32 flags) LIB_DLL_EXPORTED |
| Configure Weighted Random Early Discard (WRED). | |
| int | opennsl_cosq_gport_add (int unit, opennsl_gport_t port, int numq, uint32 flags, opennsl_gport_t *gport) LIB_DLL_EXPORTED |
| Allocate/Retrieve unicast queue group and scheduler queue group configuration. | |
| int | opennsl_cosq_gport_attach (int unit, opennsl_gport_t sched_port, opennsl_gport_t input_port, opennsl_cos_queue_t cosq) LIB_DLL_EXPORTED |
| Attach/Detach the output of a GPORT to the input of a scheduler GPORT. | |
| int | opennsl_cosq_gport_attach_get (int unit, opennsl_gport_t sched_port, opennsl_gport_t *input_port, opennsl_cos_queue_t *cosq) LIB_DLL_EXPORTED |
| Attach/Detach the output of a GPORT to the input of a scheduler GPORT. | |
| int | opennsl_cosq_gport_bandwidth_get (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, uint32 *kbits_sec_min, uint32 *kbits_sec_max, uint32 *flags) LIB_DLL_EXPORTED |
| Configure/Retrieve bandwidth setting. | |
| int | opennsl_cosq_gport_bandwidth_set (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, uint32 kbits_sec_min, uint32 kbits_sec_max, uint32 flags) LIB_DLL_EXPORTED |
| Configure/Retrieve bandwidth setting. | |
| int | opennsl_cosq_gport_child_get (int unit, opennsl_gport_t in_gport, opennsl_cos_queue_t cosq, opennsl_gport_t *out_gport) LIB_DLL_EXPORTED |
| Get the child node GPORT atatched to N-th index (cosq) of the scheduler GPORT. | |
| int | opennsl_cosq_gport_delete (int unit, opennsl_gport_t gport) LIB_DLL_EXPORTED |
| Deletes queue group. | |
| int | opennsl_cosq_gport_detach (int unit, opennsl_gport_t sched_port, opennsl_gport_t input_port, opennsl_cos_queue_t cosq) LIB_DLL_EXPORTED |
| Attach/Detach the output of a GPORT to the input of a scheduler GPORT. | |
| int | opennsl_cosq_gport_discard_get (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, opennsl_cosq_gport_discard_t *discard) LIB_DLL_EXPORTED |
| Configure/Retrieve discard setting. | |
| int | opennsl_cosq_gport_discard_set (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, opennsl_cosq_gport_discard_t *discard) LIB_DLL_EXPORTED |
| Configure/Retrieve discard setting. | |
| int | opennsl_cosq_gport_egress_map_get (int unit, opennsl_gport_t gport, opennsl_cos_t ingress_pri, opennsl_color_t ingress_dp, opennsl_cos_queue_t *offset) LIB_DLL_EXPORTED |
| Configure/retrieve {traffic class, dp} mapping to egress queue on a port. | |
| int | opennsl_cosq_gport_egress_map_set (int unit, opennsl_gport_t gport, opennsl_cos_t ingress_pri, opennsl_color_t ingress_dp, opennsl_cos_queue_t offset) LIB_DLL_EXPORTED |
| Configure/retrieve {traffic class, dp} mapping to egress queue on a port. | |
| int | opennsl_cosq_gport_egress_multicast_config_get (int unit, opennsl_gport_t gport, opennsl_cos_t ingress_pri, opennsl_color_t ingress_dp, uint32 flags, opennsl_cosq_egress_multicast_config_t *config) LIB_DLL_EXPORTED |
| Configure/retrieve {traffic class, dp} mapping to multicast egress configuration on a port. | |
| int | opennsl_cosq_gport_egress_multicast_config_set (int unit, opennsl_gport_t gport, opennsl_cos_t ingress_pri, opennsl_color_t ingress_dp, uint32 flags, opennsl_cosq_egress_multicast_config_t *config) LIB_DLL_EXPORTED |
| Configure/retrieve {traffic class, dp} mapping to multicast egress configuration on a port. | |
| int | opennsl_cosq_gport_enable_get (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, int *enable) LIB_DLL_EXPORTED |
| Configure/Retrieve enable/disable state of a cos level in a queue group. | |
| int | opennsl_cosq_gport_enable_set (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, int enable) LIB_DLL_EXPORTED |
| Configure/Retrieve enable/disable state of a cos level in a queue group. | |
| int | opennsl_cosq_gport_get (int unit, opennsl_gport_t gport, opennsl_gport_t *physical_port, int *num_cos_levels, uint32 *flags) LIB_DLL_EXPORTED |
| Allocate/Retrieve unicast queue group and scheduler queue group configuration. | |
| int | opennsl_cosq_gport_handle_get (int unit, opennsl_cosq_gport_type_t gport_type, opennsl_cosq_gport_info_t *gport_info) LIB_DLL_EXPORTED |
| Getting a gport handle. | |
| int | opennsl_cosq_gport_mapping_get (int unit, opennsl_port_t ing_port, opennsl_cos_t int_pri, uint32 flags, opennsl_gport_t *gport, opennsl_cos_queue_t *cosq) LIB_DLL_EXPORTED |
| Get or set the mapping from internal priority to CoS queue. | |
| int | opennsl_cosq_gport_mapping_set (int unit, opennsl_port_t ing_port, opennsl_cos_t int_pri, uint32 flags, opennsl_gport_t gport, opennsl_cos_queue_t cosq) LIB_DLL_EXPORTED |
| Get or set the mapping from internal priority to CoS queue. | |
| int | opennsl_cosq_gport_sched_config_get (int unit, opennsl_gport_t gport, int sched_mode, int int_pri, uint32 *flags) LIB_DLL_EXPORTED |
| Mapping/redirecting scheduling discipline to Egress FIFO. | |
| int | opennsl_cosq_gport_sched_config_set (int unit, opennsl_gport_t gport, int sched_mode, int int_pri, uint32 flags) LIB_DLL_EXPORTED |
| Mapping/redirecting scheduling discipline to Egress FIFO. | |
| int | opennsl_cosq_gport_sched_get (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, int *mode, int *weight) LIB_DLL_EXPORTED |
| Configure/retrieve scheduling policy. | |
| int | opennsl_cosq_gport_sched_set (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, int mode, int weight) LIB_DLL_EXPORTED |
| Configure/retrieve scheduling policy. | |
| int | opennsl_cosq_gport_stat_config_get (int unit, opennsl_gport_t gport, opennsl_gport_t lgl_gport, opennsl_cos_queue_t cosq, uint32 flags, opennsl_cosq_gport_stat_profile_t *profile) LIB_DLL_EXPORTED |
| Get a previously-configured Central Statistic profile that captures WRED packets. | |
| int | opennsl_cosq_gport_stat_config_set (int unit, opennsl_gport_t gport, opennsl_gport_t lgl_gport, opennsl_cos_queue_t cosq, uint32 flags, opennsl_cosq_gport_stat_profile_t profile) LIB_DLL_EXPORTED |
| Set up a Central Statistic profile to capture WRED packets. | |
| int | opennsl_cosq_gport_stat_enable_get (int unit, opennsl_gport_t gport, int *enable) LIB_DLL_EXPORTED |
| Retrieve queue group statistic setting. | |
| int | opennsl_cosq_gport_stat_enable_set (int unit, opennsl_gport_t gport, int enable) LIB_DLL_EXPORTED |
| Enable/Disable statistics for queue group. | |
| int | opennsl_cosq_gport_stat_get (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, opennsl_cosq_gport_stats_t stat, uint64 *value) LIB_DLL_EXPORTED |
| Retrieve/Set Statistics. | |
| int | opennsl_cosq_gport_stat_set (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, opennsl_cosq_gport_stats_t stat, uint64 value) LIB_DLL_EXPORTED |
| Retrieve/Set Statistics. | |
| int | opennsl_cosq_gport_stat_sync_get (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, opennsl_cosq_gport_stats_t stat, uint64 *value) LIB_DLL_EXPORTED |
| Force an immediate counter update and retrieve statistics. | |
| int | opennsl_cosq_gport_statistic_get (int unit, opennsl_gport_t gport, opennsl_gport_t lgl_gport, opennsl_cos_queue_t cosq, uint32 flags, opennsl_cosq_gport_stats_t stat, uint64 *value) LIB_DLL_EXPORTED |
| Get the value associated with a Central Statistics Index. | |
| int | opennsl_cosq_gport_statistic_set (int unit, opennsl_gport_t gport, opennsl_gport_t lgl_gport, opennsl_cos_queue_t cosq, uint32 flags, opennsl_cosq_gport_stats_t stat, uint64 value) LIB_DLL_EXPORTED |
| Reset the value of a Central Statistics stat to zero. | |
| int | opennsl_cosq_gport_traverse (int unit, opennsl_cosq_gport_traverse_cb cb, void *user_data) LIB_DLL_EXPORTED |
| Traverse all added CoS queue GPORTs and call the supplied callback routine for each one. | |
| int | opennsl_cosq_init (int unit) LIB_DLL_EXPORTED |
| Initialize the CoSQ subsystem. | |
| int | opennsl_cosq_mapping_get (int unit, opennsl_cos_t priority, opennsl_cos_queue_t *cosq) LIB_DLL_EXPORTED |
| Get or set the mapping from internal priority to CoS queue. | |
| int | opennsl_cosq_mapping_set (int unit, opennsl_cos_t priority, opennsl_cos_queue_t cosq) LIB_DLL_EXPORTED |
| Get or set the mapping from internal priority to CoS queue. | |
| int | opennsl_cosq_port_bandwidth_get (int unit, opennsl_port_t port, opennsl_cos_queue_t cosq, uint32 *kbits_sec_min, uint32 *kbits_sec_max, uint32 *flags) LIB_DLL_EXPORTED |
| Configure a port's bandwidth distribution among CoS queues. | |
| int | opennsl_cosq_port_bandwidth_set (int unit, opennsl_port_t port, opennsl_cos_queue_t cosq, uint32 kbits_sec_min, uint32 kbits_sec_max, uint32 flags) LIB_DLL_EXPORTED |
| Configure a port's bandwidth distribution among CoS queues. | |
| int | opennsl_cosq_port_mapping_get (int unit, opennsl_port_t port, opennsl_cos_t priority, opennsl_cos_queue_t *cosq) LIB_DLL_EXPORTED |
| Get or set the mapping from internal priority to CoS queue. | |
| int | opennsl_cosq_port_mapping_multi_get (int unit, opennsl_port_t port, int count, opennsl_cos_t *priority_array, opennsl_cos_queue_t *cosq_array) LIB_DLL_EXPORTED |
| Get or set the mapping of multiple internal priorities to their corresponding CoS queues. | |
| int | opennsl_cosq_port_mapping_multi_set (int unit, opennsl_port_t port, int count, opennsl_cos_t *priority_array, opennsl_cos_queue_t *cosq_array) LIB_DLL_EXPORTED |
| Get or set the mapping of multiple internal priorities to their corresponding CoS queues. | |
| int | opennsl_cosq_port_mapping_set (int unit, opennsl_port_t port, opennsl_cos_t priority, opennsl_cos_queue_t cosq) LIB_DLL_EXPORTED |
| Get or set the mapping from internal priority to CoS queue. | |
| int | opennsl_cosq_port_sched_get (int unit, opennsl_pbmp_t pbm, int *mode, int weights[OPENNSL_COS_COUNT], int *delay) LIB_DLL_EXPORTED |
| Get or set Class of Service policy, weights and delay. | |
| int | opennsl_cosq_port_sched_set (int unit, opennsl_pbmp_t pbm, int mode, const int weights[OPENNSL_COS_COUNT], int delay) LIB_DLL_EXPORTED |
| Get or set Class of Service policy, weights and delay. | |
| int | opennsl_cosq_priority_get (int unit, int start_queue, int end_queue, int *pri_profile_id) LIB_DLL_EXPORTED |
| Get the priority profile associated with a queue range. | |
| int | opennsl_cosq_priority_set (int unit, int start_queue, int end_queue, int pri_profile_id) LIB_DLL_EXPORTED |
| Associate a priority profile with a queue range. | |
| int | opennsl_cosq_sched_get (int unit, int *mode, int weights[OPENNSL_COS_COUNT], int *delay) LIB_DLL_EXPORTED |
| Get or set Class of Service policy, weights and delay. | |
| int | opennsl_cosq_sched_set (int unit, int mode, const int weights[OPENNSL_COS_COUNT], int delay) LIB_DLL_EXPORTED |
| Get or set Class of Service policy, weights and delay. | |
| int | opennsl_cosq_sched_weight_max_get (int unit, int mode, int *weight_max) LIB_DLL_EXPORTED |
| Retrieve maximum weights for given CoS policy. | |
| int | opennsl_cosq_stat_get (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, opennsl_cosq_stat_t stat, uint64 *value) LIB_DLL_EXPORTED |
| Retrieve/set various MMU statistics based on stat type. | |
| int | opennsl_cosq_stat_set (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, opennsl_cosq_stat_t stat, uint64 value) LIB_DLL_EXPORTED |
| Retrieve/set various MMU statistics based on stat type. | |
| int | opennsl_cosq_stat_sync_get (int unit, opennsl_gport_t gport, opennsl_cos_queue_t cosq, opennsl_cosq_stat_t stat, uint64 *value) LIB_DLL_EXPORTED |
| Force an immediate counter update and retrieve various MMU statistics. | |
| #define OPENNSL_COSQ_BW_EAV_MODE 0x00000008 |
| #define OPENNSL_COSQ_BW_LLFC 0x00000010 |
| #define OPENNSL_COSQ_BW_NOT_COMMIT 0x00000040 |
| #define OPENNSL_COSQ_BW_PACKET_MODE 0x00000020 |
| #define OPENNSL_COSQ_DISCARD_COLOR_BLACK 0x0800 |
Definition at line 679 of file cosqX.h.
Referenced by example_create_policy().
| #define OPENNSL_COSQ_DISCARD_DROP_FIRST OPENNSL_COSQ_DISCARD_COLOR_RED |
| #define OPENNSL_COSQ_DISCARD_ENABLE 0x0001 |
Definition at line 674 of file cosqX.h.
Referenced by example_create_policy().
| #define OPENNSL_COSQ_GPORT_DESTMOD_UCAST_QUEUE_GROUP 0x00000010 |
| #define OPENNSL_COSQ_GPORT_DISABLE 0x00000100 |
| #define OPENNSL_COSQ_HIGH_PRIORITY -4 |
Definition at line 855 of file cosqX.h.
Referenced by _opennsl_petra_egress_queue_from_cosq(), and example_egress_transmit_application().
| #define OPENNSL_COSQ_LOW_PRIORITY -5 |
Definition at line 856 of file cosqX.h.
Referenced by _opennsl_petra_egress_queue_from_cosq(), and example_egress_transmit_application().
| #define OPENNSL_COSQ_MULTICAST_SCHEDULED 0x00000001 |
multicast scheduled values are valid
Definition at line 2168 of file cosqX.h.
Referenced by example_set_mc_queue_mapping().
| #define OPENNSL_COSQ_PRIO_VALID | ( | prio | ) | ((prio) >= 0 && (prio < 8)) |
| #define OPENNSL_COSQ_QUEUE_VALID | ( | unit, | |
| numq | |||
| ) | ((numq) >= 0 && (numq) < NUM_COS(unit)) |
| #define OPENNSL_COSQ_SP0 0x0C |
| #define OPENNSL_COSQ_SP1 0x0D |
| typedef enum opennsl_bst_stat_id_e opennsl_bst_stat_id_t |
BST Tracing statistics resources type eumerations.
| typedef struct opennsl_cosq_bst_profile_s opennsl_cosq_bst_profile_t |
| typedef enum opennsl_cosq_control_e opennsl_cosq_control_t |
Features that can be controlled on a gport/cosq basis.
multicast configuration settings
| typedef struct opennsl_cosq_gport_discard_s opennsl_cosq_gport_discard_t |
For Virtual output queues (system ports)
| typedef struct opennsl_cosq_gport_info_s opennsl_cosq_gport_info_t |
gport information related to getting a handle
Statistics Profile.
| typedef enum opennsl_cosq_gport_stats_e opennsl_cosq_gport_stats_t |
For Virtual output queues (system ports)
| typedef int(* opennsl_cosq_gport_traverse_cb)(int unit, opennsl_gport_t port, int numq, uint32 flags, opennsl_gport_t gport, void *user_data) |
| typedef enum opennsl_cosq_gport_type_e opennsl_cosq_gport_type_t |
cosq gport type eumerations
| typedef enum opennsl_cosq_stat_e opennsl_cosq_stat_t |
XGS3 cosq counters.
BST Tracing statistics resources type eumerations.
Features that can be controlled on a gport/cosq basis.
For Virtual output queues (system ports)
| enum opennsl_cosq_stat_e |
XGS3 cosq counters.
| int opennsl_cosq_bst_profile_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| opennsl_bst_stat_id_t | bid, | ||
| opennsl_cosq_bst_profile_t * | profile | ||
| ) |
Set/Get the BST profile for CosQ objects.
| unit | [IN] Unit number. |
| gport | [IN] |
| cosq | [IN] Cosq object offset identifier |
| bid | [IN] BST stat ID to identify the COSQ resource/object |
| profile | [OUT] BST profile configuration |
| OPENNSL_E_NONE | |
| OPENNSL_E_XXX |
| int opennsl_cosq_bst_profile_set | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| opennsl_bst_stat_id_t | bid, | ||
| opennsl_cosq_bst_profile_t * | profile | ||
| ) |
Set/Get the BST profile for CosQ objects.
| unit | [IN] Unit number. |
| gport | [IN] |
| cosq | [IN] Cosq object offset identifier |
| bid | [IN] BST stat ID to identify the COSQ resource/object |
| profile | [IN] BST profile configuration |
| OPENNSL_E_NONE | |
| OPENNSL_E_XXX |
| int opennsl_cosq_bst_stat_clear | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| opennsl_bst_stat_id_t | bid | ||
| ) |
Clear the current statistic/count of specified BST profile.
| unit | [IN] Unit number. |
| gport | [IN] Device or logical port or GPORT ID |
| cosq | [IN] Cosq object offset identifier |
| bid | [IN] BST stat ID to identify the COSQ resource/object |
| OPENNSL_E_NONE | |
| OPENNSL_E_XXX |
| int opennsl_cosq_bst_stat_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| opennsl_bst_stat_id_t | bid, | ||
| uint32 | options, | ||
| uint64 * | value | ||
| ) |
Get the current statistic/count of specified BST profile.
| unit | [IN] Unit number. |
| gport | [IN] |
| cosq | [IN] Cosq object offset identifier |
| bid | [IN] BST stat ID to identify the COSQ resource/object |
| options | [IN] options to perform clear-on-read |
| value | [OUT] |
| OPENNSL_E_NONE | |
| OPENNSL_E_XXX |
| int opennsl_cosq_bst_stat_multi_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| uint32 | options, | ||
| int | max_values, | ||
| opennsl_bst_stat_id_t * | id_list, | ||
| uint64 * | values | ||
| ) |
Get the current statistic/count of multiple specified BST profile.
| unit | [IN] Unit number. |
| gport | [IN] Device or logical port or GPORT ID |
| cosq | [IN] Cosq object offset identifier |
| options | [IN] options to perform clear-on-read |
| max_values | [IN] Number of elements in id_list and pvalue |
| id_list | [IN] Array of BST stat ID list to identify the COSQ resource/object |
| values | [OUT] |
| OPENNSL_E_NONE | |
| OPENNSL_E_XXX |
| int opennsl_cosq_bst_stat_sync | ( | int | unit, |
| opennsl_bst_stat_id_t | bid | ||
| ) |
Sync the HW stats value to SW copy for all or given BST resource.
| unit | [IN] Unit number. |
| bid | [IN] BST stat ID to identify the COSQ resource/object |
| OPENNSL_E_NONE | |
| OPENNSL_E_XXX |
| int opennsl_cosq_config_get | ( | int | unit, |
| int * | numq | ||
| ) |
Configure the number of Class of Service Queues (COSQs).
| unit | [IN] Unit number. |
| numq | [OUT] Number of Class of Service Queues |
| OPENNSL_E_NONE | |
| OPENNSL_E_UNAVAIL | Requested number of CoS queues not supported on this device. |
| OPENNSL_E_XXX |
| int opennsl_cosq_config_set | ( | int | unit, |
| int | numq | ||
| ) |
Configure the number of Class of Service Queues (COSQs).
| unit | [IN] Unit number. |
| numq | [IN] Number of Class of Service Queues |
| OPENNSL_E_NONE | |
| OPENNSL_E_UNAVAIL | Requested number of CoS queues not supported on this device. |
| OPENNSL_E_XXX |
| int opennsl_cosq_control_get | ( | int | unit, |
| opennsl_gport_t | port, | ||
| opennsl_cos_queue_t | cosq, | ||
| opennsl_cosq_control_t | type, | ||
| int * | arg | ||
| ) |
Set various features at the gport/cosq level.
| unit | [IN] Unit number. |
| port | [IN] GPORT ID for a queue group |
| cosq | [IN] CoS Queue |
| type | [IN] type of operation (see =OPENNSL_COSQ_CONTROL_table) |
| arg | [OUT] (for _set) Argument whose meaning is dependent on type |
| OPENNSL_E_XXX |
| int opennsl_cosq_control_set | ( | int | unit, |
| opennsl_gport_t | port, | ||
| opennsl_cos_queue_t | cosq, | ||
| opennsl_cosq_control_t | type, | ||
| int | arg | ||
| ) |
Set various features at the gport/cosq level.
| unit | [IN] Unit number. |
| port | [IN] GPORT ID for a queue group |
| cosq | [IN] CoS Queue |
| type | [IN] type of operation (see =OPENNSL_COSQ_CONTROL_table) |
| arg | [IN] (for _set) Argument whose meaning is dependent on type |
| OPENNSL_E_XXX |
| int opennsl_cosq_detach | ( | int | unit | ) |
De-initialize the CoSQ subsystem.
| unit | [IN] Unit number. |
| OPENNSL_E_NONE | |
| OPENNSL_E_XXX |
| int opennsl_cosq_discard_get | ( | int | unit, |
| uint32 * | flags | ||
| ) |
Configure Weighted Random Early Discard (WRED).
| unit | [IN] Unit number. |
| flags | [OUT] Enable parameters |
| OPENNSL_E_xxx |
| int opennsl_cosq_discard_port_get | ( | int | unit, |
| opennsl_port_t | port, | ||
| opennsl_cos_queue_t | cosq, | ||
| uint32 | color, | ||
| int * | drop_start, | ||
| int * | drop_slope, | ||
| int * | average_time | ||
| ) |
Configure a port's Weighted Random Early Discard (WRED) parameters.
| unit | [IN] Unit number. |
| port | [IN] Device or logical port |
| cosq | [IN] Cos Queue to configure |
| color | [IN] OPENNSL_COSQ_DISCARD_COLOR_* |
| drop_start | [OUT] Percentage of queue size to start dropping |
| drop_slope | [OUT] Degrees 0..90 describing the drop probability slope for WRED. For network switch and network switch, this parameter must be negative and each unit describes one-tenths of a percentage of the simple RED drop probability. |
| average_time | [OUT] Time in microseconds used in avg queue depth calculation for WRED. For simple RED (network switch) this is ignored. |
| OPENNSL_E_xxx |
| int opennsl_cosq_discard_port_set | ( | int | unit, |
| opennsl_port_t | port, | ||
| opennsl_cos_queue_t | cosq, | ||
| uint32 | color, | ||
| int | drop_start, | ||
| int | drop_slope, | ||
| int | average_time | ||
| ) |
Configure a port's Weighted Random Early Discard (WRED) parameters.
| unit | [IN] Unit number. |
| port | [IN] Device or logical port |
| cosq | [IN] Cos Queue to configure |
| color | [IN] OPENNSL_COSQ_DISCARD_COLOR_* |
| drop_start | [IN] Percentage of queue size to start dropping |
| drop_slope | [IN] Degrees 0..90 describing the drop probability slope for WRED. For network switch and network switch, this parameter must be negative and each unit describes one-tenths of a percentage of the simple RED drop probability. |
| average_time | [IN] Time in microseconds used in avg queue depth calculation for WRED. For simple RED (network switch) this is ignored. |
| OPENNSL_E_xxx |
| int opennsl_cosq_discard_set | ( | int | unit, |
| uint32 | flags | ||
| ) |
Configure Weighted Random Early Discard (WRED).
| unit | [IN] Unit number. |
| flags | [IN] Enable parameters |
| OPENNSL_E_xxx |
Referenced by example_create_policy().
| int opennsl_cosq_gport_add | ( | int | unit, |
| opennsl_gport_t | port, | ||
| int | numq, | ||
| uint32 | flags, | ||
| opennsl_gport_t * | gport | ||
| ) |
Allocate/Retrieve unicast queue group and scheduler queue group configuration.
| unit | [IN] Unit number. |
| port | [IN] (for _add) GPORT ID physical port (For DNX, this should be local port) |
| numq | [IN] |
| flags | [IN] (for _add) Specifies configuration. Valid flags listed at =OPENNSL_COSQ_GPORT_FLAGS_table |
| gport | [IN,OUT] (for _get) GPORT ID for a queue group |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_attach | ( | int | unit, |
| opennsl_gport_t | sched_port, | ||
| opennsl_gport_t | input_port, | ||
| opennsl_cos_queue_t | cosq | ||
| ) |
Attach/Detach the output of a GPORT to the input of a scheduler GPORT.
| unit | [IN] Unit number. |
| sched_port | [IN] GPORT ID that gets attached to input_port |
| input_port | [IN] GPORT ID to which sched_port gets attached |
| cosq | [IN] CoS queue to attach to |
| OPENNSL_E_xxx |
| int opennsl_cosq_gport_attach_get | ( | int | unit, |
| opennsl_gport_t | sched_port, | ||
| opennsl_gport_t * | input_port, | ||
| opennsl_cos_queue_t * | cosq | ||
| ) |
Attach/Detach the output of a GPORT to the input of a scheduler GPORT.
| unit | [IN] Unit number. |
| sched_port | [IN] GPORT ID that gets attached to input_port |
| input_port | [OUT] GPORT ID to which sched_port gets attached |
| cosq | [OUT] CoS queue to attach to |
| OPENNSL_E_xxx |
| int opennsl_cosq_gport_bandwidth_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| uint32 * | kbits_sec_min, | ||
| uint32 * | kbits_sec_max, | ||
| uint32 * | flags | ||
| ) |
Configure/Retrieve bandwidth setting.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for a queue group |
| cosq | [IN] CoS Queue |
| kbits_sec_min | [OUT] (for _set) CIR (Bandwidth guarantee) |
| kbits_sec_max | [OUT] (for _set) PIR (Traffic shaping) |
| flags | [OUT] (for _set) Specifies bandwidth configuration. Can be logical OR of of values defined in table =OPENNSL_COSQ_BW_f |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_bandwidth_set | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| uint32 | kbits_sec_min, | ||
| uint32 | kbits_sec_max, | ||
| uint32 | flags | ||
| ) |
Configure/Retrieve bandwidth setting.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for a queue group |
| cosq | [IN] CoS Queue |
| kbits_sec_min | [IN] (for _set) CIR (Bandwidth guarantee) |
| kbits_sec_max | [IN] (for _set) PIR (Traffic shaping) |
| flags | [IN] (for _set) Specifies bandwidth configuration. Can be logical OR of of values defined in table =OPENNSL_COSQ_BW_f |
| OPENNSL_E_XXX |
Referenced by example_set_ofp_bandwidth().
| int opennsl_cosq_gport_child_get | ( | int | unit, |
| opennsl_gport_t | in_gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| opennsl_gport_t * | out_gport | ||
| ) |
Get the child node GPORT atatched to N-th index (cosq) of the scheduler GPORT.
| unit | [IN] Unit number. |
| in_gport | [IN] Scheduler GPORT ID |
| cosq | [IN] COS queue attached to. |
| out_gport | [OUT] Child GPORT ID. |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_delete | ( | int | unit, |
| opennsl_gport_t | gport | ||
| ) |
Deletes queue group.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID of the queue group that has to be deleted |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_detach | ( | int | unit, |
| opennsl_gport_t | sched_port, | ||
| opennsl_gport_t | input_port, | ||
| opennsl_cos_queue_t | cosq | ||
| ) |
Attach/Detach the output of a GPORT to the input of a scheduler GPORT.
| unit | [IN] Unit number. |
| sched_port | [IN] GPORT ID that gets attached to input_port |
| input_port | [IN] GPORT ID to which sched_port gets attached |
| cosq | [IN] CoS queue to attach to |
| OPENNSL_E_xxx |
| int opennsl_cosq_gport_discard_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| opennsl_cosq_gport_discard_t * | discard | ||
| ) |
Configure/Retrieve discard setting.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for a queue group |
| cosq | [IN] CoS Queue |
| discard | [IN,OUT] (for _set) discard configuration |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_discard_set | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| opennsl_cosq_gport_discard_t * | discard | ||
| ) |
Configure/Retrieve discard setting.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for a queue group |
| cosq | [IN] CoS Queue |
| discard | [IN] (for _set) discard configuration |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_egress_map_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_t | ingress_pri, | ||
| opennsl_color_t | ingress_dp, | ||
| opennsl_cos_queue_t * | offset | ||
| ) |
Configure/retrieve {traffic class, dp} mapping to egress queue on a port.
| unit | [IN] Unit number. |
| gport | [IN] gport referencing unicast or multicast egress queues on a port |
| ingress_pri | [IN] packet priority/traffic class |
| ingress_dp | [IN] packet drop precedence |
| offset | [OUT] (for _set) queue offset from base |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_egress_map_set | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_t | ingress_pri, | ||
| opennsl_color_t | ingress_dp, | ||
| opennsl_cos_queue_t | offset | ||
| ) |
Configure/retrieve {traffic class, dp} mapping to egress queue on a port.
| unit | [IN] Unit number. |
| gport | [IN] gport referencing unicast or multicast egress queues on a port |
| ingress_pri | [IN] packet priority/traffic class |
| ingress_dp | [IN] packet drop precedence |
| offset | [IN] (for _set) queue offset from base |
| OPENNSL_E_XXX |
Referenced by example_set_uc_queue_mapping().
| int opennsl_cosq_gport_egress_multicast_config_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_t | ingress_pri, | ||
| opennsl_color_t | ingress_dp, | ||
| uint32 | flags, | ||
| opennsl_cosq_egress_multicast_config_t * | config | ||
| ) |
Configure/retrieve {traffic class, dp} mapping to multicast egress configuration on a port.
| unit | [IN] Unit number. |
| gport | [IN] gport referencing unicast or multicast egress queues on a port |
| ingress_pri | [IN] packet priority/traffic class |
| ingress_dp | [IN] packet drop precedence |
| flags | [IN] Specifies configuration. Valid flags: OPENNSL_COSQ_MULTICAST_SCHEDULED, OPENNSL_COSQ_MULTICAST_UNSCHEDULED |
| config | [OUT] (for _set) multicast egress configuration |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_egress_multicast_config_set | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_t | ingress_pri, | ||
| opennsl_color_t | ingress_dp, | ||
| uint32 | flags, | ||
| opennsl_cosq_egress_multicast_config_t * | config | ||
| ) |
Configure/retrieve {traffic class, dp} mapping to multicast egress configuration on a port.
| unit | [IN] Unit number. |
| gport | [IN] gport referencing unicast or multicast egress queues on a port |
| ingress_pri | [IN] packet priority/traffic class |
| ingress_dp | [IN] packet drop precedence |
| flags | [IN] Specifies configuration. Valid flags: OPENNSL_COSQ_MULTICAST_SCHEDULED, OPENNSL_COSQ_MULTICAST_UNSCHEDULED |
| config | [IN] (for _set) multicast egress configuration |
| OPENNSL_E_XXX |
Referenced by example_set_mc_queue_mapping().
| int opennsl_cosq_gport_enable_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| int * | enable | ||
| ) |
Configure/Retrieve enable/disable state of a cos level in a queue group.
OPENNSL88230 only: Also configure/Retrieve enable/disable state of a FIFO in an egress group.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for a queue group |
| cosq | [IN] CoS Queue, -1 for Queue Group (set only) |
| enable | [OUT] (for _set) TRUE to enable, FALSE to disable |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_enable_set | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| int | enable | ||
| ) |
Configure/Retrieve enable/disable state of a cos level in a queue group.
OPENNSL88230 only: Also configure/Retrieve enable/disable state of a FIFO in an egress group.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for a queue group |
| cosq | [IN] CoS Queue, -1 for Queue Group (set only) |
| enable | [IN] (for _set) TRUE to enable, FALSE to disable |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_gport_t * | physical_port, | ||
| int * | num_cos_levels, | ||
| uint32 * | flags | ||
| ) |
Allocate/Retrieve unicast queue group and scheduler queue group configuration.
| unit | [IN] Unit number. |
| gport | [IN] (for _get) GPORT ID for a queue group |
| physical_port | [OUT] (for _get) GPORT ID for physical port |
| num_cos_levels | [OUT] (for _add) number of cos levels |
| flags | [OUT] (for _add) Specifies configuration. Valid flags listed at =OPENNSL_COSQ_GPORT_FLAGS_table |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_handle_get | ( | int | unit, |
| opennsl_cosq_gport_type_t | gport_type, | ||
| opennsl_cosq_gport_info_t * | gport_info | ||
| ) |
Getting a gport handle.
| unit | [IN] Unit number. |
| gport_type | [IN] gport type. see table =OPENNSL_COSQ_GPORT_type |
| gport_info | [IN,OUT] gport info. see table =OPENNSL_COSQ_GPORT_INFO_table in_gport parameter is an input parameter |
| OPENNSL_E_XXX |
Referenced by example_set_mc_queue_mapping(), example_set_ofp_bandwidth(), example_set_sp(), example_set_uc_queue_mapping(), example_set_weight(), and multicast__open_egress_mc_group_with_local_ports().
| int opennsl_cosq_gport_mapping_get | ( | int | unit, |
| opennsl_port_t | ing_port, | ||
| opennsl_cos_t | int_pri, | ||
| uint32 | flags, | ||
| opennsl_gport_t * | gport, | ||
| opennsl_cos_queue_t * | cosq | ||
| ) |
Get or set the mapping from internal priority to CoS queue.
| unit | [IN] Unit number. |
| ing_port | [IN] Ingress device or logical port or GPORT ID |
| int_pri | [IN] |
| flags | [IN] Can be one of following OPENNSL_COSQ_GPORT_UCAST_QUEUE_GROUP, OPENNSL_COSQ_GPORT_DESTMOD_UCAST_QUEUE_GROUP, OPENNSL_COSQ_GPORT_MCAST_QUEUE_GROUP |
| gport | [OUT] GPORT ID for a queue group |
| cosq | [OUT] CoS queue to which to map the chosen priority |
| OPENNSL_E_NONE | |
| OPENNSL_E_PARAM | |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_mapping_set | ( | int | unit, |
| opennsl_port_t | ing_port, | ||
| opennsl_cos_t | int_pri, | ||
| uint32 | flags, | ||
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq | ||
| ) |
Get or set the mapping from internal priority to CoS queue.
| unit | [IN] Unit number. |
| ing_port | [IN] Ingress device or logical port or GPORT ID |
| int_pri | [IN] |
| flags | [IN] Can be one of following OPENNSL_COSQ_GPORT_UCAST_QUEUE_GROUP, OPENNSL_COSQ_GPORT_DESTMOD_UCAST_QUEUE_GROUP, OPENNSL_COSQ_GPORT_MCAST_QUEUE_GROUP |
| gport | [IN] GPORT ID for a queue group |
| cosq | [IN] CoS queue to which to map the chosen priority |
| OPENNSL_E_NONE | |
| OPENNSL_E_PARAM | |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_sched_config_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| int | sched_mode, | ||
| int | int_pri, | ||
| uint32 * | flags | ||
| ) |
Mapping/redirecting scheduling discipline to Egress FIFO.
| unit | [IN] Unit number. |
| gport | [IN] fabric gport |
| sched_mode | [IN] scheduling discipline |
| int_pri | [IN] internal priority on fabric device |
| flags | [OUT] (for _set) flags =SCHED_CONFIG_FLAGS_table |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_sched_config_set | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| int | sched_mode, | ||
| int | int_pri, | ||
| uint32 | flags | ||
| ) |
Mapping/redirecting scheduling discipline to Egress FIFO.
| unit | [IN] Unit number. |
| gport | [IN] fabric gport |
| sched_mode | [IN] scheduling discipline |
| int_pri | [IN] internal priority on fabric device |
| flags | [IN] (for _set) flags =SCHED_CONFIG_FLAGS_table |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_sched_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| int * | mode, | ||
| int * | weight | ||
| ) |
Configure/retrieve scheduling policy.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for a queue group |
| cosq | [IN] CoS Queue |
| mode | [OUT] (for _set) scheduling mode |
| weight | [OUT] (for _set) weight. This is applicable for some scheduling modes |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_sched_set | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| int | mode, | ||
| int | weight | ||
| ) |
Configure/retrieve scheduling policy.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for a queue group |
| cosq | [IN] CoS Queue |
| mode | [IN] (for _set) scheduling mode |
| weight | [IN] (for _set) weight. This is applicable for some scheduling modes |
| OPENNSL_E_XXX |
Referenced by example_set_sp(), and example_set_weight().
| int opennsl_cosq_gport_stat_config_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_gport_t | lgl_gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| uint32 | flags, | ||
| opennsl_cosq_gport_stat_profile_t * | profile | ||
| ) |
Get a previously-configured Central Statistic profile that captures WRED packets.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for Ingress interface. Valid types: OPENNSL_GPORT_TYPE_MODPORT, OPENNSL_GPORT_TYPE_EGRESS_MODPORT, OPENNSL_GPORT_TYPE_EGRESS_CHILD, OPENNSL_GPORT_TYPE_EGRESS_GROUP |
| lgl_gport | [IN] GPORT ID for Ingress queue group. Valid types: OPENNSL_GPORT_TYPE_UCAST_QUEUE_GROUP, OPENNSL_GPORT_TYPE_MAST_QUEUE_GROUP, OPENNSL_GPORT_TYPE_NONE |
| cosq | [IN] CoS Queue |
| flags | [IN] Specifies configuration. Valid flags: OPENNSL_COSQ_GPORT_STATS_SHARED |
| profile | [OUT] opennsl_cosq_gport_stats bitmap. see table =OPENNSL_COSQ_GPORT_STATISTICS_table . |
| OPENNSL_E_NONE | |
| OPENNSL_E_UNAVAIL | |
| OPENNSL_E_PARAM | |
| OPENNSL_E_PORT |
| int opennsl_cosq_gport_stat_config_set | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_gport_t | lgl_gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| uint32 | flags, | ||
| opennsl_cosq_gport_stat_profile_t | profile | ||
| ) |
Set up a Central Statistic profile to capture WRED packets.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for Ingress interface. Valid types: OPENNSL_GPORT_TYPE_MODPORT, OPENNSL_GPORT_TYPE_EGRESS_MODPORT, OPENNSL_GPORT_TYPE_EGRESS_CHILD, OPENNSL_GPORT_TYPE_EGRESS_GROUP |
| lgl_gport | [IN] GPORT ID for Ingress queue group. Valid types: OPENNSL_GPORT_TYPE_UCAST_QUEUE_GROUP, OPENNSL_GPORT_TYPE_MAST_QUEUE_GROUP, OPENNSL_GPORT_TYPE_NONE |
| cosq | [IN] CoS Queue |
| flags | [IN] Specifies configuration. Valid flags: OPENNSL_COSQ_GPORT_STATS_SHARED |
| profile | [IN] opennsl_cosq_gport_stats bitmap. see table =OPENNSL_COSQ_GPORT_STATISTICS_table . |
| OPENNSL_E_NONE | |
| OPENNSL_E_UNAVAIL | |
| OPENNSL_E_PARAM | |
| OPENNSL_E_PORT | |
| OPENNSL_E_NOT_FOUND | |
| OPENNSL_E_RESOURCE | |
| OPENNSL_E_MEMORY |
| int opennsl_cosq_gport_stat_enable_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| int * | enable | ||
| ) |
Retrieve queue group statistic setting.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for a queue group |
| enable | [OUT] TRUE for enable, FALSE for disable |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_stat_enable_set | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| int | enable | ||
| ) |
Enable/Disable statistics for queue group.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for a queue group |
| enable | [IN] TRUE to enable, FALSE to disable |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_stat_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| opennsl_cosq_gport_stats_t | stat, | ||
| uint64 * | value | ||
| ) |
Retrieve/Set Statistics.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for a queue group |
| cosq | [IN] CoS Queue |
| stat | [IN] statistic to be retrieved. see table =OPENNSL_COSQ_GPORT_STATISTICS_table . |
| value | [OUT] (for _get) statistic value |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_stat_set | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| opennsl_cosq_gport_stats_t | stat, | ||
| uint64 | value | ||
| ) |
Retrieve/Set Statistics.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for a queue group |
| cosq | [IN] CoS Queue |
| stat | [IN] statistic to be retrieved. see table =OPENNSL_COSQ_GPORT_STATISTICS_table . |
| value | [IN] (for _get) statistic value |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_stat_sync_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| opennsl_cosq_gport_stats_t | stat, | ||
| uint64 * | value | ||
| ) |
Force an immediate counter update and retrieve statistics.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for a queue group |
| cosq | [IN] CoS Queue |
| stat | [IN] statistic to be retrieved. see table =OPENNSL_COSQ_GPORT_STATISTICS_table . |
| value | [OUT] (for _get) statistic value |
| OPENNSL_E_XXX |
| int opennsl_cosq_gport_statistic_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_gport_t | lgl_gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| uint32 | flags, | ||
| opennsl_cosq_gport_stats_t | stat, | ||
| uint64 * | value | ||
| ) |
Get the value associated with a Central Statistics Index.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for Ingress interface. Valid types: OPENNSL_GPORT_TYPE_MODPORT, OPENNSL_GPORT_TYPE_EGRESS_MODPORT, OPENNSL_GPORT_TYPE_EGRESS_CHILD, OPENNSL_GPORT_TYPE_EGRESS_GROUP |
| lgl_gport | [IN] GPORT ID for Ingress queue group. Valid types: OPENNSL_GPORT_TYPE_UCAST_QUEUE_GROUP, OPENNSL_GPORT_TYPE_MAST_QUEUE_GROUP, OPENNSL_GPORT_TYPE_NONE |
| cosq | [IN] CoS Queue |
| flags | [IN] Specifies configuration. Valid flags: OPENNSL_COSQ_GPORT_STATS_SHARED |
| stat | [IN] See table =OPENNSL_COSQ_GPORT_STATISTICS_table . |
| value | [OUT] statistic value |
| OPENNSL_E_NONE | |
| OPENNSL_E_UNAVAIL | |
| OPENNSL_E_PARAM | |
| OPENNSL_E_PORT |
| int opennsl_cosq_gport_statistic_set | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_gport_t | lgl_gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| uint32 | flags, | ||
| opennsl_cosq_gport_stats_t | stat, | ||
| uint64 | value | ||
| ) |
Reset the value of a Central Statistics stat to zero.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID for Ingress interface. Valid types: OPENNSL_GPORT_TYPE_MODPORT, OPENNSL_GPORT_TYPE_EGRESS_MODPORT, OPENNSL_GPORT_TYPE_EGRESS_CHILD, OPENNSL_GPORT_TYPE_EGRESS_GROUP |
| lgl_gport | [IN] GPORT ID for Ingress queue group. Valid types: OPENNSL_GPORT_TYPE_UCAST_QUEUE_GROUP, OPENNSL_GPORT_TYPE_MAST_QUEUE_GROUP, OPENNSL_GPORT_TYPE_NONE |
| cosq | [IN] CoS Queue |
| flags | [IN] Specifies configuration. Valid flags: OPENNSL_COSQ_GPORT_STATS_SHARED |
| stat | [IN] See table =OPENNSL_COSQ_GPORT_STATISTICS_table . |
| value | [IN] |
| OPENNSL_E_NONE | |
| OPENNSL_E_UNAVAIL | |
| OPENNSL_E_PARAM | |
| OPENNSL_E_PORT |
| int opennsl_cosq_gport_traverse | ( | int | unit, |
| opennsl_cosq_gport_traverse_cb | cb, | ||
| void * | user_data | ||
| ) |
Traverse all added CoS queue GPORTs and call the supplied callback routine for each one.
| unit | [IN] Unit number. |
| cb | [IN] User-supplied callback function |
| user_data | [IN] User-supplied data passed back in callback function |
| OPENNSL_E_xxx |
| int opennsl_cosq_init | ( | int | unit | ) |
Initialize the CoSQ subsystem.
| unit | [IN] Unit number. |
| OPENNSL_E_NONE | |
| OPENNSL_E_XXX |
| int opennsl_cosq_mapping_get | ( | int | unit, |
| opennsl_cos_t | priority, | ||
| opennsl_cos_queue_t * | cosq | ||
| ) |
Get or set the mapping from internal priority to CoS queue.
| unit | [IN] Unit number. |
| priority | [IN] internal priority to map |
| cosq | [OUT] Cos queue to which to map the chosen priority |
| OPENNSL_E_NONE | |
| OPENNSL_E_PARAM | Invalid priority, or device not configured for the number of CoS queues specified. |
| OPENNSL_E_XXX |
| int opennsl_cosq_mapping_set | ( | int | unit, |
| opennsl_cos_t | priority, | ||
| opennsl_cos_queue_t | cosq | ||
| ) |
Get or set the mapping from internal priority to CoS queue.
| unit | [IN] Unit number. |
| priority | [IN] internal priority to map |
| cosq | [IN] Cos queue to which to map the chosen priority |
| OPENNSL_E_NONE | |
| OPENNSL_E_PARAM | Invalid priority, or device not configured for the number of CoS queues specified. |
| OPENNSL_E_XXX |
| int opennsl_cosq_port_bandwidth_get | ( | int | unit, |
| opennsl_port_t | port, | ||
| opennsl_cos_queue_t | cosq, | ||
| uint32 * | kbits_sec_min, | ||
| uint32 * | kbits_sec_max, | ||
| uint32 * | flags | ||
| ) |
Configure a port's bandwidth distribution among CoS queues.
| unit | [IN] Unit number. |
| port | [IN] Device or logical port |
| cosq | [IN] Cos Queue to configure |
| kbits_sec_min | [OUT] Minimum bandwidth in kbits/sec. |
| kbits_sec_max | [OUT] Maximum bandwidth in kbits/sec. |
| flags | [OUT] Bandwidth tuning parameters. |
| OPENNSL_E_xxx |
| int opennsl_cosq_port_bandwidth_set | ( | int | unit, |
| opennsl_port_t | port, | ||
| opennsl_cos_queue_t | cosq, | ||
| uint32 | kbits_sec_min, | ||
| uint32 | kbits_sec_max, | ||
| uint32 | flags | ||
| ) |
Configure a port's bandwidth distribution among CoS queues.
| unit | [IN] Unit number. |
| port | [IN] Device or logical port |
| cosq | [IN] Cos Queue to configure |
| kbits_sec_min | [IN] Minimum bandwidth in kbits/sec. |
| kbits_sec_max | [IN] Maximum bandwidth in kbits/sec. |
| flags | [IN] Bandwidth tuning parameters. |
| OPENNSL_E_xxx |
| int opennsl_cosq_port_mapping_get | ( | int | unit, |
| opennsl_port_t | port, | ||
| opennsl_cos_t | priority, | ||
| opennsl_cos_queue_t * | cosq | ||
| ) |
Get or set the mapping from internal priority to CoS queue.
| unit | [IN] Unit number. |
| port | [IN] Device or logical port or GPORT ID |
| priority | [IN] internal priority to map |
| cosq | [OUT] Cos queue to which to map the chosen priority |
| OPENNSL_E_NONE | |
| OPENNSL_E_PARAM | Invalid priority, or device not configured for the number of CoS queues specified. |
| OPENNSL_E_XXX |
| int opennsl_cosq_port_mapping_multi_get | ( | int | unit, |
| opennsl_port_t | port, | ||
| int | count, | ||
| opennsl_cos_t * | priority_array, | ||
| opennsl_cos_queue_t * | cosq_array | ||
| ) |
Get or set the mapping of multiple internal priorities to their corresponding CoS queues.
| unit | [IN] Unit number. |
| port | [IN] Device or logical port or GPORT ID |
| count | [IN] number of elements in priority array and cosq array in case of multi get or set |
| priority_array | [IN] array of internal priority to map |
| cosq_array | [OUT] array of Cos queue where each element of cosq_array (cos) corresponds to the respective element of priority_array (internal priority) |
| OPENNSL_E_NONE | |
| OPENNSL_E_PARAM | Invalid priority, or device not configured for the number of CoS queues specified. |
| OPENNSL_E_XXX |
| int opennsl_cosq_port_mapping_multi_set | ( | int | unit, |
| opennsl_port_t | port, | ||
| int | count, | ||
| opennsl_cos_t * | priority_array, | ||
| opennsl_cos_queue_t * | cosq_array | ||
| ) |
Get or set the mapping of multiple internal priorities to their corresponding CoS queues.
| unit | [IN] Unit number. |
| port | [IN] Device or logical port or GPORT ID |
| count | [IN] number of elements in priority array and cosq array in case of multi get or set |
| priority_array | [IN] array of internal priority to map |
| cosq_array | [IN] array of Cos queue where each element of cosq_array (cos) corresponds to the respective element of priority_array (internal priority) |
| OPENNSL_E_NONE | |
| OPENNSL_E_PARAM | Invalid priority, or device not configured for the number of CoS queues specified. |
| OPENNSL_E_XXX |
| int opennsl_cosq_port_mapping_set | ( | int | unit, |
| opennsl_port_t | port, | ||
| opennsl_cos_t | priority, | ||
| opennsl_cos_queue_t | cosq | ||
| ) |
Get or set the mapping from internal priority to CoS queue.
| unit | [IN] Unit number. |
| port | [IN] Device or logical port or GPORT ID |
| priority | [IN] internal priority to map |
| cosq | [IN] Cos queue to which to map the chosen priority |
| OPENNSL_E_NONE | |
| OPENNSL_E_PARAM | Invalid priority, or device not configured for the number of CoS queues specified. |
| OPENNSL_E_XXX |
| int opennsl_cosq_port_sched_get | ( | int | unit, |
| opennsl_pbmp_t | pbm, | ||
| int * | mode, | ||
| int | weights[OPENNSL_COS_COUNT], | ||
| int * | delay | ||
| ) |
Get or set Class of Service policy, weights and delay.
| unit | [IN] Unit number. |
| pbm | [IN] Port bit map of ports to configure |
| mode | [OUT] Scheduling mode, see table =OPENNSL_COSQ_table |
| weights | [OUT] Array of relative weights indexed by CoS queue. Use depends on the selected mode. See =OPENNSL_COSQ_COMBO . Note: Be aware that despite of OPENNSL_COS_COUNT is 8, it supports up to 10 weights arrays in network switch devices if and only if opennsl_num_cos=10 is configured. |
| delay | [OUT] Used only if scheduling algorithm is OPENNSL_COSQ_BOUNDED_DELAY to indicate the maximum amount of time before returning to the highest priority CoS queue. This value is only used for non-negative elements of the weights array. |
| OPENNSL_E_xxx |
| int opennsl_cosq_port_sched_set | ( | int | unit, |
| opennsl_pbmp_t | pbm, | ||
| int | mode, | ||
| const int | weights[OPENNSL_COS_COUNT], | ||
| int | delay | ||
| ) |
Get or set Class of Service policy, weights and delay.
| unit | [IN] Unit number. |
| pbm | [IN] Port bit map of ports to configure |
| mode | [IN] Scheduling mode, see table =OPENNSL_COSQ_table |
| weights | [IN] Array of relative weights indexed by CoS queue. Use depends on the selected mode. See =OPENNSL_COSQ_COMBO . Note: Be aware that despite of OPENNSL_COS_COUNT is 8, it supports up to 10 weights arrays in network switch devices if and only if opennsl_num_cos=10 is configured. |
| delay | [IN] Used only if scheduling algorithm is OPENNSL_COSQ_BOUNDED_DELAY to indicate the maximum amount of time before returning to the highest priority CoS queue. This value is only used for non-negative elements of the weights array. |
| OPENNSL_E_xxx |
| int opennsl_cosq_priority_get | ( | int | unit, |
| int | start_queue, | ||
| int | end_queue, | ||
| int * | pri_profile_id | ||
| ) |
Get the priority profile associated with a queue range.
| unit | [IN] Unit number. |
| start_queue | [IN] starting queue (must be multiple of 64) |
| end_queue | [IN] ending queue (must be multiple of 64 then -1) |
| pri_profile_id | [OUT] priority profile id (0-3) |
| OPENNSL_E_NONE | |
| OPENNSL_E_XXX |
| int opennsl_cosq_priority_set | ( | int | unit, |
| int | start_queue, | ||
| int | end_queue, | ||
| int | pri_profile_id | ||
| ) |
Associate a priority profile with a queue range.
| unit | [IN] Unit number. |
| start_queue | [IN] starting queue (must be multiple of 64) |
| end_queue | [IN] ending queue (must be multiple of 64 then -1) |
| pri_profile_id | [IN] priority profile id (0-3) |
| OPENNSL_E_NONE | |
| OPENNSL_E_XXX |
| int opennsl_cosq_sched_get | ( | int | unit, |
| int * | mode, | ||
| int | weights[OPENNSL_COS_COUNT], | ||
| int * | delay | ||
| ) |
Get or set Class of Service policy, weights and delay.
| unit | [IN] Unit number. |
| mode | [OUT] Scheduling mode, see table =OPENNSL_COSQ_table |
| weights | [OUT] Array of relative weights indexed by CoS queue. Use depends on the selected mode. See =OPENNSL_COSQ_COMBO . Note: Be aware that despite of OPENNSL_COS_COUNT is 8, it supports up to 10 weights arrays in network switch devices if and only if opennsl_num_cos=10 is configured. |
| delay | [OUT] Used only if scheduling algorithm is OPENNSL_COSQ_BOUNDED_DELAY to indicate the maximum amount of time before returning to the highest priority CoS queue. This value is only used for non-negative elements of the weights array. |
| OPENNSL_E_xxx |
| int opennsl_cosq_sched_set | ( | int | unit, |
| int | mode, | ||
| const int | weights[OPENNSL_COS_COUNT], | ||
| int | delay | ||
| ) |
Get or set Class of Service policy, weights and delay.
| unit | [IN] Unit number. |
| mode | [IN] Scheduling mode, see table =OPENNSL_COSQ_table |
| weights | [IN] Array of relative weights indexed by CoS queue. Use depends on the selected mode. See =OPENNSL_COSQ_COMBO . Note: Be aware that despite of OPENNSL_COS_COUNT is 8, it supports up to 10 weights arrays in network switch devices if and only if opennsl_num_cos=10 is configured. |
| delay | [IN] Used only if scheduling algorithm is OPENNSL_COSQ_BOUNDED_DELAY to indicate the maximum amount of time before returning to the highest priority CoS queue. This value is only used for non-negative elements of the weights array. |
| OPENNSL_E_xxx |
| int opennsl_cosq_sched_weight_max_get | ( | int | unit, |
| int | mode, | ||
| int * | weight_max | ||
| ) |
Retrieve maximum weights for given CoS policy.
| unit | [IN] Unit number. |
| mode | [IN] Scheduling mode, see table =OPENNSL_COSQ_table |
| weight_max | [OUT] Maximum weight value for opennsl_cosq_sched_set. |
| OPENNSL_E_xxx |
| int opennsl_cosq_stat_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| opennsl_cosq_stat_t | stat, | ||
| uint64 * | value | ||
| ) |
Retrieve/set various MMU statistics based on stat type.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID. |
| cosq | [IN] CoS Queue. |
| stat | [IN] Statistic to be retrieved. See table =OPENNSL_COSQ_STAT_table . |
| value | [OUT] (for _get) statistic value. |
| OPENNSL_E_NONE | |
| OPENNSL_E_XXX |
| int opennsl_cosq_stat_set | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| opennsl_cosq_stat_t | stat, | ||
| uint64 | value | ||
| ) |
Retrieve/set various MMU statistics based on stat type.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID. |
| cosq | [IN] CoS Queue. |
| stat | [IN] Statistic to be retrieved. See table =OPENNSL_COSQ_STAT_table . |
| value | [IN] (for _get) statistic value. |
| OPENNSL_E_NONE | |
| OPENNSL_E_XXX |
| int opennsl_cosq_stat_sync_get | ( | int | unit, |
| opennsl_gport_t | gport, | ||
| opennsl_cos_queue_t | cosq, | ||
| opennsl_cosq_stat_t | stat, | ||
| uint64 * | value | ||
| ) |
Force an immediate counter update and retrieve various MMU statistics.
| unit | [IN] Unit number. |
| gport | [IN] GPORT ID. |
| cosq | [IN] CoS Queue. |
| stat | [IN] Statistic to be retrieved. See table =OPENNSL_COSQ_STAT_table . |
| value | [OUT] (for _get) statistic value. |
| OPENNSL_E_NONE | |
| OPENNSL_E_XXX |