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

Failed to set default drop route to a new next hop #139

Closed
stcheng opened this issue Nov 18, 2016 · 7 comments
Closed

Failed to set default drop route to a new next hop #139

stcheng opened this issue Nov 18, 2016 · 7 comments
Assignees
Labels

Comments

@stcheng
Copy link
Contributor

stcheng commented Nov 18, 2016

To have deterministic behavior, when the orchagent start, it creates IPv4 and IPv6 default route and set it to DROP.

Later we learn the default routes and the orchagent reset these routes to some new next hop IDs and set the packet action to FORWARD.

However, Mellanox SAI has an issue to set the route from DROP to FORWARD with next hop ID with using set_attribute API.

@xinliu-seattle
Copy link

MLNX related. Liat please help to assign to the right dev. thanks.

@stcheng stcheng assigned stcheng and unassigned stcheng Nov 30, 2016
@stcheng stcheng removed their assignment Nov 30, 2016
@liatgrozovik liatgrozovik self-assigned this Nov 30, 2016
@oleksandrivantsiv
Copy link
Collaborator

oleksandrivantsiv commented Dec 5, 2016

The root cause of the issue is in both orchagent implementation and Mellanox SAI:

  • Mellanox SAI:
    It is not possible to set next hop for routes with actions drop. And not possible to set action forward for routes without next hops:
Dec  5 10:42:04 arc-switch1028 docker[9153]: Dec 05 10:42:04 NOTICE  SAI_UTILS: mlnx_sai_utils.c[465]- set_dispatch_attrib_handler: Set Route next hop ID, key:route 0.0.0.0 0.0.0.0, val:Nex
t hop,2,000000
Dec  5 10:42:04 arc-switch1028 docker[9153]: Dec 05 10:42:04 NOTICE  SAI_UTILS: mlnx_sai_utils.c[465]- set_dispatch_attrib_handler: Set Route packet action, key:route 0.0.0.0 0.0.0.0, val:1
Dec  5 10:42:04 arc-switch1028 docker[9153]: Dec 05 10:42:04 ERROR   SX_API_ROUTER: sx_api_router.c[1368]- sx_api_router_uc_route_set: Next hop uc route must have a valid next_hop_cnt or a
valid ecmp_id
Dec  5 10:42:04 arc-switch1028 docker[9153]: Dec 05 10:42:04 ERROR   SAI_ROUTE: mlnx_sai_route.c[577]- mlnx_modify_route: Failed to set route - Parameter Error.
Dec  5 10:42:04 arc-switch1028 docker[9153]: Dec 05 10:42:04 ERROR   SAI_UTILS: mlnx_sai_utils.c[586]- sai_set_attribute: Failed set attrib dispatch
Dec  5 10:42:04 arc-switch1028 syncd: :- processEvent: failed to execute api: set, key: SAI_OBJECT_TYPE_ROUTE_ENTRY:{"dest":"0.0.0.0/0","vr":"oid:0x3000000000022"}, status: SAI_STATUS_INVAL
ID_PARAMETER
Dec  5 10:42:04 arc-switch1028 syncd: :- processEvent:  field: SAI_ROUTE_ATTR_PACKET_ACTION, value: SAI_PACKET_ACTION_FORWARD
Dec  5 10:42:04 arc-switch1028 syncd: :- exit_and_notify: sending switch_shutdown_request notification to OA
  • Orchagent:
    Missing functionality that changes route packet action from drop to forward for default route.

@stcheng
Copy link
Contributor Author

stcheng commented Dec 5, 2016

@oleksandrivantsiv the functionality of switching the packet action from drop to forward is in pull request #138. Once the SAI supports this, we will need to re-open #138 and merge it.

@liatgrozovik
Copy link

liatgrozovik commented Dec 5, 2016 via email

@stcheng
Copy link
Contributor Author

stcheng commented Dec 5, 2016

In order to verify the solution works, it is okay to just cherry-pick the #138 change on top of the current master to build a new orchagent daemon.

@stcheng
Copy link
Contributor Author

stcheng commented Dec 7, 2016

opencomputeproject/SAI#324
I have updated SAI v0.9.4 with comments to describe the scenario we meet here.

@stcheng
Copy link
Contributor Author

stcheng commented Jan 11, 2017

#145 resolves this.

@stcheng stcheng closed this as completed Jan 11, 2017
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this issue Feb 28, 2022
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this issue Mar 1, 2023
lukasstockner pushed a commit to genesiscloud/sonic-swss that referenced this issue Apr 2, 2023
Add infrastructure for running unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants