Skip to content
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

[vog/systemlag] Voq lagid allocator #1603

Merged
merged 3 commits into from
Mar 11, 2021

Conversation

vganesan-nokia
Copy link
Contributor

What I did
Defined class for lag id allocator and added lua script for allocating/freeing lag id in atomic fashion

Why I did it

For portchannels in VOQ based chassis systems we need unique lag id across
the system. The lag id (aka system port aggreggator id) is allocated during portchannel
creation. The changes are for a class for lag id allocation in atomic fashion. The LAG ID is allocated
from central chassis app db. A lua script loaded in the redis at the
time of lag id allocator instantiation ensures allocating unique lag id when
multiple clients requests for lag id simultaneously.

Ref: VOQ LAG HLD PR: sonic-net/SONiC#697

How I verified it

  • In VOQ based chassis systems, make sure chassis app db is initialized with lag id start and lag id end data in supervisor card.
  • Configure port channel in one asic instance.
  • Check the ASIC DB for system port aggregator id (spa) attribute programmed and verify that this spa value is not duplicated in portchannels from different ASICs.

Details if related

Note: This PR is dependent on sonic-swss-common PR sonic-net/sonic-swss-common#447

@anshuv-mfst
Copy link

@judyjoseph - could you please review the PR, thanks.

orchagent/lagids.lua Outdated Show resolved Hide resolved
orchagent/lagids.lua Outdated Show resolved Hide resolved
vedganes added 3 commits February 10, 2021 10:51
Signed-off-by: vedganes <vedavinayagam.ganesan@nokia.com>

Class for lag id allocation in atomic fashion. The LAG ID is allocated
from central chassis app db. A lua script loaded in the redis at the
time of lag allocator instantiaion ensures allocation unqiue lag id when
multiple clients requests for lag id simultaneously. System wide unique
lag id is used for system lag in VOQ based switches.
Signed-off-by: vedganes <vedavinayagam.ganesan@nokia.com>

Changes to fix code review comments. The lua script evaluation is not
passed with keys. The keys for the required data are internally
hardcoded in the script itself.
Signed-off-by: vedganes <vedavinayagam.ganesan@nokia.com>

Typos fixed. Redundant redis set call is removed.
@vganesan-nokia
Copy link
Contributor Author

retest this please

@vganesan-nokia
Copy link
Contributor Author

retest vs please

1 similar comment
@vganesan-nokia
Copy link
Contributor Author

retest vs please

@vganesan-nokia
Copy link
Contributor Author

/AzurePipelines run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 1603 in repo Azure/sonic-swss

@judyjoseph
Copy link
Contributor

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@judyjoseph
Copy link
Contributor

retest this please

@judyjoseph
Copy link
Contributor

retest vs please

1 similar comment
@vganesan-nokia
Copy link
Contributor Author

retest vs please

@judyjoseph
Copy link
Contributor

retest vs please

@judyjoseph
Copy link
Contributor

retest this please

Copy link
Contributor

@judyjoseph judyjoseph left a comment

Choose a reason for hiding this comment

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

LGTM

@xumia
Copy link
Collaborator

xumia commented Mar 4, 2021

retest vs please

1 similar comment
@vganesan-nokia
Copy link
Contributor Author

retest vs please

@vganesan-nokia
Copy link
Contributor Author

@judyjoseph, thanks for starting the Azurepipeline runs and your approval. I tried to restart the vs test. It seems "retest vs please" has not started the vs test. Would you please help to start the vs test?

@judyjoseph
Copy link
Contributor

vs tests it not required anymore, Azure Pipeline run is good enough. I will merge it,

@vganesan-nokia
Copy link
Contributor Author

vs tests it not required anymore, Azure Pipeline run is good enough. I will merge it,

o.k. thanks @judyjoseph. The system lag functionality PR (#1605) depends on this PR to build successfully.

@judyjoseph judyjoseph merged commit 1951365 into sonic-net:master Mar 11, 2021
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-swss that referenced this pull request Oct 5, 2021
What I did
Defined class for lag id allocator and added lua script for allocating/freeing lag id in atomic fashion

Why I did it

For portchannels in VOQ based chassis systems we need unique lag id across
the system. The lag id (aka system port aggreggator id) is allocated during portchannel
creation. The changes are for a class for lag id allocation in atomic fashion. The LAG ID is allocated
from central chassis app db. A lua script loaded in the redis at the
time of lag id allocator instantiation ensures allocating unique lag id when
multiple clients requests for lag id simultaneously.

Ref: VOQ LAG HLD PR: sonic-net/SONiC#697
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants