[swss] creating single-hop bfd session using nexthop #3629
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
Provide a method to create single hop BFD session using nexthop in bfdorch, working together with neighorch.
Why I did it
Single-hop BFD session needs to be associated with an interface. existing bfdorch provides a way to bypass HW lookup by providing mac address and port id. but this approach might not working for some ASICs if the interface is portchannel. SDK/ASIC might construct layer 2 packets and just use one of portchannel member. And this approach requires application provide destination MAC address, but dest mac address may not available when creating BFD session, especially creating BFD session at system boot up time.
This PR provides a method to let application to use nexthop, by specifying interface but don't need to provide destination mac address, the bfdorch and neighorch will update nexthop when the neighbor is resolved. It simplified the application design, and more important, it works for portchannel case in same way as normal interface.
How I verified it
The functionality is verified in hardware testbed using a prototype.
Details if related
Introduced 2 new SAI attribute for this feature:
SAI_BFD_SESSION_ATTR_USE_NEXT_HOP
SAI_BFD_SESSION_ATTR_NEXT_HOP_ID
Here is the detailes:
sonic-net/SONiC#1932