OpenNSL API Guide and Reference Manual
qosX.h
Go to the documentation of this file.
1 
4 /*****************************************************************************
5  *
6  * This software is governed by the Broadcom Advanced Switch APIs license.
7  * This license is set out in the
8  * https://github.com/Broadcom-Switch/OpenNSL/Legal/LICENSE-Adv file.
9  *
10  * Copyright 2015-2016 Broadcom Corporation. All rights reserved.
11  *
12  ***************************************************************************/
16 #ifndef __OPENNSL_QOSX_H__
17 #define __OPENNSL_QOSX_H__
18 
19 #include <opennsl/types.h>
20 #include <opennsl/multicast.h>
21 #include <opennsl/l3.h>
22 
23 #define OPENNSL_QOS_MAP_WITH_ID 0x0001
24 #define OPENNSL_QOS_MAP_REPLACE 0x0002
25 #define OPENNSL_QOS_MAP_L2 0x0004
26 #define OPENNSL_QOS_MAP_L2_OUTER_TAG OPENNSL_QOS_MAP_L2
27 #define OPENNSL_QOS_MAP_L2_INNER_TAG 0x0008
28 #define OPENNSL_QOS_MAP_L2_UNTAGGED 0x0010
29 #define OPENNSL_QOS_MAP_L2_VLAN_PCP 0x0020
30 #define OPENNSL_QOS_MAP_L3 0x0040
31 #define OPENNSL_QOS_MAP_IPV4 OPENNSL_QOS_MAP_L3
32 #define OPENNSL_QOS_MAP_IPV6 0x0080
33 #define OPENNSL_QOS_MAP_ENCAP 0x0200
34 #define OPENNSL_QOS_MAP_INGRESS 0x0400
35 #define OPENNSL_QOS_MAP_EGRESS 0x0800
36 #define OPENNSL_QOS_MAP_QUEUE 0x4000
37 #define OPENNSL_QOS_MAP_POLICER 0x8000
38 #define OPENNSL_QOS_MAP_PACKET_INVALID 0x10000
39 #define OPENNSL_QOS_MAP_IGNORE_OFFSET 0x20000
40 #define OPENNSL_QOS_MAP_OPCODE 0x40000
41 #define OPENNSL_QOS_MAP_L2_ETAG 0x80000
42 #define OPENNSL_QOS_MAP_L2_VLAN_ETAG 0x100000
43 #define OPENNSL_QOS_MAP_SUBPORT 0x400000
44 #define OPENNSL_QOS_MAP_L3_L2 0x800000
45 
46 typedef struct opennsl_qos_map_s {
49  int dscp;
50  int exp;
51  int int_pri;
68 /* __doxy_func_body_end__ */
69 
70 /***************************************************************************/
79 extern void opennsl_qos_map_t_init(
81 
82 /***************************************************************************/
161 extern int opennsl_qos_map_create(
162  int unit,
163  uint32 flags,
164  int *map_id) LIB_DLL_EXPORTED ;
165 
166 /***************************************************************************/
177 extern int opennsl_qos_map_destroy(
178  int unit,
179  int map_id) LIB_DLL_EXPORTED ;
180 
181 /***************************************************************************/
204 extern int opennsl_qos_map_add(
205  int unit,
206  uint32 flags,
207  opennsl_qos_map_t *map,
208  int map_id) LIB_DLL_EXPORTED ;
209 
210 /***************************************************************************/
228 extern int opennsl_qos_map_multi_get(
229  int unit,
230  uint32 flags,
231  int map_id,
232  int array_size,
233  opennsl_qos_map_t *array,
234  int *array_count) LIB_DLL_EXPORTED ;
235 
236 /***************************************************************************/
249 extern int opennsl_qos_map_delete(
250  int unit,
251  uint32 flags,
252  opennsl_qos_map_t *map,
253  int map_id) LIB_DLL_EXPORTED ;
254 
255 /***************************************************************************/
271 extern int opennsl_qos_port_map_set(
272  int unit,
274  int ing_map,
275  int egr_map) LIB_DLL_EXPORTED ;
276 
277 /***************************************************************************/
293  int unit,
295  uint32 flags,
296  int *map_id) LIB_DLL_EXPORTED ;
297 
298 /***************************************************************************/
310 extern int opennsl_qos_port_map_get(
311  int unit,
313  int *ing_map,
314  int *egr_map) LIB_DLL_EXPORTED ;
315 
316 /***************************************************************************/
333  int unit,
335  opennsl_vlan_t vid,
336  int ing_map,
337  int egr_map) LIB_DLL_EXPORTED ;
338 
339 /***************************************************************************/
353  int unit,
355  opennsl_vlan_t vid,
356  int *ing_map,
357  int *egr_map) LIB_DLL_EXPORTED ;
358 
359 /***************************************************************************/
376 extern int opennsl_qos_multi_get(
377  int unit,
378  int array_size,
379  int *map_ids_array,
380  int *flags_array,
381  int *array_count) LIB_DLL_EXPORTED ;
382 
383 #endif /* __OPENNSL_QOSX_H__ */
384