@@ -4832,7 +4832,11 @@ bool PortsOrch::addVlanFloodGroups(Port &vlan, Port &port, string end_point_ip)
48324832 {
48334833 SWSS_LOG_ERROR (" Failed to set l2mc flood type combined "
48344834 " to vlan %hu for unknown unicast flooding" , vlan.m_vlan_info .vlan_id );
4835- return false ;
4835+ task_process_status handle_status = handleSaiSetStatus (SAI_API_VLAN, status);
4836+ if (handle_status != task_success)
4837+ {
4838+ return parseHandleSaiStatusFailure (handle_status);
4839+ }
48364840 }
48374841 vlan.m_vlan_info .uuc_flood_type = SAI_VLAN_FLOOD_CONTROL_TYPE_COMBINED;
48384842 }
@@ -4847,7 +4851,12 @@ bool PortsOrch::addVlanFloodGroups(Port &vlan, Port &port, string end_point_ip)
48474851 {
48484852 SWSS_LOG_ERROR (" Failed to set l2mc flood type combined "
48494853 " to vlan %hu for broadcast flooding" , vlan.m_vlan_info .vlan_id );
4850- return false ;
4854+ task_process_status handle_status = handleSaiSetStatus (SAI_API_VLAN, status);
4855+ if (handle_status != task_success)
4856+ {
4857+ m_portList[vlan.m_alias ] = vlan;
4858+ return parseHandleSaiStatusFailure (handle_status);
4859+ }
48514860 }
48524861 vlan.m_vlan_info .bc_flood_type = SAI_VLAN_FLOOD_CONTROL_TYPE_COMBINED;
48534862 }
@@ -4858,7 +4867,12 @@ bool PortsOrch::addVlanFloodGroups(Port &vlan, Port &port, string end_point_ip)
48584867 if (status != SAI_STATUS_SUCCESS)
48594868 {
48604869 SWSS_LOG_ERROR (" Failed to create l2mc flood group" );
4861- return false ;
4870+ task_process_status handle_status = handleSaiCreateStatus (SAI_API_L2MC_GROUP, status);
4871+ if (handle_status != task_success)
4872+ {
4873+ m_portList[vlan.m_alias ] = vlan;
4874+ return parseHandleSaiStatusFailure (handle_status);
4875+ }
48624876 }
48634877
48644878 if (vlan.m_vlan_info .uuc_flood_type == SAI_VLAN_FLOOD_CONTROL_TYPE_COMBINED)
@@ -4872,7 +4886,12 @@ bool PortsOrch::addVlanFloodGroups(Port &vlan, Port &port, string end_point_ip)
48724886 SWSS_LOG_ERROR (" Failed to set l2mc group %" PRIx64
48734887 " to vlan %hu for unknown unicast flooding" ,
48744888 l2mc_group_id, vlan.m_vlan_info .vlan_id );
4875- return false ;
4889+ task_process_status handle_status = handleSaiSetStatus (SAI_API_VLAN, status);
4890+ if (handle_status != task_success)
4891+ {
4892+ m_portList[vlan.m_alias ] = vlan;
4893+ return parseHandleSaiStatusFailure (handle_status);
4894+ }
48764895 }
48774896 }
48784897 if (vlan.m_vlan_info .bc_flood_type == SAI_VLAN_FLOOD_CONTROL_TYPE_COMBINED)
@@ -4886,7 +4905,12 @@ bool PortsOrch::addVlanFloodGroups(Port &vlan, Port &port, string end_point_ip)
48864905 SWSS_LOG_ERROR (" Failed to set l2mc group %" PRIx64
48874906 " to vlan %hu for broadcast flooding" ,
48884907 l2mc_group_id, vlan.m_vlan_info .vlan_id );
4889- return false ;
4908+ task_process_status handle_status = handleSaiSetStatus (SAI_API_VLAN, status);
4909+ if (handle_status != task_success)
4910+ {
4911+ m_portList[vlan.m_alias ] = vlan;
4912+ return parseHandleSaiStatusFailure (handle_status);
4913+ }
48904914 }
48914915 }
48924916 vlan.m_vlan_info .l2mc_group_id = l2mc_group_id;
@@ -4926,7 +4950,12 @@ bool PortsOrch::addVlanFloodGroups(Port &vlan, Port &port, string end_point_ip)
49264950 {
49274951 SWSS_LOG_ERROR (" Failed to create l2mc group member for adding tunnel %s to vlan %hu" ,
49284952 end_point_ip.c_str (), vlan.m_vlan_info .vlan_id );
4929- return false ;
4953+ task_process_status handle_status = handleSaiCreateStatus (SAI_API_L2MC_GROUP, status);
4954+ if (handle_status != task_success)
4955+ {
4956+ m_portList[vlan.m_alias ] = vlan;
4957+ return parseHandleSaiStatusFailure (handle_status);
4958+ }
49304959 }
49314960 vlan.m_vlan_info .l2mc_members [end_point_ip] = l2mc_group_member;
49324961 m_portList[vlan.m_alias ] = vlan;
@@ -4953,7 +4982,11 @@ bool PortsOrch::removeVlanEndPointIp(Port &vlan, Port &port, string end_point_ip
49534982 {
49544983 SWSS_LOG_ERROR (" Failed to remove end point ip %s from vlan %hu" ,
49554984 end_point_ip.c_str (), vlan.m_vlan_info .vlan_id );
4956- return false ;
4985+ task_process_status handle_status = handleSaiRemoveStatus (SAI_API_L2MC_GROUP, status);
4986+ if (handle_status != task_success)
4987+ {
4988+ return parseHandleSaiStatusFailure (handle_status);
4989+ }
49574990 }
49584991 decreaseBridgePortRefCount (port);
49594992 vlan.m_vlan_info .l2mc_members .erase (end_point_ip);
@@ -4973,7 +5006,12 @@ bool PortsOrch::removeVlanEndPointIp(Port &vlan, Port &port, string end_point_ip
49735006 SWSS_LOG_ERROR (" Failed to set null l2mc group "
49745007 " to vlan %hu for unknown unicast flooding" ,
49755008 vlan.m_vlan_info .vlan_id );
4976- return false ;
5009+ task_process_status handle_status = handleSaiSetStatus (SAI_API_VLAN, status);
5010+ if (handle_status != task_success)
5011+ {
5012+ m_portList[vlan.m_alias ] = vlan;
5013+ return parseHandleSaiStatusFailure (handle_status);
5014+ }
49775015 }
49785016 attr.id = SAI_VLAN_ATTR_UNKNOWN_UNICAST_FLOOD_CONTROL_TYPE;
49795017 attr.value .s32 = SAI_VLAN_FLOOD_CONTROL_TYPE_ALL;
@@ -4983,7 +5021,12 @@ bool PortsOrch::removeVlanEndPointIp(Port &vlan, Port &port, string end_point_ip
49835021 SWSS_LOG_ERROR (" Failed to set flood control type all"
49845022 " to vlan %hu for unknown unicast flooding" ,
49855023 vlan.m_vlan_info .vlan_id );
4986- return false ;
5024+ task_process_status handle_status = handleSaiSetStatus (SAI_API_VLAN, status);
5025+ if (handle_status != task_success)
5026+ {
5027+ m_portList[vlan.m_alias ] = vlan;
5028+ return parseHandleSaiStatusFailure (handle_status);
5029+ }
49875030 }
49885031 vlan.m_vlan_info .uuc_flood_type = SAI_VLAN_FLOOD_CONTROL_TYPE_ALL;
49895032 }
@@ -4998,7 +5041,12 @@ bool PortsOrch::removeVlanEndPointIp(Port &vlan, Port &port, string end_point_ip
49985041 SWSS_LOG_ERROR (" Failed to set null l2mc group "
49995042 " to vlan %hu for broadcast flooding" ,
50005043 vlan.m_vlan_info .vlan_id );
5001- return false ;
5044+ task_process_status handle_status = handleSaiSetStatus (SAI_API_VLAN, status);
5045+ if (handle_status != task_success)
5046+ {
5047+ m_portList[vlan.m_alias ] = vlan;
5048+ return parseHandleSaiStatusFailure (handle_status);
5049+ }
50025050 }
50035051 attr.id = SAI_VLAN_ATTR_BROADCAST_FLOOD_CONTROL_TYPE;
50045052 attr.value .s32 = SAI_VLAN_FLOOD_CONTROL_TYPE_ALL;
@@ -5008,18 +5056,29 @@ bool PortsOrch::removeVlanEndPointIp(Port &vlan, Port &port, string end_point_ip
50085056 SWSS_LOG_ERROR (" Failed to set flood control type all"
50095057 " to vlan %hu for broadcast flooding" ,
50105058 vlan.m_vlan_info .vlan_id );
5011- return false ;
5059+ task_process_status handle_status = handleSaiSetStatus (SAI_API_VLAN, status);
5060+ if (handle_status != task_success)
5061+ {
5062+ m_portList[vlan.m_alias ] = vlan;
5063+ return parseHandleSaiStatusFailure (handle_status);
5064+ }
50125065 }
50135066 vlan.m_vlan_info .bc_flood_type = SAI_VLAN_FLOOD_CONTROL_TYPE_ALL;
50145067 }
50155068 status = sai_l2mc_group_api->remove_l2mc_group (vlan.m_vlan_info .l2mc_group_id );
50165069 if (status != SAI_STATUS_SUCCESS)
50175070 {
50185071 SWSS_LOG_ERROR (" Failed to remove l2mc group %" PRIx64, l2mc_group_id);
5019- return false ;
5072+ task_process_status handle_status = handleSaiRemoveStatus (SAI_API_L2MC_GROUP, status);
5073+ if (handle_status != task_success)
5074+ {
5075+ m_portList[vlan.m_alias ] = vlan;
5076+ return parseHandleSaiStatusFailure (handle_status);
5077+ }
50205078 }
50215079 vlan.m_vlan_info .l2mc_group_id = SAI_NULL_OBJECT_ID;
50225080 }
5081+ m_portList[vlan.m_alias ] = vlan;
50235082 return true ;
50245083}
50255084
0 commit comments