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

Add missing neighbor resolution for MPLS route programming #1968

Merged
merged 7 commits into from
Oct 28, 2021

Conversation

TACappleman
Copy link
Contributor

What I did
Added neighbor resolution when MPLS route's next hop not resolved, matching same code for IP route

Why I did it
Without this an MPLS route may end up not being programmed

How I verified it
Python UT

Details if related

@lgtm-com
Copy link

lgtm-com bot commented Oct 19, 2021

This pull request fixes 1 alert when merging d6141c4 into 6b15584 - view on LGTM.com

fixed alerts:

  • 1 for Unused import

@TACappleman
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@TACappleman
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

self.check_nexthop(False, "SAI_NEXT_HOP_TYPE_MPLS", "10.0.0.1", "SAI_OUTSEG_TYPE_SWAP", "1:101")
self.check_nexthop(False, "SAI_NEXT_HOP_TYPE_MPLS", "10.0.0.1", "SAI_OUTSEG_TYPE_SWAP", "1:201")
self.check_nexthop(False, "SAI_NEXT_HOP_TYPE_MPLS", "10.0.0.3", "SAI_OUTSEG_TYPE_SWAP", "1:202")

Copy link
Contributor

Choose a reason for hiding this comment

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

the test should indicate pass or fail. I don't see that here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure what you mean here. This finishes the same way as every other test, and I can't see any return codes in other test suites. What should I be adding here?

Copy link
Contributor

Choose a reason for hiding this comment

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

You should add 'asserts' for whatever condition that is expected for the test to claim pass.
e.g. https://github.com/Azure/sonic-swss/blob/master/tests/test_port.py
I missed to notice this in last review. Without asserts there's no way to know if test passed or failed. Please update in all the test cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The assert is within the wait_for_result function called by each of the check_ functions (e.g. check_nexthop). This is standard across many of the test suites where it's waiting for programming to be done by orchagent - and I've seen many times that it does produce an assert if the programming doesn't reach the expected state in time.

if self.mpls_appdb_mode():
fieldValues = {"nexthop": "10.0.0.1", "ifname": "Ethernet0", "mpls_nh": "swap101", "mpls_pop": "1"}
self.create_inseg_entry(label, fieldValues)
fieldValues = {"nexthop": "10.0.0.1,10.0.0.3", "ifname": "Ethernet0,Ethernet4", "mpls_nh": "swap201,swap202", "mpls_pop": "1"}
Copy link
Contributor

Choose a reason for hiding this comment

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

which neighbor is unresolved here? I want to know how the new code in mplsrouteorch.cpp:529 getting exercised.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've extended the comment above this

@lgtm-com
Copy link

lgtm-com bot commented Oct 21, 2021

This pull request fixes 1 alert when merging c819ef8 into d95823d - view on LGTM.com

fixed alerts:

  • 1 for Unused import

@TACappleman
Copy link
Contributor Author

I've removed the test before the one I've added, as it's no longer valid (it was explicitly waiting to do a ping for the route to be programmed, whereas it now resolves itself)

@lgtm-com
Copy link

lgtm-com bot commented Oct 21, 2021

This pull request fixes 1 alert when merging 0922d83 into d95823d - view on LGTM.com

fixed alerts:

  • 1 for Unused import

@TACappleman
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@TACappleman
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@TACappleman
Copy link
Contributor Author

@smaheshm can this be merged?

@TACappleman
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@TACappleman
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lgtm-com
Copy link

lgtm-com bot commented Oct 27, 2021

This pull request fixes 1 alert when merging 733c84d into ac09bde - view on LGTM.com

fixed alerts:

  • 1 for Unused import

@TACappleman
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lgtm-com
Copy link

lgtm-com bot commented Oct 27, 2021

This pull request fixes 1 alert when merging bd9d0ae into ac09bde - view on LGTM.com

fixed alerts:

  • 1 for Unused import

@smaheshm smaheshm merged commit ac3103a into sonic-net:master Oct 28, 2021
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
What I did
Added FDB debug dump module

How I did it
Used debug dump infra to add the FDB debug dump utility

How to verify it
Added Unit test cases to verify it
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