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

[SWSS] Static LAG Support

Open kannansel opened this issue 10 months ago • 2 comments

What I did Static lag support changes in SWSS module sonic-net/SONiC#1039

Why I did it PXE application doesnt support LAG during boot. and also some legacy device doesnt support lacp. To achieve more bandwidth with those legacy devices static lag will be useful

How I verified it

UT:-
        Test cases
1       Create static port channel with static flag     pass    pass
2       verify static has option flag true or false     pass    pass
3       Add static member see the portchannel is up     pass    pass
4       verify teamd is created with round-robin option by default
pass    pass
5       Remove last portchannel member check port channel down  pass
pass
6       Remove portchannel member check port channel still up   pass
pass
7       verify teamdctl config dump     pass    pass
8       verify teamdctl state dump      pass    pass
9       shutdown the portchannel check the kernel state pass    pass
10      no shutdown the portchannel check the kernel state      pass
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
-----  -------------  -----------
-----------------------------------------
   01  PortChannel01  LACP(A)(Up)  Ethernet16(S)
   02  PortChannel02  NONE(A)(Up)  Ethernet48(S) Ethernet64(S)
Ethernet32(S)
root@sonic:~#
12      teamnl is set to roundrobin     pass    pass
13      save and reload and verify portchannel is up    pass    pass
14      "docker restart teamd
teamd stopped
swss stopped
syncd stopped

swss started
syncd started
teamd started"  pass    pass
15      warm-reboot fails even without any port channel config  fail
16      verify teamd settles doesnt hog cpu with 100% cpu usage pass
17      "trying with static port channel config on non supported
branches
port channel will be configured as LACP."               pass

Not Supported Options
1. Min links and
2. fall back are not supported

Details if related

Patch explanation
1. static lag supported with option roundrobin.
2. tlm_teamd -> teamdctl changes to handle json dump for static lag.
3. test cases -> updated

kannansel avatar Mar 25 '24 18:03 kannansel

I think the fallback LAG feature described here does the same thing basically, except that it allows LACP to be established once the peer device is in a state to start sending LACP packets?

There is one bug related to the LAG containing multiple ports that's fixed in sonic-net/sonic-buildimage#10823.

saiarcot895 avatar Mar 30 '24 01:03 saiarcot895

I think the fallback LAG feature described here does the same thing basically, except that it allows LACP to be established once the peer device is in a state to start sending LACP packets?

There is one bug related to the LAG containing multiple ports that's fixed in sonic-net/sonic-buildimage#10823.

Hi Sai,

  1. Static LAG doesnt involve any protocol or timer (will be more suitable where we will not rely on any lacp control packets).
  2. Will be useful in customer scenarios (as stop gap solution along with PxE) if we face any customer related issues with LACP control packet receive and forward handling.
  3. LACP fallback feature does involve lacp protocol timer (and also can oscillate between up/down if there is any LACP tx/rx issue in the network).
  4. In master quickly tried only single port comes up right currently... above change is not yet pushed.

Static LAG will be useful and will be immune to any LACP protocol operation (except Link up/down events).

Thanks, Kannan.S

kannansel avatar Apr 01 '24 06:04 kannansel