Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create tunnel to peer switch when a packet to unresolved neighbor is received #2134

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sumukhatv
Copy link
Contributor

What I did

Why I did it
To handle the case when a packet to an unresolved neighbor is received, the ToR will create a tunnel to the peer and forward the packet to the peer.
How I verified it
Write virtual switch tests
Details if related

theasianpianist and others added 3 commits January 20, 2022 20:51
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented Feb 5, 2022

This pull request introduces 1 alert when merging 5df550c into baa7476 - view on LGTM.com

new alerts:

  • 1 for Testing equality to None

@@ -728,6 +730,11 @@ void NeighOrch::doTask(Consumer &consumer)
if (m_syncdNeighbors.find(neighbor_entry) == m_syncdNeighbors.end()
|| m_syncdNeighbors[neighbor_entry].mac != mac_address)
{
if (mac_address == MacAddress("00:00:00:00:00:00"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is more change here and the muxorch changes.

fvs1 = asicdb.get_entry(self.ASIC_ROUTE_TABLE, route)
oid = fvs1["SAI_ROUTE_ENTRY_ATTR_NEXT_HOP_ID"]
fvs2 = asicdb.get_entry(self.ASIC_NEXTHOP_TABLE, oid)
assert fvs2["SAI_NEXT_HOP_ATTR_IP"] == "10.1.0.32"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use function dvs_route.check_asicdb_route_entries for checking asic_db

dst_ip="10.1.0.32", dscp_mode="uniform",
ecn_mode="standard", ttl_mode="pipe")

peer_attrs = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the following tests as well:

  1. Add a FAILED neighbor before configuring peer_switch. There should not be a tunnel route
  2. Do mux status changes after resolving the entry and verify neighbor, and tunnel route
  3. Add a FAILED entry and delete the entry. Make sure the tunnel route is removed as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants