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

Fix issue #115: NexthopGroup member change is not supported #120

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yue-fred-gao
Copy link
Contributor

Why

When running test_vxlan_ecmp sonic-mgmt test, I found nexthop group member change is not supported. This can happen in many situations. For this particular test case, a nexthop group member can be added or removed dynamically triggered by bfd state change. When nexthop group member changed, we need to delete the routes and reprogram them if they point to the nexthop group.

What does this PR do

In short, when a nexthop group member is created or deleted, we need to find all the routes pointing to the nexthop group and reprogram them because vpp doesn't have an object in data plane corresponding to nexthop group. In comparison, in Broadcom J/J2 chip, FEC is a hardware representation of nexthop group, with which we don't need to reprogram routes if member changes.

Here are the changes to support above action.

  1. Add a new mapping from ROUTE_ENTRY to NEXTHOP_GROUP in order to navigate from NH GROUP to routes.
  2. Supports updating child-parent relation, in addition to add and delete. Update needs to remove the old mapping and add new mapping. For example, ROUTE_ENTRY points to NH GROUP1 but a set operation changes to NH GROUP2.
  3. Add SaiModDBObject inheriting from SaiObject. It has the list of attributes passed in in set request and backed by object in database. get_attribute will first read from the attribute list and if not found, it will try the object in database.
  4. Add handlers to handle nexthop group member create and remove.

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.

1 participant