File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ sai_status_t VendorSai::set(
190
190
_In_ sai_object_id_t objectId,
191
191
_In_ const sai_attribute_t *attr)
192
192
{
193
- MUTEX ( );
193
+ std::unique_lock<std::mutex> _lock (m_apimutex );
194
194
SWSS_LOG_ENTER ();
195
195
VENDOR_CHECK_API_INITIALIZED ();
196
196
@@ -222,6 +222,13 @@ sai_status_t VendorSai::set(
222
222
223
223
sai_object_meta_key_t mk = { .objecttype = objectType, .objectkey = { .key = { .object_id = objectId } } };
224
224
225
+ if (objectType == SAI_OBJECT_TYPE_SWITCH && attr && attr->id == SAI_SWITCH_ATTR_SWITCH_SHELL_ENABLE)
226
+ {
227
+ // in case of diagnostic shell, this vendor api can be blocking, so
228
+ // release lock here to not cause deadlock for other events in syncd
229
+ _lock.unlock ();
230
+ }
231
+
225
232
return info->set (&mk, attr);
226
233
}
227
234
You can’t perform that action at this time.
0 commit comments