Skip to content

allow SAI_ROUTE_ATTR_NEXT_HOP_ID point to SAI_NULL_OBJECT_ID by default#253

Merged
lguohan merged 2 commits intoopencomputeproject:masterfrom
lguohan:route
Oct 24, 2016
Merged

allow SAI_ROUTE_ATTR_NEXT_HOP_ID point to SAI_NULL_OBJECT_ID by default#253
lguohan merged 2 commits intoopencomputeproject:masterfrom
lguohan:route

Conversation

@lguohan
Copy link
Copy Markdown
Collaborator

@lguohan lguohan commented Oct 7, 2016

When SAI_ROUTE_ATTR_NEXT_HOP_ID = SAI_NULL_OBJECT_ID, packet is dropped.
This allows user to change packet action from DROP to FORWARD using set API.
Otherwise, the behavior transition from DROP to FORWARD is undefined.

When SAI_ROUTE_ATTR_NEXT_HOP_ID = SAI_NULL_OBJECT_ID, packet is dropped.
This allows user to change packet action from DROP to FORWARD using set API.
Otherwise, the behavior transition from DROP to FORWARD is undefined.
@lguohan
Copy link
Copy Markdown
Collaborator Author

lguohan commented Oct 7, 2016

@itaibaz , @AshokDaparthi , @atitjain , @tushar-ty , @krambn, please review.

@lguohan
Copy link
Copy Markdown
Collaborator Author

lguohan commented Oct 7, 2016

@kcudnik , this PR give following error.

Processing saiwred_8h.xml
invalid default value 'SAI_NULL_OBJECT_ID' on SAI_ROUTE_ENTRY_ATTR_NEXT_HOP_ID (sai_object_id_t)
make: *** [saimetadata.c] Error 1
lgh@acs-trusty6:/data/sai/meta$

Can you help?

* router IP address. For such routes, fill the CPU port
* (#SAI_SWITCH_ATTR_CPU_PORT).
*
* When it is SAI_NULL_OBJECT_ID, then packet will be dropped.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just to confirm the understanding that NULL_OBJECT_ID can be set when packet action is set to TRAP before and the packet action will take precedence in that case. In other words, the packet will be dropped when packet action is one of the following: FORWARD, COPY, LOG, TRANSIT as mentioned in the comments.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, that is the understanding. packet action will take precedence.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

or its just cancel forward copy. So for LOG and COPY we still get a copy.

@johnarnold
Copy link
Copy Markdown
Contributor

Jenkins, test this please

@lguohan lguohan merged commit 25c0020 into opencomputeproject:master Oct 24, 2016
stcheng pushed a commit to sonic-net/sonic-swss that referenced this pull request Nov 17, 2016
… forward" (#138)

This change breaks the latest test as the current SAI implementation doesn't support
the mid-state that the route with packet action DROP is set with next hop ID and packet
action FORWARD by two steps. The implementation also prevents removing the default route
and create a new route instead. After the SAI implementation is fixed, this change
will be re-introduced.

ref: opencomputeproject/SAI#253
andriymoroz-mlnx pushed a commit to andriymoroz-mlnx/sonic-swss that referenced this pull request Dec 6, 2016
… forward" (sonic-net#138)

This change breaks the latest test as the current SAI implementation doesn't support
the mid-state that the route with packet action DROP is set with next hop ID and packet
action FORWARD by two steps. The implementation also prevents removing the default route
and create a new route instead. After the SAI implementation is fixed, this change
will be re-introduced.

ref: opencomputeproject/SAI#253
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.

6 participants