@@ -4832,7 +4832,11 @@ bool PortsOrch::addVlanFloodGroups(Port &vlan, Port &port, string end_point_ip)
4832
4832
{
4833
4833
SWSS_LOG_ERROR (" Failed to set l2mc flood type combined "
4834
4834
" 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
+ }
4836
4840
}
4837
4841
vlan.m_vlan_info .uuc_flood_type = SAI_VLAN_FLOOD_CONTROL_TYPE_COMBINED;
4838
4842
}
@@ -4847,7 +4851,12 @@ bool PortsOrch::addVlanFloodGroups(Port &vlan, Port &port, string end_point_ip)
4847
4851
{
4848
4852
SWSS_LOG_ERROR (" Failed to set l2mc flood type combined "
4849
4853
" 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
+ }
4851
4860
}
4852
4861
vlan.m_vlan_info .bc_flood_type = SAI_VLAN_FLOOD_CONTROL_TYPE_COMBINED;
4853
4862
}
@@ -4858,7 +4867,12 @@ bool PortsOrch::addVlanFloodGroups(Port &vlan, Port &port, string end_point_ip)
4858
4867
if (status != SAI_STATUS_SUCCESS)
4859
4868
{
4860
4869
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
+ }
4862
4876
}
4863
4877
4864
4878
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)
4872
4886
SWSS_LOG_ERROR (" Failed to set l2mc group %" PRIx64
4873
4887
" to vlan %hu for unknown unicast flooding" ,
4874
4888
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
+ }
4876
4895
}
4877
4896
}
4878
4897
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)
4886
4905
SWSS_LOG_ERROR (" Failed to set l2mc group %" PRIx64
4887
4906
" to vlan %hu for broadcast flooding" ,
4888
4907
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
+ }
4890
4914
}
4891
4915
}
4892
4916
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)
4926
4950
{
4927
4951
SWSS_LOG_ERROR (" Failed to create l2mc group member for adding tunnel %s to vlan %hu" ,
4928
4952
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
+ }
4930
4959
}
4931
4960
vlan.m_vlan_info .l2mc_members [end_point_ip] = l2mc_group_member;
4932
4961
m_portList[vlan.m_alias ] = vlan;
@@ -4953,7 +4982,11 @@ bool PortsOrch::removeVlanEndPointIp(Port &vlan, Port &port, string end_point_ip
4953
4982
{
4954
4983
SWSS_LOG_ERROR (" Failed to remove end point ip %s from vlan %hu" ,
4955
4984
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
+ }
4957
4990
}
4958
4991
decreaseBridgePortRefCount (port);
4959
4992
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
4973
5006
SWSS_LOG_ERROR (" Failed to set null l2mc group "
4974
5007
" to vlan %hu for unknown unicast flooding" ,
4975
5008
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
+ }
4977
5015
}
4978
5016
attr.id = SAI_VLAN_ATTR_UNKNOWN_UNICAST_FLOOD_CONTROL_TYPE;
4979
5017
attr.value .s32 = SAI_VLAN_FLOOD_CONTROL_TYPE_ALL;
@@ -4983,7 +5021,12 @@ bool PortsOrch::removeVlanEndPointIp(Port &vlan, Port &port, string end_point_ip
4983
5021
SWSS_LOG_ERROR (" Failed to set flood control type all"
4984
5022
" to vlan %hu for unknown unicast flooding" ,
4985
5023
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
+ }
4987
5030
}
4988
5031
vlan.m_vlan_info .uuc_flood_type = SAI_VLAN_FLOOD_CONTROL_TYPE_ALL;
4989
5032
}
@@ -4998,7 +5041,12 @@ bool PortsOrch::removeVlanEndPointIp(Port &vlan, Port &port, string end_point_ip
4998
5041
SWSS_LOG_ERROR (" Failed to set null l2mc group "
4999
5042
" to vlan %hu for broadcast flooding" ,
5000
5043
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
+ }
5002
5050
}
5003
5051
attr.id = SAI_VLAN_ATTR_BROADCAST_FLOOD_CONTROL_TYPE;
5004
5052
attr.value .s32 = SAI_VLAN_FLOOD_CONTROL_TYPE_ALL;
@@ -5008,18 +5056,29 @@ bool PortsOrch::removeVlanEndPointIp(Port &vlan, Port &port, string end_point_ip
5008
5056
SWSS_LOG_ERROR (" Failed to set flood control type all"
5009
5057
" to vlan %hu for broadcast flooding" ,
5010
5058
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
+ }
5012
5065
}
5013
5066
vlan.m_vlan_info .bc_flood_type = SAI_VLAN_FLOOD_CONTROL_TYPE_ALL;
5014
5067
}
5015
5068
status = sai_l2mc_group_api->remove_l2mc_group (vlan.m_vlan_info .l2mc_group_id );
5016
5069
if (status != SAI_STATUS_SUCCESS)
5017
5070
{
5018
5071
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
+ }
5020
5078
}
5021
5079
vlan.m_vlan_info .l2mc_group_id = SAI_NULL_OBJECT_ID;
5022
5080
}
5081
+ m_portList[vlan.m_alias ] = vlan;
5023
5082
return true ;
5024
5083
}
5025
5084
0 commit comments