From 784e3e008b05675993c591513170259251718c23 Mon Sep 17 00:00:00 2001 From: Nikola Dancejic Date: Wed, 7 Feb 2024 20:30:05 +0000 Subject: [PATCH 1/3] [intfsorch] Enable ipv6 proxy ndp along with proxy arp setting SAI_VLAN_ATTR_UNKNOWN_MULTICAST_FLOOD_CONTROL_TYPE to SAI_VLAN_FLOOD_CONTROL_TYPE_NONE when proxy arp is enabled. This fixes a bug where ipv6 NS packets were flooding ports with duplicate packets. We now set multicast flood type to none. Signed-off-by: Nikola Dancejic --- orchagent/intfsorch.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/orchagent/intfsorch.cpp b/orchagent/intfsorch.cpp index 4363beb9ea..4edf36059d 100644 --- a/orchagent/intfsorch.cpp +++ b/orchagent/intfsorch.cpp @@ -368,6 +368,21 @@ bool IntfsOrch::setIntfVlanFloodType(const Port &port, sai_vlan_flood_control_ty } } + // Also set ipv6 multicast flood type + attr.id = SAI_VLAN_ATTR_UNKNOWN_MULTICAST_FLOOD_CONTROL_TYPE; + attr.value.s32 = vlan_flood_type; + + sai_status_t status = sai_vlan_api->set_vlan_attribute(port.m_vlan_info.vlan_oid, &attr); + if (status != SAI_STATUS_SUCCESS) + { + SWSS_LOG_ERROR("Failed to set multicast flood type for VLAN %u, rv:%d", port.m_vlan_info.vlan_id, status); + task_process_status handle_status = handleSaiSetStatus(SAI_API_VLAN, status); + if (handle_status != task_success) + { + return parseHandleSaiStatusFailure(handle_status); + } + } + return true; } From aad2673a33e75576565d592048e4f7c1f954495f Mon Sep 17 00:00:00 2001 From: Nikola Dancejic Date: Fri, 23 Feb 2024 20:56:47 +0000 Subject: [PATCH 2/3] fixing compile error --- orchagent/intfsorch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchagent/intfsorch.cpp b/orchagent/intfsorch.cpp index 4edf36059d..2a5e34ff93 100644 --- a/orchagent/intfsorch.cpp +++ b/orchagent/intfsorch.cpp @@ -372,7 +372,7 @@ bool IntfsOrch::setIntfVlanFloodType(const Port &port, sai_vlan_flood_control_ty attr.id = SAI_VLAN_ATTR_UNKNOWN_MULTICAST_FLOOD_CONTROL_TYPE; attr.value.s32 = vlan_flood_type; - sai_status_t status = sai_vlan_api->set_vlan_attribute(port.m_vlan_info.vlan_oid, &attr); + status = sai_vlan_api->set_vlan_attribute(port.m_vlan_info.vlan_oid, &attr); if (status != SAI_STATUS_SUCCESS) { SWSS_LOG_ERROR("Failed to set multicast flood type for VLAN %u, rv:%d", port.m_vlan_info.vlan_id, status); From 815b816bd3e68add9f87b919342b4827c1e859d8 Mon Sep 17 00:00:00 2001 From: Nikola Dancejic Date: Mon, 26 Feb 2024 22:49:13 +0000 Subject: [PATCH 3/3] adding check in check_router_interface to test asic entry change --- tests/test_vnet.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_vnet.py b/tests/test_vnet.py index 4873c072ed..c28d7cf320 100644 --- a/tests/test_vnet.py +++ b/tests/test_vnet.py @@ -794,6 +794,9 @@ def check_router_interface(self, dvs, intf_name, name, vlan_oid=0): expected_attr = { 'SAI_VLAN_ATTR_BROADCAST_FLOOD_CONTROL_TYPE': 'SAI_VLAN_FLOOD_CONTROL_TYPE_NONE' } check_object(asic_db, self.ASIC_VLAN_TABLE, vlan_oid, expected_attr) + expected_attr = { 'SAI_VLAN_ATTR_UNKNOWN_MULTICAST_FLOOD_CONTROL_TYPE': 'SAI_VLAN_FLOOD_CONTROL_TYPE_NONE' } + check_object(asic_db, self.ASIC_VLAN_TABLE, vlan_oid, expected_attr) + check_linux_intf_arp_proxy(dvs, intf_name) self.rifs.add(new_rif)