sonic-net / sonic-swss

SONiC Switch State Service (SwSS)
https://azure.github.io/SONiC
Other
170 stars 503 forks source link

VxLAN fix tunnel oper_state issue #3216

Open praveenraja1 opened 1 month ago

praveenraja1 commented 1 month ago

What I did

In portsorch layer ensure tunnel port_oper state is updated correctly after tunnel comes up.

Additionally made changes so that

1) non L3 packets which gets encapsulated have outer IP hdr TTL as 64. 2) For L3 packets the inner IpHdr TTL is preserved in outer header.

Why I did it

After tunnel was up and traffic was flowing, tunnel oper_state was displayed as down.

root@sonic:~#  show vxlan remotevtep
+---------+---------+-------------------+--------------+
| SIP     | DIP     | Creation Source   | OperStatus   |
+=========+=========+===================+==============+
| 1.1.1.1 | 2.2.2.2 | EVPN              | oper_down    |
+---------+---------+-------------------+--------------+
Total count : 1

How I verified it

root@sonic:~# show vxlan tunnel
vxlan tunnel name    source ip    destination ip    tunnel map name    tunnel map mapping(vni -> vlan)
-------------------  -----------  ----------------  -----------------  ---------------------------------
vtep                 2.2.2.2                        map_2000_Vlan20    2000 -> Vlan20
                                                    map_3000_Vlan30    3000 -> Vlan30
root@sonic:~#
root@sonic:~#
root@sonic:~#  show vxlan remotevtep
+---------+---------+-------------------+--------------+
| SIP     | DIP     | Creation Source   | OperStatus   |
+=========+=========+===================+==============+
| 2.2.2.2 | 1.1.1.1 | EVPN              | oper_up      |
+---------+---------+-------------------+--------------+
Total count : 1

Details if related

linux-foundation-easycla[bot] commented 1 month ago

CLA Missing ID CLA Not Signed