Skip to content

Commit

Permalink
[intfsorch] Enable ipv6 proxy ndp along with proxy arp (sonic-net#3045)
Browse files Browse the repository at this point in the history
* [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.
  • Loading branch information
Ndancejic authored and mssonicbld committed Feb 28, 2024
1 parent 5d91f10 commit 8d6aac0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
15 changes: 15 additions & 0 deletions orchagent/intfsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

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;
}

Expand Down
3 changes: 3 additions & 0 deletions tests/test_vnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,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)
Expand Down

0 comments on commit 8d6aac0

Please sign in to comment.