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

[Multiasic]: Add calculation of interface index for backplane interfaces #68

Merged

Conversation

SuvarnaMeenakshi
Copy link
Contributor

Add calculation of interface index for backplane interfaces
in multi asic platform. Multiasic platform will have
backplane interface names of the format Ethernet-BP.

Signed-off-by: SuvarnaMeenakshi sumeenak@microsoft.com

interfaces in multi asic platform. Multiasic platform will have
backplane interface names of the format Ethernet-BP<x>.

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
@@ -6,19 +6,22 @@


SONIC_ETHERNET_RE_PATTERN = "^Ethernet(\d+)$"
SONIC_ETHERNET_BP_RE_PATTERN = "^Ethernet-BP(\d+)$"
Copy link
Contributor

@qiluo-msft qiluo-msft Apr 28, 2020

Choose a reason for hiding this comment

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

BP [](start = 42, length = 2)

Explain in comment what is BP? #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added as per comment

SONIC_PORTCHANNEL_RE_PATTERN = "^PortChannel(\d+)$"
SONIC_MGMT_PORT_RE_PATTERN = "^eth(\d+)$"


class BaseIdx:
ethernet_base_idx = 1
ethernet_bp_base_idx = 9000
Copy link
Contributor

@qiluo-msft qiluo-msft Apr 28, 2020

Choose a reason for hiding this comment

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

9000 [](start = 27, length = 4)

How do you choose this value? Is 2000 working? #Closed

Copy link
Contributor

Choose a reason for hiding this comment

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

What is the range used by a realistic SKU?


In reply to: 416935612 [](ancestors = 416935612)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Chose 9000 as the offset will be large enough and Index does not overlap.
With 2000 as offset, it might overlap with PortChannel interface index.

Copy link
Contributor

Choose a reason for hiding this comment

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

@qiluo-msft , i think 9000 should be a good safe offset value for back-plane instead of a lower value

Copy link
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

As comments

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
@SuvarnaMeenakshi SuvarnaMeenakshi merged commit 581add1 into sonic-net:master May 5, 2020
@SuvarnaMeenakshi SuvarnaMeenakshi deleted the multiasic_swsssdk branch May 5, 2020 03:41
abdosi pushed a commit that referenced this pull request May 5, 2020
…ces (#68)

* [Multiasic]: Add calculation of infterface index for backplane
interfaces in multi asic platform. Multiasic platform will have
backplane interface names of the format Ethernet-BP<x>.

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>

* Added comment.

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
praveen-li pushed a commit to praveen-li/sonic-py-swsssdk that referenced this pull request May 4, 2021
…ces (sonic-net#68)

* [Multiasic]: Add calculation of infterface index for backplane
interfaces in multi asic platform. Multiasic platform will have
backplane interface names of the format Ethernet-BP<x>.

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>

* Added comment.

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
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.

6 participants