sonic-swss icon indicating copy to clipboard operation
sonic-swss copied to clipboard

Swss Changes to Support Static Lag

Open skannan-sonic opened this issue 2 years ago • 1 comments

What I did Static lag support changes in SWSS module https://github.com/sonic-net/SONiC/pull/1039

other dependent pull request

https://github.com/sonic-net/sonic-buildimage/pull/12360
https://github.com/sonic-net/sonic-swss/pull/2486
https://github.com/sonic-net/sonic-utilities/pull/2436

Why I did it

  1. swss handles --static flag and corresponding invokes teamd instance with loadbalance as the option.
  2. updating the LAG table to support static flag so "show inter portchannel" works fine.

How I verified it Test cases 1 Create static port channel with static flag pass 2 verify static has option flag true or false pass 3 Add static member see the portchannel is up pass 4 verify teamd is created with loadbalance option by default pass 5 Remove last portchannel member check port channel down pass 6 Remove portchannel member check port channel still up pass 7 verify teamdctl config dump pass 8 verify teamdctl state dump pass 9 shutdown the portchannel check the kernel state pass 10 no shutdown the portchannel check the kernel state pass 11 "Check the show output matches the review comment root@sonic:~# show inter port Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available, S - selected, D - deselected, * - not synced No. Team Dev Protocol Ports


1  PortChannel1  NONE(A)(Up)  Ethernet0(S)
2  PortChannel2  NONE(A)(Up)  Ethernet8(S)
4  PortChannel4  NONE(A)(Dw)

" pass 12 teamnl is set to loadbalance pass 13 save and reload and verify portchannel is up pass 14 "docker restart teamd teamd stopped swss stopped syncd stopped

swss started syncd started teamd started" pass 16 verify teamd settles doesnt hog cpu with 100% cpu usage pass

Details if related Libteam change pull request - https://github.com/sonic-net/sonic-buildimage/pull/12360

skannan-sonic avatar Oct 11 '22 16:10 skannan-sonic

@judyjoseph can you please help to review this PR? Thanks.

zhangyanzhao avatar Jan 09 '23 17:01 zhangyanzhao