@@ -6333,6 +6333,14 @@ void PortsOrch::generateQueueMap(map<string, FlexCounterQueueStates> queuesState
6333
6333
return ;
6334
6334
}
6335
6335
6336
+ bool isCreateAllQueues = false ;
6337
+
6338
+ if (queuesStateVector.count (createAllAvailableBuffersStr))
6339
+ {
6340
+ isCreateAllQueues = true ;
6341
+ queuesStateVector.clear ();
6342
+ }
6343
+
6336
6344
for (const auto & it: m_portList)
6337
6345
{
6338
6346
if (it.second .m_type == Port::PHY)
@@ -6341,6 +6349,10 @@ void PortsOrch::generateQueueMap(map<string, FlexCounterQueueStates> queuesState
6341
6349
{
6342
6350
auto maxQueueNumber = getNumberOfPortSupportedQueueCounters (it.second .m_alias );
6343
6351
FlexCounterQueueStates flexCounterQueueState (maxQueueNumber);
6352
+ if (isCreateAllQueues)
6353
+ {
6354
+ flexCounterQueueState.enableQueueCounters (0 , maxQueueNumber - 1 );
6355
+ }
6344
6356
queuesStateVector.insert (make_pair (it.second .m_alias , flexCounterQueueState));
6345
6357
}
6346
6358
generateQueueMapPerPort (it.second , queuesStateVector.at (it.second .m_alias ), false );
@@ -6459,6 +6471,14 @@ void PortsOrch::addQueueFlexCounters(map<string, FlexCounterQueueStates> queuesS
6459
6471
return ;
6460
6472
}
6461
6473
6474
+ bool isCreateAllQueues = false ;
6475
+
6476
+ if (queuesStateVector.count (createAllAvailableBuffersStr))
6477
+ {
6478
+ isCreateAllQueues = true ;
6479
+ queuesStateVector.clear ();
6480
+ }
6481
+
6462
6482
for (const auto & it: m_portList)
6463
6483
{
6464
6484
if (it.second .m_type == Port::PHY)
@@ -6467,6 +6487,10 @@ void PortsOrch::addQueueFlexCounters(map<string, FlexCounterQueueStates> queuesS
6467
6487
{
6468
6488
auto maxQueueNumber = getNumberOfPortSupportedQueueCounters (it.second .m_alias );
6469
6489
FlexCounterQueueStates flexCounterQueueState (maxQueueNumber);
6490
+ if (isCreateAllQueues)
6491
+ {
6492
+ flexCounterQueueState.enableQueueCounters (0 , maxQueueNumber - 1 );
6493
+ }
6470
6494
queuesStateVector.insert (make_pair (it.second .m_alias , flexCounterQueueState));
6471
6495
}
6472
6496
addQueueFlexCountersPerPort (it.second , queuesStateVector.at (it.second .m_alias ));
@@ -6524,6 +6548,14 @@ void PortsOrch::addQueueWatermarkFlexCounters(map<string, FlexCounterQueueStates
6524
6548
return ;
6525
6549
}
6526
6550
6551
+ bool isCreateAllQueues = false ;
6552
+
6553
+ if (queuesStateVector.count (createAllAvailableBuffersStr))
6554
+ {
6555
+ isCreateAllQueues = true ;
6556
+ queuesStateVector.clear ();
6557
+ }
6558
+
6527
6559
for (const auto & it: m_portList)
6528
6560
{
6529
6561
if (it.second .m_type == Port::PHY)
@@ -6532,6 +6564,10 @@ void PortsOrch::addQueueWatermarkFlexCounters(map<string, FlexCounterQueueStates
6532
6564
{
6533
6565
auto maxQueueNumber = getNumberOfPortSupportedQueueCounters (it.second .m_alias );
6534
6566
FlexCounterQueueStates flexCounterQueueState (maxQueueNumber);
6567
+ if (isCreateAllQueues)
6568
+ {
6569
+ flexCounterQueueState.enableQueueCounters (0 , maxQueueNumber - 1 );
6570
+ }
6535
6571
queuesStateVector.insert (make_pair (it.second .m_alias , flexCounterQueueState));
6536
6572
}
6537
6573
addQueueWatermarkFlexCountersPerPort (it.second , queuesStateVector.at (it.second .m_alias ));
@@ -6695,6 +6731,14 @@ void PortsOrch::generatePriorityGroupMap(map<string, FlexCounterPgStates> pgsSta
6695
6731
return ;
6696
6732
}
6697
6733
6734
+ bool isCreateAllPgs = false ;
6735
+
6736
+ if (pgsStateVector.count (createAllAvailableBuffersStr))
6737
+ {
6738
+ isCreateAllPgs = true ;
6739
+ pgsStateVector.clear ();
6740
+ }
6741
+
6698
6742
for (const auto & it: m_portList)
6699
6743
{
6700
6744
if (it.second .m_type == Port::PHY)
@@ -6703,6 +6747,10 @@ void PortsOrch::generatePriorityGroupMap(map<string, FlexCounterPgStates> pgsSta
6703
6747
{
6704
6748
auto maxPgNumber = getNumberOfPortSupportedPgCounters (it.second .m_alias );
6705
6749
FlexCounterPgStates flexCounterPgState (maxPgNumber);
6750
+ if (isCreateAllPgs)
6751
+ {
6752
+ flexCounterPgState.enablePgCounters (0 , maxPgNumber - 1 );
6753
+ }
6706
6754
pgsStateVector.insert (make_pair (it.second .m_alias , flexCounterPgState));
6707
6755
}
6708
6756
generatePriorityGroupMapPerPort (it.second , pgsStateVector.at (it.second .m_alias ));
@@ -6799,6 +6847,14 @@ void PortsOrch::addPriorityGroupFlexCounters(map<string, FlexCounterPgStates> pg
6799
6847
return ;
6800
6848
}
6801
6849
6850
+ bool isCreateAllPgs = false ;
6851
+
6852
+ if (pgsStateVector.count (createAllAvailableBuffersStr))
6853
+ {
6854
+ isCreateAllPgs = true ;
6855
+ pgsStateVector.clear ();
6856
+ }
6857
+
6802
6858
for (const auto & it: m_portList)
6803
6859
{
6804
6860
if (it.second .m_type == Port::PHY)
@@ -6807,6 +6863,10 @@ void PortsOrch::addPriorityGroupFlexCounters(map<string, FlexCounterPgStates> pg
6807
6863
{
6808
6864
auto maxPgNumber = getNumberOfPortSupportedPgCounters (it.second .m_alias );
6809
6865
FlexCounterPgStates flexCounterPgState (maxPgNumber);
6866
+ if (isCreateAllPgs)
6867
+ {
6868
+ flexCounterPgState.enablePgCounters (0 , maxPgNumber - 1 );
6869
+ }
6810
6870
pgsStateVector.insert (make_pair (it.second .m_alias , flexCounterPgState));
6811
6871
}
6812
6872
addPriorityGroupFlexCountersPerPort (it.second , pgsStateVector.at (it.second .m_alias ));
@@ -6856,6 +6916,14 @@ void PortsOrch::addPriorityGroupWatermarkFlexCounters(map<string, FlexCounterPgS
6856
6916
return ;
6857
6917
}
6858
6918
6919
+ bool isCreateAllPgs = false ;
6920
+
6921
+ if (pgsStateVector.count (createAllAvailableBuffersStr))
6922
+ {
6923
+ isCreateAllPgs = true ;
6924
+ pgsStateVector.clear ();
6925
+ }
6926
+
6859
6927
for (const auto & it: m_portList)
6860
6928
{
6861
6929
if (it.second .m_type == Port::PHY)
@@ -6864,6 +6932,10 @@ void PortsOrch::addPriorityGroupWatermarkFlexCounters(map<string, FlexCounterPgS
6864
6932
{
6865
6933
auto maxPgNumber = getNumberOfPortSupportedPgCounters (it.second .m_alias );
6866
6934
FlexCounterPgStates flexCounterPgState (maxPgNumber);
6935
+ if (isCreateAllPgs)
6936
+ {
6937
+ flexCounterPgState.enablePgCounters (0 , maxPgNumber - 1 );
6938
+ }
6867
6939
pgsStateVector.insert (make_pair (it.second .m_alias , flexCounterPgState));
6868
6940
}
6869
6941
addPriorityGroupWatermarkFlexCountersPerPort (it.second , pgsStateVector.at (it.second .m_alias ));
0 commit comments