File tree 2 files changed +26
-0
lines changed
2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,9 @@ namespace saivs
149
149
virtual sai_status_t refresh_macsec_sci_in_ingress_macsec_acl (
150
150
_In_ sai_object_id_t object_id);
151
151
152
+ virtual sai_status_t refresh_queue_pause_status (
153
+ _In_ sai_object_id_t object_id);
154
+
152
155
public:
153
156
154
157
virtual sai_status_t warm_boot_initialize_objects ();
Original file line number Diff line number Diff line change @@ -2056,6 +2056,24 @@ sai_status_t SwitchStateBase::refresh_macsec_sci_in_ingress_macsec_acl(
2056
2056
return SAI_STATUS_SUCCESS;
2057
2057
}
2058
2058
2059
+ sai_status_t SwitchStateBase::refresh_queue_pause_status (
2060
+ _In_ sai_object_id_t object_id)
2061
+ {
2062
+ SWSS_LOG_ENTER ();
2063
+
2064
+ // To trigger fake PFC storm on fake Broadcom platform, PFC storm detection
2065
+ // lua requires SAI_QUEUE_ATTR_PAUSE_STATUS field to be present in COUNTERS_DB.
2066
+ // However, the actual value of the attribute does not matter in this regard,
2067
+ // so a dummy one is assigned here.
2068
+ sai_attribute_t attr;
2069
+ attr.id = SAI_QUEUE_ATTR_PAUSE_STATUS;
2070
+ attr.value .booldata = false ;
2071
+
2072
+ CHECK_STATUS (set (SAI_OBJECT_TYPE_QUEUE, object_id, &attr));
2073
+
2074
+ return SAI_STATUS_SUCCESS;
2075
+ }
2076
+
2059
2077
// XXX extra work may be needed on GET api if N on list will be > then actual
2060
2078
2061
2079
/*
@@ -2205,6 +2223,11 @@ sai_status_t SwitchStateBase::refresh_read_only(
2205
2223
return refresh_macsec_sci_in_ingress_macsec_acl (object_id);
2206
2224
}
2207
2225
2226
+ if (meta->objecttype == SAI_OBJECT_TYPE_QUEUE && meta->attrid == SAI_QUEUE_ATTR_PAUSE_STATUS)
2227
+ {
2228
+ return refresh_queue_pause_status (object_id);
2229
+ }
2230
+
2208
2231
auto mmeta = m_meta.lock ();
2209
2232
2210
2233
if (mmeta)
You can’t perform that action at this time.
0 commit comments