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

Add support for recirc port and everflow #1530

Merged
merged 17 commits into from
Jun 2, 2021

Conversation

ysmanman
Copy link
Contributor

@ysmanman ysmanman commented Dec 7, 2020

This PR adds recirc port and Everflow support in distributed VOQ chassis.

What I did

Recirc prot changes:

  • portsyncd includes recirc ports in total port count.
  • portsyncd does not add recirc ports to g_portSet because no host intfs are created for recirc ports.
  • portsorch discovers recirc ports by checking port role setting and adds them correspondingly.
  • intforch supports adding rif for recirc ports.

Everflow changes:

  • mirrororch allows mirror dst port to be system port.
  • mirrororch sets mirror dst port to recirc port in voq switch.
  • mirrororch sets router mac as mirror dst mac in voq switch.

Why I did it

Support recirc port and Everflow

How I verified it

Tested in a distributed VOQ system with BCM ASICs.

Details if related

This PR has some dependency on PR #1431 and some minor change is needed once that PR is merged.

Recirc prot changes:
- portsyncd includes recirc ports in total port count.
- portsyncd does not add recirc ports to g_portSet because no host intfs are created for recirc ports.
- portsorch discovers recirc ports by checking port role setting and adds them correspondingly.
- intforch supports adding rif for recirc ports.

Everflow changes:
- mirrororch allows mirror dst port to be system port.
- mirrororch sets mirror dst port to recirc port in voq switch.
- mirrororch sets router mac as mirror dst mac in voq switch.
@ghost
Copy link

ghost commented Dec 7, 2020

CLA assistant check
All CLA requirements met.

@@ -678,6 +679,10 @@ bool MirrorOrch::getNeighborInfo(const string& name, MirrorEntry& session)

return true;
}
case Port::SYSTEM:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we actually need this? Is knowing route existing enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

mirrororch makes use of getNeighborInfo() to resolve mirror dstIp into neighbor, especially when mirror dstIp is actually a neighbor. Therefore, the change is still required to allow resolving mirror dstIp to remote neighbor in multi-asic.

orchagent/portsorch.cpp Outdated Show resolved Hide resolved
orchagent/portsorch.cpp Outdated Show resolved Hide resolved
@rlhui
Copy link
Contributor

rlhui commented Dec 10, 2020

Could we please name it recycle port instead of recirc port?

@ysmanman
Copy link
Contributor Author

ysmanman commented Dec 10, 2020 via email

@zhenggen-xu
Copy link
Collaborator

Do you have a design doc for this feature?

@lgtm-com
Copy link

lgtm-com bot commented Dec 10, 2020

This pull request introduces 3 alerts when merging 3185fca into cf27721 - view on LGTM.com

new alerts:

  • 3 for Unused local variable

@ysmanman
Copy link
Contributor Author

ysmanman commented Dec 10, 2020 via email

@lgtm-com
Copy link

lgtm-com bot commented Dec 10, 2020

This pull request introduces 3 alerts when merging 9324a32 into 376acfe - view on LGTM.com

new alerts:

  • 3 for Unused local variable

@lgtm-com
Copy link

lgtm-com bot commented Feb 3, 2021

This pull request introduces 3 alerts when merging 6e33003 into 288fb40 - view on LGTM.com

new alerts:

  • 3 for Unused local variable

asic_db = swsscommon.DBConnector(swsscommon.ASIC_DB, dvs.redis_sock, 0)
asic_db_lanes_tbl = swsscommon.Table(asic_db, "LANES")

lanes = asic_db_lanes_tbl.get('')[1]
Copy link
Contributor

Choose a reason for hiding this comment

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

use wait_for function to improve robustness

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. Fixed.

@lgtm-com
Copy link

lgtm-com bot commented Feb 13, 2021

This pull request introduces 3 alerts when merging 5df61d8 into f9d5959 - view on LGTM.com

new alerts:

  • 3 for Unused local variable

@lgtm-com
Copy link

lgtm-com bot commented Feb 14, 2021

This pull request introduces 3 alerts when merging d5dbaf4 into f2854f8 - view on LGTM.com

new alerts:

  • 3 for Unused local variable

- Fix doProcessRecircPort to bail out if port Id is not found
- Fix a couple of issues in test_recirc_port and also address review comments
@lgtm-com
Copy link

lgtm-com bot commented Feb 16, 2021

This pull request introduces 2 alerts when merging e50cbd5 into de03dd7 - view on LGTM.com

new alerts:

  • 2 for Unused local variable

@lgtm-com
Copy link

lgtm-com bot commented Feb 16, 2021

This pull request introduces 2 alerts when merging ec03925 into de03dd7 - view on LGTM.com

new alerts:

  • 2 for Unused local variable

@lgtm-com
Copy link

lgtm-com bot commented Apr 20, 2021

This pull request introduces 2 alerts when merging 95377ac into 500e2e9 - view on LGTM.com

new alerts:

  • 2 for Unused local variable

@lgtm-com
Copy link

lgtm-com bot commented Apr 20, 2021

This pull request introduces 2 alerts when merging e0d9c79 into 500e2e9 - view on LGTM.com

new alerts:

  • 2 for Unused local variable

@ysmanman
Copy link
Contributor Author

Looks fine to me.

Please fix LGTM and resolve conflict. Will approve then.

@abdosi Thanks for review. Conflict was resolved and all checks have passed now.

@lgtm-com
Copy link

lgtm-com bot commented Apr 28, 2021

This pull request introduces 2 alerts when merging f55823f into ee7a735 - view on LGTM.com

new alerts:

  • 2 for Unused local variable

@ysmanman
Copy link
Contributor Author

Conflict was resolved and all checks have passed now.

@ysmanman ysmanman closed this Apr 28, 2021
@ysmanman ysmanman reopened this Apr 28, 2021
@ysmanman
Copy link
Contributor Author

@abdosi Conflict was resolved and all checks have passed now. Can you take a look and approve?

@anshuv-mfst
Copy link

Hi @lguohan , @abdosi - could you please review and approve.

@abdosi
Copy link
Contributor

abdosi commented May 19, 2021

@ysmanman can you fix the conflict.

@ysmanman
Copy link
Contributor Author

@ysmanman can you fix the conflict.

@abdosi Resolve the conflict just now.

# Add recirc ports to port config in configDB
recirc_port_lane_name_map = {}
for i in range(2):
name = alias = "Ethernet-Rec%s" % i
Copy link
Contributor

Choose a reason for hiding this comment

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

does it not need Ethernet-IB here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@abdosi thanks for review. The name do not really matter here. What matters is the port role. We covered both port roles: Rec and Inb in the test (Line188).


# Verify recirc ports in port table in applDB
for i in range(2):
name = alias = "Ethernet-Rec%s" % i
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@abdosi The name do not really matter here. What matters is the port role. We covered both port roles: Rec and Inb in the test (Line188 and 205).

abdosi
abdosi previously approved these changes May 19, 2021
@lgtm-com
Copy link

lgtm-com bot commented May 19, 2021

This pull request introduces 2 alerts when merging 19ec921 into 3629d70 - view on LGTM.com

new alerts:

  • 2 for Unused local variable

@ysmanman
Copy link
Contributor Author

@abdosi Resolved conflicts again. Swss tests passed.

@anshuv-mfst
Copy link

@abdosi - could you please re-approve.

@abdosi abdosi merged commit 5ef4b38 into sonic-net:master Jun 2, 2021
qiluo-msft added a commit to qiluo-msft/sonic-swss that referenced this pull request Sep 16, 2021
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-swss that referenced this pull request Oct 5, 2021
This PR adds recirc port and Everflow support in distributed VOQ chassis.

What I did

Recirc prot changes:

portsyncd includes recirc ports in total port count.
portsyncd does not add recirc ports to g_portSet because no host intfs are created for recirc ports.
portsorch discovers recirc ports by checking port role setting and adds them correspondingly.
intforch supports adding rif for recirc ports.
Everflow changes:

mirrororch allows mirror dst port to be system port.
mirrororch sets mirror dst port to recirc port in voq switch.
mirrororch sets router mac as mirror dst mac in voq switch.
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
… are no broken changes with future versions (sonic-net#1530)

#### What I did
Fixes sonic-net/sonic-buildimage#7152

#### How I did it
Relax the install_requires
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.

6 participants