OpenNSL API Guide and Reference Manual
Welcome
OpenNSL Documentation
API Reference
Files
File List
Globals
include
opennsl
cosqX.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_COSQX_H__
17
#define __OPENNSL_COSQX_H__
18
19
#include <
opennsl/types.h
>
20
#include <
opennsl/switch.h
>
21
#include <
shared/port.h
>
22
23
/***************************************************************************/
33
extern
int
opennsl_cosq_init
(
34
int
unit)
LIB_DLL_EXPORTED
;
35
36
/***************************************************************************/
47
extern
int
opennsl_cosq_detach
(
48
int
unit)
LIB_DLL_EXPORTED
;
49
50
/***************************************************************************/
82
extern
int
opennsl_cosq_config_set
(
83
int
unit,
84
int
numq)
LIB_DLL_EXPORTED
;
85
86
/***************************************************************************/
118
extern
int
opennsl_cosq_config_get
(
119
int
unit,
120
int
*numq)
LIB_DLL_EXPORTED
;
121
122
/***************************************************************************/
154
extern
int
opennsl_cosq_mapping_set
(
155
int
unit,
156
opennsl_cos_t
priority,
157
opennsl_cos_queue_t
cosq)
LIB_DLL_EXPORTED
;
158
159
/***************************************************************************/
191
extern
int
opennsl_cosq_mapping_get
(
192
int
unit,
193
opennsl_cos_t
priority,
194
opennsl_cos_queue_t
*cosq)
LIB_DLL_EXPORTED
;
195
196
/***************************************************************************/
229
extern
int
opennsl_cosq_port_mapping_set
(
230
int
unit,
231
opennsl_port_t
port
,
232
opennsl_cos_t
priority,
233
opennsl_cos_queue_t
cosq)
LIB_DLL_EXPORTED
;
234
235
/***************************************************************************/
268
extern
int
opennsl_cosq_port_mapping_get
(
269
int
unit,
270
opennsl_port_t
port
,
271
opennsl_cos_t
priority,
272
opennsl_cos_queue_t
*cosq)
LIB_DLL_EXPORTED
;
273
274
/***************************************************************************/
313
extern
int
opennsl_cosq_port_mapping_multi_set
(
314
int
unit,
315
opennsl_port_t
port
,
316
int
count,
317
opennsl_cos_t
*priority_array,
318
opennsl_cos_queue_t
*cosq_array)
LIB_DLL_EXPORTED
;
319
320
/***************************************************************************/
359
extern
int
opennsl_cosq_port_mapping_multi_get
(
360
int
unit,
361
opennsl_port_t
port
,
362
int
count,
363
opennsl_cos_t
*priority_array,
364
opennsl_cos_queue_t
*cosq_array)
LIB_DLL_EXPORTED
;
365
366
#define OPENNSL_COSQ_NONE 0x0
367
#define OPENNSL_COSQ_STRICT 0x01
368
#define OPENNSL_COSQ_ROUND_ROBIN 0x02
369
#define OPENNSL_COSQ_WEIGHTED_ROUND_ROBIN 0x03
370
#define OPENNSL_COSQ_WEIGHTED_FAIR_QUEUING 0x04
371
#define OPENNSL_COSQ_DEFICIT_ROUND_ROBIN 0x05
372
#define OPENNSL_COSQ_SP0 0x0C
374
#define OPENNSL_COSQ_SP1 0x0D
376
#define OPENNSL_COSQ_WEIGHT_UNLIMITED -1
377
#define OPENNSL_COSQ_WEIGHT_STRICT 0
378
#define OPENNSL_COSQ_WEIGHT_MIN 1
379
#define OPENNSL_COSQ_PRIO_VALID(prio) ((prio) >= 0 && (prio < 8))
380
#define OPENNSL_COSQ_QUEUE_VALID(unit, numq) \
381
((numq) >= 0 && (numq) < NUM_COS(unit))
382
/***************************************************************************/
422
extern
int
opennsl_cosq_sched_set
(
423
int
unit,
424
int
mode,
425
const
int
weights[
OPENNSL_COS_COUNT
],
426
int
delay)
LIB_DLL_EXPORTED
;
427
428
/***************************************************************************/
469
extern
int
opennsl_cosq_port_sched_set
(
470
int
unit,
471
opennsl_pbmp_t
pbm,
472
int
mode,
473
const
int
weights[
OPENNSL_COS_COUNT
],
474
int
delay)
LIB_DLL_EXPORTED
;
475
476
/***************************************************************************/
516
extern
int
opennsl_cosq_sched_get
(
517
int
unit,
518
int
*mode,
519
int
weights[
OPENNSL_COS_COUNT
],
520
int
*delay)
LIB_DLL_EXPORTED
;
521
522
/***************************************************************************/
563
extern
int
opennsl_cosq_port_sched_get
(
564
int
unit,
565
opennsl_pbmp_t
pbm,
566
int
*mode,
567
int
weights[
OPENNSL_COS_COUNT
],
568
int
*delay)
LIB_DLL_EXPORTED
;
569
570
/***************************************************************************/
582
extern
int
opennsl_cosq_sched_weight_max_get
(
583
int
unit,
584
int
mode,
585
int
*weight_max)
LIB_DLL_EXPORTED
;
586
587
#define OPENNSL_COSQ_ALL 0x00000001
588
#define OPENNSL_COSQ_BW_EAV_MODE 0x00000008
591
#define OPENNSL_COSQ_BW_LLFC 0x00000010
593
#define OPENNSL_COSQ_BW_PACKET_MODE 0x00000020
596
#define OPENNSL_COSQ_BW_NOT_COMMIT 0x00000040
600
/***************************************************************************/
629
extern int opennsl_cosq_port_bandwidth_set(
630
int
unit,
631
opennsl_port_t
port
,
632
opennsl_cos_queue_t
cosq,
633
uint32
kbits_sec_min,
634
uint32
kbits_sec_max,
635
uint32
flags)
LIB_DLL_EXPORTED
;
636
637
/***************************************************************************/
666
extern
int
opennsl_cosq_port_bandwidth_get
(
667
int
unit,
668
opennsl_port_t
port
,
669
opennsl_cos_queue_t
cosq,
670
uint32
*kbits_sec_min,
671
uint32
*kbits_sec_max,
672
uint32
*flags)
LIB_DLL_EXPORTED
;
673
674
#define OPENNSL_COSQ_DISCARD_ENABLE 0x0001
675
#define OPENNSL_COSQ_DISCARD_NONTCP 0x0004
676
#define OPENNSL_COSQ_DISCARD_COLOR_GREEN 0x0100
677
#define OPENNSL_COSQ_DISCARD_COLOR_YELLOW 0x0200
678
#define OPENNSL_COSQ_DISCARD_COLOR_RED 0x0400
679
#define OPENNSL_COSQ_DISCARD_COLOR_BLACK 0x0800
680
#define OPENNSL_COSQ_DISCARD_COLOR_ALL 0x0F00
681
#define OPENNSL_COSQ_DISCARD_DROP_FIRST OPENNSL_COSQ_DISCARD_COLOR_RED
682
#define OPENNSL_COSQ_DISCARD_PACKETS 0x1000
683
#define OPENNSL_COSQ_DISCARD_BYTES 0x2000
684
#define OPENNSL_COSQ_DISCARD_MARK_CONGESTION 0x4000
685
#define OPENNSL_COSQ_DISCARD_PORT 0x8000
686
#define OPENNSL_COSQ_DISCARD_DEVICE 0x10000
687
#define OPENNSL_COSQ_DISCARD_TCP 0x40000
688
#define OPENNSL_COSQ_DISCARD_SYSTEM 0x80000
689
#define OPENNSL_COSQ_DISCARD_PROBABILITY1 0x100000
690
#define OPENNSL_COSQ_DISCARD_PROBABILITY2 0x200000
691
#define OPENNSL_COSQ_DISCARD_IFP 0x400000
692
#define OPENNSL_COSQ_DISCARD_OUTER_CFI 0x800000
693
/***************************************************************************/
704
extern
int
opennsl_cosq_discard_set
(
705
int
unit,
706
uint32
flags)
LIB_DLL_EXPORTED
;
707
708
/***************************************************************************/
719
extern
int
opennsl_cosq_discard_get
(
720
int
unit,
721
uint32
*flags)
LIB_DLL_EXPORTED
;
722
723
/***************************************************************************/
780
extern
int
opennsl_cosq_discard_port_set
(
781
int
unit,
782
opennsl_port_t
port
,
783
opennsl_cos_queue_t
cosq,
784
uint32
color,
785
int
drop_start,
786
int
drop_slope,
787
int
average_time)
LIB_DLL_EXPORTED
;
788
789
/***************************************************************************/
846
extern
int
opennsl_cosq_discard_port_get
(
847
int
unit,
848
opennsl_port_t
port
,
849
opennsl_cos_queue_t
cosq,
850
uint32
color,
851
int
*drop_start,
852
int
*drop_slope,
853
int
*average_time)
LIB_DLL_EXPORTED
;
854
855
#define OPENNSL_COSQ_HIGH_PRIORITY -4
856
#define OPENNSL_COSQ_LOW_PRIORITY -5
857
858
typedef
enum
opennsl_cosq_control_e
{
859
opennslCosqControlEgressUCQueueSharedLimitBytes
= 79,
860
opennslCosqControlEgressMCQueueMinLimitBytes
= 84,
861
opennslCosqControlPortQueueUcast
= 103,
863
opennslCosqControlPortQueueMcast
= 104,
865
}
opennsl_cosq_control_t
;
866
/* __doxy_func_body_end__ */
867
868
/***************************************************************************/
884
extern
int
opennsl_cosq_control_set
(
885
int
unit,
886
opennsl_gport_t
port
,
887
opennsl_cos_queue_t
cosq,
888
opennsl_cosq_control_t
type,
889
int
arg)
LIB_DLL_EXPORTED
;
890
891
/***************************************************************************/
907
extern
int
opennsl_cosq_control_get
(
908
int
unit,
909
opennsl_gport_t
port
,
910
opennsl_cos_queue_t
cosq,
911
opennsl_cosq_control_t
type,
912
int
*arg)
LIB_DLL_EXPORTED
;
913
915
typedef
struct
opennsl_cosq_gport_discard_s
{
916
uint32
flags
;
917
int
min_thresh
;
918
int
max_thresh
;
919
int
drop_probability
;
920
}
opennsl_cosq_gport_discard_t
;
921
/* __doxy_func_body_end__ */
922
924
typedef
enum
opennsl_cosq_gport_stats_e
{
925
opennslCosqGportGreenAcceptedPkts
= 0,
926
opennslCosqGportGreenAcceptedBytes
= 1,
927
opennslCosqGportNotGreenAcceptedPkts
= 2,
929
opennslCosqGportNotGreenAcceptedBytes
= 3,
930
opennslCosqGportGreenCongestionMarkedPkts
= 4,
931
opennslCosqGportGreenCongestionMarkedBytes
= 5,
932
opennslCosqGportGreenDiscardDroppedPkts
= 6,
933
opennslCosqGportGreenDiscardDroppedBytes
= 7,
934
opennslCosqGportYellowAcceptedPkts
= 8,
935
opennslCosqGportYellowAcceptedBytes
= 9,
936
opennslCosqGportYellowCongestionMarkedPkts
= 10,
937
opennslCosqGportYellowCongestionMarkedBytes
= 11,
938
opennslCosqGportYellowDiscardDroppedPkts
= 12,
939
opennslCosqGportYellowDiscardDroppedBytes
= 13,
940
opennslCosqGportRedAcceptedPkts
= 14,
941
opennslCosqGportRedAcceptedBytes
= 15,
942
opennslCosqGportRedCongestionMarkedPkts
= 16,
943
opennslCosqGportRedCongestionMarkedBytes
= 17,
944
opennslCosqGportRedDiscardDroppedPkts
= 18,
945
opennslCosqGportRedDiscardDroppedBytes
= 19,
946
opennslCosqGportBlackAcceptedPkts
= 20,
947
opennslCosqGportBlackAcceptedBytes
= 21,
948
opennslCosqGportNonWredDroppedPkts
= 22,
949
opennslCosqGportNonWredDroppedBytes
= 23,
950
opennslCosqGportDequeuedPkts
= 24,
951
opennslCosqGportDequeuedBytes
= 25,
952
opennslCosqGportGreenDroppedPkts
= 26,
953
opennslCosqGportGreenDroppedBytes
= 27,
954
opennslCosqGportNotGreenDroppedPkts
= 28,
955
opennslCosqGportNotGreenDroppedBytes
= 29,
956
opennslCosqGportYellowDroppedPkts
= 30,
957
opennslCosqGportYellowDroppedBytes
= 31,
958
opennslCosqGportRedDroppedPkts
= 32,
959
opennslCosqGportRedDroppedBytes
= 33,
960
opennslCosqGportBlackCongestionMarkedPkts
= 34,
961
opennslCosqGportBlackCongestionMarkedBytes
= 35,
962
opennslCosqGportBlackDiscardDroppedPkts
= 36,
963
opennslCosqGportBlackDiscardDroppedBytes
= 37,
964
opennslCosqGportBlackDroppedPkts
= 38,
966
opennslCosqGportBlackDroppedBytes
= 39,
967
opennslCosqGportOverSubscribeTotelDroppedPkts
= 40,
968
opennslCosqGportOverSubscribeTotalDroppedBytes
= 41,
969
opennslCosqGportOverSubscribeGuaranteeDroppedPkts
= 42,
971
opennslCosqGportOverSubscribeGuaranteedDroppedBytes
= 43,
973
opennslCosqGportDiscardDroppedPkts
= 44,
974
opennslCosqGportDiscardDroppedBytes
= 45,
975
opennslCosqGportYellowRedDiscardDroppedPkts
= 46,
976
opennslCosqGportYellowRedDiscardDroppedBytes
= 47,
977
opennslCosqGportEnqueuedPkts
= 48,
978
opennslCosqGportEnqueuedBytes
= 49,
979
opennslCosqGportOutLimitDroppedPkts
= 50,
981
opennslCosqGportOutLimitDroppedBytes
= 51,
982
opennslCosqGportOutLimitDroppedGreenPkts
= 52,
983
opennslCosqGportOutLimitDroppedGreenBytes
= 53,
984
opennslCosqGportOutLimitDroppedYellowPkts
= 54,
985
opennslCosqGportOutLimitDroppedYellowBytes
= 55,
986
opennslCosqGportOutLimitDroppedRedPkts
= 56,
987
opennslCosqGportOutLimitDroppedRedBytes
= 57,
988
opennslCosqGportOutLimitDroppedMulticastPkts
= 58,
989
opennslCosqGportOutLimitDroppedMulticastBytes
= 59,
990
opennslCosqGportOutPkts
= 60,
991
opennslCosqGportOutBytes
= 61,
992
opennslCosqGportReceivedBytes
= 62,
993
opennslCosqGportReceivedPkts
= 63,
994
opennslCosqGportDroppedBytes
= 64,
995
opennslCosqGportDroppedPkts
= 65,
996
opennslCosqGportDelayedBytes
= 66,
997
opennslCosqGportDelayedHundredUs
= 67,
998
opennslCosqGportGreenPkts
= 68,
999
opennslCosqGportGreenBytes
= 69,
1000
opennslCosqGportNotGreenPkts
= 70,
1001
opennslCosqGportNotGreenBytes
= 71,
1002
opennslCosqGportOffset0Bytes
= 72,
1003
opennslCosqGportOffset0Packets
= 73,
1005
opennslCosqGportOffset1Bytes
= 74,
1006
opennslCosqGportOffset1Packets
= 75,
1008
opennslCosqGportOffset2Bytes
= 76,
1009
opennslCosqGportOffset2Packets
= 77,
1011
opennslCosqGportOffset3Bytes
= 78,
1012
opennslCosqGportOffset3Packets
= 79,
1014
opennslCosqGportOffset4Bytes
= 80,
1015
opennslCosqGportOffset4Packets
= 81,
1017
opennslCosqGportOffset5Bytes
= 82,
1018
opennslCosqGportOffset5Packets
= 83,
1020
opennslCosqGportOffset6Bytes
= 84,
1021
opennslCosqGportOffset6Packets
= 85,
1023
opennslCosqGportOffset7Bytes
= 86,
1024
opennslCosqGportOffset7Packets
= 87,
1026
opennslCosqGportStatCount
= 88
1027
}
opennsl_cosq_gport_stats_t
;
1028
/* __doxy_func_body_end__ */
1029
1030
#define OPENNSL_COSQ_GPORT_STATS_SHARED 0x00000001
1031
1032
typedef
struct
opennsl_cosq_gport_stat_profile_s
{
1033
SHR_BITDCL
stats
[
_SHR_BITDCLSIZE
(
opennslCosqGportOutBytes
)];
1034
}
opennsl_cosq_gport_stat_profile_t
;
1035
/* __doxy_func_body_end__ */
1036
1037
/***************************************************************************/
1050
extern
int
opennsl_cosq_priority_set
(
1051
int
unit,
1052
int
start_queue,
1053
int
end_queue,
1054
int
pri_profile_id)
LIB_DLL_EXPORTED
;
1055
1056
/***************************************************************************/
1070
extern
int
opennsl_cosq_priority_get
(
1071
int
unit,
1072
int
start_queue,
1073
int
end_queue,
1074
int
*pri_profile_id)
LIB_DLL_EXPORTED
;
1075
1076
/***************************************************************************/
1181
extern
int
opennsl_cosq_gport_get
(
1182
int
unit,
1183
opennsl_gport_t
gport,
1184
opennsl_gport_t
*physical_port,
1185
int
*num_cos_levels,
1186
uint32
*flags)
LIB_DLL_EXPORTED
;
1187
1188
typedef
int (*
opennsl_cosq_gport_traverse_cb
)(
1189
int
unit,
1190
opennsl_gport_t
port
,
1191
int
numq,
1192
uint32
flags,
1193
opennsl_gport_t
gport,
1194
void
*user_data);
1195
1196
/***************************************************************************/
1209
extern
int
opennsl_cosq_gport_traverse
(
1210
int
unit,
1211
opennsl_cosq_gport_traverse_cb
cb,
1212
void
*user_data)
LIB_DLL_EXPORTED
;
1213
1214
/***************************************************************************/
1231
extern
int
opennsl_cosq_gport_enable_set
(
1232
int
unit,
1233
opennsl_gport_t
gport,
1234
opennsl_cos_queue_t
cosq,
1235
int
enable)
LIB_DLL_EXPORTED
;
1236
1237
/***************************************************************************/
1252
extern
int
opennsl_cosq_gport_stat_sync_get
(
1253
int
unit,
1254
opennsl_gport_t
gport,
1255
opennsl_cos_queue_t
cosq,
1256
opennsl_cosq_gport_stats_t
stat,
1257
uint64
*value)
LIB_DLL_EXPORTED
;
1258
1259
/***************************************************************************/
1276
extern
int
opennsl_cosq_gport_enable_get
(
1277
int
unit,
1278
opennsl_gport_t
gport,
1279
opennsl_cos_queue_t
cosq,
1280
int
*enable)
LIB_DLL_EXPORTED
;
1281
1282
/***************************************************************************/
1293
extern
int
opennsl_cosq_gport_stat_enable_set
(
1294
int
unit,
1295
opennsl_gport_t
gport,
1296
int
enable)
LIB_DLL_EXPORTED
;
1297
1298
/***************************************************************************/
1309
extern
int
opennsl_cosq_gport_stat_enable_get
(
1310
int
unit,
1311
opennsl_gport_t
gport,
1312
int
*enable)
LIB_DLL_EXPORTED
;
1313
1314
/***************************************************************************/
1332
extern
int
opennsl_cosq_gport_stat_get
(
1333
int
unit,
1334
opennsl_gport_t
gport,
1335
opennsl_cos_queue_t
cosq,
1336
opennsl_cosq_gport_stats_t
stat,
1337
uint64
*value)
LIB_DLL_EXPORTED
;
1338
1339
/***************************************************************************/
1357
extern
int
opennsl_cosq_gport_stat_set
(
1358
int
unit,
1359
opennsl_gport_t
gport,
1360
opennsl_cos_queue_t
cosq,
1361
opennsl_cosq_gport_stats_t
stat,
1362
uint64
value)
LIB_DLL_EXPORTED
;
1363
1364
/***************************************************************************/
1394
extern
int
opennsl_cosq_gport_stat_config_get
(
1395
int
unit,
1396
opennsl_gport_t
gport,
1397
opennsl_gport_t
lgl_gport,
1398
opennsl_cos_queue_t
cosq,
1399
uint32
flags,
1400
opennsl_cosq_gport_stat_profile_t
*profile)
LIB_DLL_EXPORTED
;
1401
1402
/***************************************************************************/
1455
extern
int
opennsl_cosq_gport_stat_config_set
(
1456
int
unit,
1457
opennsl_gport_t
gport,
1458
opennsl_gport_t
lgl_gport,
1459
opennsl_cos_queue_t
cosq,
1460
uint32
flags,
1461
opennsl_cosq_gport_stat_profile_t
profile)
LIB_DLL_EXPORTED
;
1462
1463
/***************************************************************************/
1498
extern
int
opennsl_cosq_gport_statistic_get
(
1499
int
unit,
1500
opennsl_gport_t
gport,
1501
opennsl_gport_t
lgl_gport,
1502
opennsl_cos_queue_t
cosq,
1503
uint32
flags,
1504
opennsl_cosq_gport_stats_t
stat,
1505
uint64
*value)
LIB_DLL_EXPORTED
;
1506
1507
/***************************************************************************/
1538
extern
int
opennsl_cosq_gport_statistic_set
(
1539
int
unit,
1540
opennsl_gport_t
gport,
1541
opennsl_gport_t
lgl_gport,
1542
opennsl_cos_queue_t
cosq,
1543
uint32
flags,
1544
opennsl_cosq_gport_stats_t
stat,
1545
uint64
value)
LIB_DLL_EXPORTED
;
1546
1547
#define OPENNSL_COSQ_GPORT_WITH_ID 0x00000001
1548
#define OPENNSL_COSQ_GPORT_SCHEDULER 0x00000002
1549
#define OPENNSL_COSQ_GPORT_OVERLAY 0x00000004
1550
#define OPENNSL_COSQ_GPORT_UCAST_QUEUE_GROUP 0x00000008
1551
#define OPENNSL_COSQ_GPORT_DESTMOD_UCAST_QUEUE_GROUP 0x00000010
1552
#define OPENNSL_COSQ_GPORT_MCAST_QUEUE 0x00000010
1553
#define OPENNSL_COSQ_GPORT_MCAST_QUEUE_GROUP 0x00000020
1554
#define OPENNSL_COSQ_GPORT_SUBSCRIBER 0x00000040
1555
#define OPENNSL_COSQ_GPORT_EGRESS_GROUP 0x00000080
1556
#define OPENNSL_COSQ_GPORT_DISABLE 0x00000100
1560
/***************************************************************************/
1666
extern int opennsl_cosq_gport_add(
1667
int
unit,
1668
opennsl_gport_t
port
,
1669
int
numq,
1670
uint32
flags,
1671
opennsl_gport_t
*gport)
LIB_DLL_EXPORTED
;
1672
1673
/***************************************************************************/
1687
extern
int
opennsl_cosq_gport_delete
(
1688
int
unit,
1689
opennsl_gport_t
gport)
LIB_DLL_EXPORTED
;
1690
1691
/***************************************************************************/
1722
extern
int
opennsl_cosq_gport_mapping_set
(
1723
int
unit,
1724
opennsl_port_t
ing_port,
1725
opennsl_cos_t
int_pri,
1726
uint32
flags,
1727
opennsl_gport_t
gport,
1728
opennsl_cos_queue_t
cosq)
LIB_DLL_EXPORTED
;
1729
1730
/***************************************************************************/
1761
extern
int
opennsl_cosq_gport_mapping_get
(
1762
int
unit,
1763
opennsl_port_t
ing_port,
1764
opennsl_cos_t
int_pri,
1765
uint32
flags,
1766
opennsl_gport_t
*gport,
1767
opennsl_cos_queue_t
*cosq)
LIB_DLL_EXPORTED
;
1768
1769
/***************************************************************************/
1791
extern
int
opennsl_cosq_gport_bandwidth_set
(
1792
int
unit,
1793
opennsl_gport_t
gport,
1794
opennsl_cos_queue_t
cosq,
1795
uint32
kbits_sec_min,
1796
uint32
kbits_sec_max,
1797
uint32
flags)
LIB_DLL_EXPORTED
;
1798
1799
/***************************************************************************/
1821
extern
int
opennsl_cosq_gport_bandwidth_get
(
1822
int
unit,
1823
opennsl_gport_t
gport,
1824
opennsl_cos_queue_t
cosq,
1825
uint32
*kbits_sec_min,
1826
uint32
*kbits_sec_max,
1827
uint32
*flags)
LIB_DLL_EXPORTED
;
1828
1829
/***************************************************************************/
1849
extern
int
opennsl_cosq_gport_sched_set
(
1850
int
unit,
1851
opennsl_gport_t
gport,
1852
opennsl_cos_queue_t
cosq,
1853
int
mode,
1854
int
weight)
LIB_DLL_EXPORTED
;
1855
1856
/***************************************************************************/
1876
extern
int
opennsl_cosq_gport_sched_get
(
1877
int
unit,
1878
opennsl_gport_t
gport,
1879
opennsl_cos_queue_t
cosq,
1880
int
*mode,
1881
int
*weight)
LIB_DLL_EXPORTED
;
1882
1883
/***************************************************************************/
1899
extern
int
opennsl_cosq_gport_discard_set
(
1900
int
unit,
1901
opennsl_gport_t
gport,
1902
opennsl_cos_queue_t
cosq,
1903
opennsl_cosq_gport_discard_t
*discard)
LIB_DLL_EXPORTED
;
1904
1905
/***************************************************************************/
1921
extern
int
opennsl_cosq_gport_discard_get
(
1922
int
unit,
1923
opennsl_gport_t
gport,
1924
opennsl_cos_queue_t
cosq,
1925
opennsl_cosq_gport_discard_t
*discard)
LIB_DLL_EXPORTED
;
1926
1927
/***************************************************************************/
1942
extern
int
opennsl_cosq_gport_sched_config_set
(
1943
int
unit,
1944
opennsl_gport_t
gport,
1945
int
sched_mode,
1946
int
int_pri,
1947
uint32
flags)
LIB_DLL_EXPORTED
;
1948
1949
/***************************************************************************/
1964
extern
int
opennsl_cosq_gport_sched_config_get
(
1965
int
unit,
1966
opennsl_gport_t
gport,
1967
int
sched_mode,
1968
int
int_pri,
1969
uint32
*flags)
LIB_DLL_EXPORTED
;
1970
1971
/***************************************************************************/
2008
extern
int
opennsl_cosq_gport_attach
(
2009
int
unit,
2010
opennsl_gport_t
sched_port,
2011
opennsl_gport_t
input_port,
2012
opennsl_cos_queue_t
cosq)
LIB_DLL_EXPORTED
;
2013
2014
/***************************************************************************/
2051
extern
int
opennsl_cosq_gport_detach
(
2052
int
unit,
2053
opennsl_gport_t
sched_port,
2054
opennsl_gport_t
input_port,
2055
opennsl_cos_queue_t
cosq)
LIB_DLL_EXPORTED
;
2056
2057
/***************************************************************************/
2094
extern
int
opennsl_cosq_gport_attach_get
(
2095
int
unit,
2096
opennsl_gport_t
sched_port,
2097
opennsl_gport_t
*input_port,
2098
opennsl_cos_queue_t
*cosq)
LIB_DLL_EXPORTED
;
2099
2100
/***************************************************************************/
2114
extern
int
opennsl_cosq_gport_child_get
(
2115
int
unit,
2116
opennsl_gport_t
in_gport,
2117
opennsl_cos_queue_t
cosq,
2118
opennsl_gport_t
*out_gport)
LIB_DLL_EXPORTED
;
2119
2120
/***************************************************************************/
2137
extern
int
opennsl_cosq_gport_egress_map_set
(
2138
int
unit,
2139
opennsl_gport_t
gport,
2140
opennsl_cos_t
ingress_pri,
2141
opennsl_color_t
ingress_dp,
2142
opennsl_cos_queue_t
offset)
LIB_DLL_EXPORTED
;
2143
2144
/***************************************************************************/
2161
extern
int
opennsl_cosq_gport_egress_map_get
(
2162
int
unit,
2163
opennsl_gport_t
gport,
2164
opennsl_cos_t
ingress_pri,
2165
opennsl_color_t
ingress_dp,
2166
opennsl_cos_queue_t
*offset)
LIB_DLL_EXPORTED
;
2167
2168
#define OPENNSL_COSQ_MULTICAST_SCHEDULED 0x00000001
2171
typedef struct opennsl_cosq_egress_multicast_config_s {
2172
opennsl_color_t
scheduled_dp
;
2173
opennsl_cos_t
priority
;
2174
int
unscheduled_se
;
2175
int
unscheduled_sp
;
2176
}
opennsl_cosq_egress_multicast_config_t
;
2177
/* __doxy_func_body_end__ */
2178
2179
/***************************************************************************/
2207
extern
int
opennsl_cosq_gport_egress_multicast_config_set
(
2208
int
unit,
2209
opennsl_gport_t
gport,
2210
opennsl_cos_t
ingress_pri,
2211
opennsl_color_t
ingress_dp,
2212
uint32
flags,
2213
opennsl_cosq_egress_multicast_config_t
*config)
LIB_DLL_EXPORTED
;
2214
2215
/***************************************************************************/
2243
extern
int
opennsl_cosq_gport_egress_multicast_config_get
(
2244
int
unit,
2245
opennsl_gport_t
gport,
2246
opennsl_cos_t
ingress_pri,
2247
opennsl_color_t
ingress_dp,
2248
uint32
flags,
2249
opennsl_cosq_egress_multicast_config_t
*config)
LIB_DLL_EXPORTED
;
2250
2252
typedef
enum
opennsl_cosq_gport_type_e
{
2253
opennslCosqGportTypeUnicastEgress
= 1,
2255
opennslCosqGportTypeMulticastEgress
= 2,
2257
opennslCosqGportTypeLocalPort
= 6,
2258
}
opennsl_cosq_gport_type_t
;
2259
/* __doxy_func_body_end__ */
2260
2262
typedef
struct
opennsl_cosq_gport_info_s
{
2263
opennsl_gport_t
in_gport
;
2265
opennsl_cos_queue_t
cosq
;
2266
opennsl_gport_t
out_gport
;
2267
}
opennsl_cosq_gport_info_t
;
2268
/* __doxy_func_body_end__ */
2269
2270
/***************************************************************************/
2285
extern
int
opennsl_cosq_gport_handle_get
(
2286
int
unit,
2287
opennsl_cosq_gport_type_t
gport_type,
2288
opennsl_cosq_gport_info_t
*gport_info)
LIB_DLL_EXPORTED
;
2289
2291
typedef
enum
opennsl_cosq_stat_e
{
2292
opennslCosqStatDroppedPackets
= 0,
2293
opennslCosqStatDroppedBytes
= 1,
2294
opennslCosqStatYellowCongestionDroppedPackets
= 2,
2296
opennslCosqStatRedCongestionDroppedPackets
= 3,
2298
opennslCosqStatGreenDiscardDroppedPackets
= 4,
2299
opennslCosqStatYellowDiscardDroppedPackets
= 5,
2300
opennslCosqStatRedDiscardDroppedPackets
= 6,
2301
opennslCosqStatOutPackets
= 7,
2302
opennslCosqStatOutBytes
= 8,
2303
}
opennsl_cosq_stat_t
;
2304
/* __doxy_func_body_end__ */
2305
2306
/***************************************************************************/
2333
extern
int
opennsl_cosq_stat_get
(
2334
int
unit,
2335
opennsl_gport_t
gport,
2336
opennsl_cos_queue_t
cosq,
2337
opennsl_cosq_stat_t
stat,
2338
uint64
*value)
LIB_DLL_EXPORTED
;
2339
2340
/***************************************************************************/
2363
extern
int
opennsl_cosq_stat_sync_get
(
2364
int
unit,
2365
opennsl_gport_t
gport,
2366
opennsl_cos_queue_t
cosq,
2367
opennsl_cosq_stat_t
stat,
2368
uint64
*value)
LIB_DLL_EXPORTED
;
2369
2370
/***************************************************************************/
2397
extern
int
opennsl_cosq_stat_set
(
2398
int
unit,
2399
opennsl_gport_t
gport,
2400
opennsl_cos_queue_t
cosq,
2401
opennsl_cosq_stat_t
stat,
2402
uint64
value)
LIB_DLL_EXPORTED
;
2403
2404
#if defined(INCLUDE_TCB)
2405
#endif
2406
#if defined(INCLUDE_TCB)
2407
#endif
2408
#if defined(INCLUDE_TCB)
2409
#endif
2410
#endif
/* __OPENNSL_COSQX_H__ */
2411
© 2016-17 by Broadcom Limited. All rights reserved.