Skip to content

Commit 89cf731

Browse files
committed
Revert "Do not enter vendor SAI critical section for counter polling/clearing operations (sonic-net#1450)"
This reverts commit 0317b16.
1 parent 9137103 commit 89cf731

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

syncd/VendorSai.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ sai_status_t VendorSai::getStats(
313313
_In_ const sai_stat_id_t *counter_ids,
314314
_Out_ uint64_t *counters)
315315
{
316+
MUTEX();
316317
SWSS_LOG_ENTER();
317318
VENDOR_CHECK_API_INITIALIZED();
318319

@@ -350,6 +351,7 @@ sai_status_t VendorSai::getStatsExt(
350351
_In_ sai_stats_mode_t mode,
351352
_Out_ uint64_t *counters)
352353
{
354+
MUTEX();
353355
SWSS_LOG_ENTER();
354356
VENDOR_CHECK_API_INITIALIZED();
355357

@@ -364,6 +366,7 @@ sai_status_t VendorSai::clearStats(
364366
_In_ uint32_t number_of_counters,
365367
_In_ const sai_stat_id_t *counter_ids)
366368
{
369+
MUTEX();
367370
SWSS_LOG_ENTER();
368371
VENDOR_CHECK_API_INITIALIZED();
369372

@@ -383,6 +386,7 @@ sai_status_t VendorSai::bulkGetStats(
383386
_Inout_ sai_status_t *object_statuses,
384387
_Out_ uint64_t *counters)
385388
{
389+
MUTEX();
386390
SWSS_LOG_ENTER();
387391
VENDOR_CHECK_API_INITIALIZED();
388392

@@ -410,6 +414,7 @@ sai_status_t VendorSai::bulkClearStats(
410414
_In_ sai_stats_mode_t mode,
411415
_Inout_ sai_status_t *object_statuses)
412416
{
417+
MUTEX();
413418
SWSS_LOG_ENTER();
414419
VENDOR_CHECK_API_INITIALIZED();
415420

0 commit comments

Comments
 (0)