File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -5452,6 +5452,30 @@ bool performObjectSetTransition(
5452
5452
meta->attridname ,
5453
5453
temporaryAttr->getStrAttrValue ().c_str ());
5454
5454
5455
+ /*
5456
+ * There is another case here, if this attribute exists only in
5457
+ * temporary view and it has default value, and SET value is the
5458
+ * same as default, then there is no need for ASIC operation.
5459
+ *
5460
+ * NOTE: This can lead to not put attributes with default VALUE to
5461
+ * redis database and could be confusing when debugging.
5462
+ */
5463
+
5464
+ const auto defaultValueAttr = getSaiAttrFromDefaultValue (currentView, *meta);
5465
+
5466
+ if (defaultValueAttr != nullptr )
5467
+ {
5468
+ std::string defStr = sai_serialize_attr_value (*meta, *defaultValueAttr->getSaiAttr ());
5469
+
5470
+ if (defStr == temporaryAttr->getStrAttrValue ())
5471
+ {
5472
+ SWSS_LOG_NOTICE (" explicit %s:%s is the same as default, no need for ASIC SET action" ,
5473
+ meta->attridname , defStr.c_str ());
5474
+
5475
+ continue ;
5476
+ }
5477
+ }
5478
+
5455
5479
/*
5456
5480
* Generate action and update current view in second pass
5457
5481
* and continue for next attribute.
You can’t perform that action at this time.
0 commit comments