-
Notifications
You must be signed in to change notification settings - Fork 552
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
[dual-tor] add missing SAI attribte in order to create IPNIP tunnel #2503
[dual-tor] add missing SAI attribte in order to create IPNIP tunnel #2503
Conversation
13170d5
to
3274baf
Compare
@@ -212,6 +212,10 @@ static sai_object_id_t create_tunnel( | |||
attr.value.s32 = SAI_TUNNEL_TTL_MODE_PIPE_MODEL; | |||
tunnel_attrs.push_back(attr); | |||
|
|||
attr.id = SAI_TUNNEL_ATTR_DECAP_TTL_MODE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tunnel is used only as nexthop tunnel for encap purposes. Why is this required here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding SAI_TUNNEL_ATTR_DECAP_TTL_MODE
Problem:
Long time ago this attribute was defined as “mandatory on create” in SAI API, but at some point it was changed to “optional”.
SONiC “dual ToR” implementation, when it creates IP-in-IP tunnel, does not provide this attribute because now it is “optional”.
SAI team reported:
"We only support pipe, which is not the default API value of uniform, so user must provide explicit pipe
This has always been the ip in ip behavior and limitation, which is also documented in our RN"
So it is MLNX SAI implementation limitation that we support only “pipe” and since default value for this attribute is “uniform” we need to set it explicitly.
And in our case it is becomes “mandatory on create” attribute which must be set to “pipe” value.
As a result of this limitation we should update SONiC “Dual ToR” code in order to pass this attribute on IP-in-IP tunnel creation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. @bingwang-ms , do you've any comments?
LGTM. I need to watch the test result of master image to confirm the extra attribute does't cause issue. |
Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>
6b9e6a1
3274baf
to
6b9e6a1
Compare
@bingwang-ms @prsunny it looks like after branch alignment with latest master all checks passed successfully. |
can someone merge this PR to upstream? |
…2503) - What I did add SAI_TUNNEL_ATTR_DECAP_TTL_MODE and SAI_TUNNEL_ATTR_DECAP_DSCP_MODE - Why I did it Need to pass additional SAI attrib. Align encap end decap params 1 SAI_TUNNEL_ATTR_DECAP_DSCP_MODE Problem: Long time ago this attribute was defined as “mandatory on create” in SAI API, but at some point it was changed to “optional”. But MLNX SAI implementation didn’t change it and still expects this attribute to be always provided on tunnel creation. SONiC “dual ToR” implementation, when it creates IP-in-IP tunnel, does not provide this attribute because it is “optional”. So we get SAI error for creating tunnel because as mentioned above MLNX SAI implementation still expects this attribute as “mandatory on create”. Need to always set this attribute in “Dual ToR orchagent” on IP-in-IP tunnel creation 2 SAI_TUNNEL_ATTR_DECAP_TTL_MODE Problem: Long time ago this attribute was defined as “mandatory on create” in SAI API, but at some point it was changed to “optional”. SONiC “dual ToR” implementation, when it creates IP-in-IP tunnel, does not provide this attribute because now it is “optional”. SAI team reported: "We only support pipe, which is not the default API value of uniform, so user must provide explicit pipe This has always been the ip in ip behavior and limitation, which is also documented in our RN" So it is MLNX SAI implementation limitation that we support only “pipe” and since default value for this attribute is “uniform” we need to set it explicitly. And in our case it is becomes “mandatory on create” attribute which must be set to “pipe” value. As a result of this limitation we should update SONiC “Dual ToR” code in order to pass this attribute on IP-in-IP tunnel creation. - How I verified it tunnel successfully created Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>
…2503) - What I did add SAI_TUNNEL_ATTR_DECAP_TTL_MODE and SAI_TUNNEL_ATTR_DECAP_DSCP_MODE - Why I did it Need to pass additional SAI attrib. Align encap end decap params 1 SAI_TUNNEL_ATTR_DECAP_DSCP_MODE Problem: Long time ago this attribute was defined as “mandatory on create” in SAI API, but at some point it was changed to “optional”. But MLNX SAI implementation didn’t change it and still expects this attribute to be always provided on tunnel creation. SONiC “dual ToR” implementation, when it creates IP-in-IP tunnel, does not provide this attribute because it is “optional”. So we get SAI error for creating tunnel because as mentioned above MLNX SAI implementation still expects this attribute as “mandatory on create”. Need to always set this attribute in “Dual ToR orchagent” on IP-in-IP tunnel creation 2 SAI_TUNNEL_ATTR_DECAP_TTL_MODE Problem: Long time ago this attribute was defined as “mandatory on create” in SAI API, but at some point it was changed to “optional”. SONiC “dual ToR” implementation, when it creates IP-in-IP tunnel, does not provide this attribute because now it is “optional”. SAI team reported: "We only support pipe, which is not the default API value of uniform, so user must provide explicit pipe This has always been the ip in ip behavior and limitation, which is also documented in our RN" So it is MLNX SAI implementation limitation that we support only “pipe” and since default value for this attribute is “uniform” we need to set it explicitly. And in our case it is becomes “mandatory on create” attribute which must be set to “pipe” value. As a result of this limitation we should update SONiC “Dual ToR” code in order to pass this attribute on IP-in-IP tunnel creation. - How I verified it tunnel successfully created Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>
Signed-off-by: Andriy Yurkiv ayurkiv@nvidia.com
What I did
add SAI_TUNNEL_ATTR_DECAP_TTL_MODE and SAI_TUNNEL_ATTR_DECAP_DSCP_MODE
Why I did it
Need to pass additional SAI attrib. Align encap end decap params
1 SAI_TUNNEL_ATTR_DECAP_DSCP_MODE
Problem:
Long time ago this attribute was defined as “mandatory on create” in SAI API, but at some point it was changed to “optional”.
But MLNX SAI implementation didn’t change it and still expects this attribute to be always provided on tunnel creation.
SONiC “dual ToR” implementation, when it creates IP-in-IP tunnel, does not provide this attribute because it is “optional”.
So we get SAI error for creating tunnel because as mentioned above MLNX SAI implementation still expects this attribute as “mandatory on create”.
Need to always set this attribute in “Dual ToR orchagent” on IP-in-IP tunnel creation
2 SAI_TUNNEL_ATTR_DECAP_TTL_MODE
Problem:
Long time ago this attribute was defined as “mandatory on create” in SAI API, but at some point it was changed to “optional”.
SONiC “dual ToR” implementation, when it creates IP-in-IP tunnel, does not provide this attribute because now it is “optional”.
SAI team reported:
"We only support pipe, which is not the default API value of uniform, so user must provide explicit pipe
This has always been the ip in ip behavior and limitation, which is also documented in our RN"
So it is MLNX SAI implementation limitation that we support only “pipe” and since default value for this attribute is “uniform” we need to set it explicitly.
And in our case it is becomes “mandatory on create” attribute which must be set to “pipe” value.
As a result of this limitation we should update SONiC “Dual ToR” code in order to pass this attribute on IP-in-IP tunnel creation.
How I verified it
tunnel successfully created
Details if related