Skip to content

[vnetorch]: Set default VxLAN encap TTL value#980

Merged
liat-grozovik merged 1 commit intosonic-net:masterfrom
volodymyrsamotiy:vnet_vxlan_ttl
Jul 22, 2019
Merged

[vnetorch]: Set default VxLAN encap TTL value#980
liat-grozovik merged 1 commit intosonic-net:masterfrom
volodymyrsamotiy:vnet_vxlan_ttl

Conversation

@volodymyrsamotiy
Copy link
Collaborator

Signed-off-by: Volodymyr Samotiy [email protected]

What I did
Implemented logic to set default VxLAN encap TTL value
Why I did it
On different platforms default VxLAN encap TTL value is different, so we need to set same value for all
How I verified it
Executed "VNET" ansible test and verified it passed.
Details if related

@volodymyrsamotiy
Copy link
Collaborator Author

volodymyrsamotiy commented Jul 18, 2019

Should be merged with sonic-net/sonic-mgmt#1017

@volodymyrsamotiy volodymyrsamotiy marked this pull request as ready for review July 18, 2019 15:06
@lguohan lguohan requested a review from prsunny July 18, 2019 16:25
Copy link
Collaborator

@prsunny prsunny left a comment

Choose a reason for hiding this comment

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

Changes looks good to me

Copy link
Contributor

@stcheng stcheng left a comment

Choose a reason for hiding this comment

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

Could you update the unit test to verify the value is correctly set? Thanks.

sai_ip_address_t *src_ip,
sai_object_id_t underlay_rif)
sai_object_id_t underlay_rif,
sai_uint8_t encap_ttl=0)
Copy link
Contributor

Choose a reason for hiding this comment

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

no need to specify the default value here, as already specified in the header file

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is static helper function to create tunnel in SAI, so we need default value here (in header file default value specified for "create tunnel" public APIs)

}

bool createTunnel(MAP_T encap, MAP_T decap);
bool createTunnel(MAP_T encap, MAP_T decap, uint8_t encap_ttl=0);
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you set the default argument with value 0 instead of VXLAN_ENCAP_TTL?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As Prince mentioned in another comment, VxLAN tunnel is created for different scenarios and for the VNET use-case we have default TTL set to 128 but for other use-cases all should work as before.

tunnel_attrs.push_back(attr);
}

if (encap_ttl != 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

since you're not exposing any places for user to change the encap_ttl value, why do you need to expose the capability of setting it via different functions while providing all the functions with default value? could you directly set the TTL mode to pipe model and the value to the default value?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@stcheng , the VxlanTunnel is created for different scenarios. For the VNET use-case, we would want the Tunnel to have default 128 TTL. So I think it is better to pass this as parameter.

Copy link
Contributor

@stcheng stcheng left a comment

Choose a reason for hiding this comment

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

thanks for the explanation

@stcheng
Copy link
Contributor

stcheng commented Jul 20, 2019

retest this please

@liat-grozovik liat-grozovik merged commit 63afbd5 into sonic-net:master Jul 22, 2019
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
jianyuewu pushed a commit to jianyuewu/sonic-swss that referenced this pull request Dec 24, 2025
Added ICMP Echo hardware offload session table names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants