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

Layer 2 Forwarding Enhancements #529

Closed
wants to merge 59 commits into from

Conversation

anilkpandey
Copy link
Contributor

@anilkpandey anilkpandey commented May 10, 2019

- What I did

  1. Added code changes related to Layer 2 Forwarding Enhancements:
    Added the following commands:

VLAN range add/del
VLAN member range add/del
Static FDB add/del
FDB aging time configuration
show fdb aging time
show mac count
show vlan count
added port and vlan option in 'sonic-clear fdb'

- validate vlan id for vlan creation
- verify that port is not part of vlan when assigning IP address and vice versa
- verify that portchannel has no member and portchannel is not member of vlan when deleting the portchannel
- verify that port is not already untagged member of vlan when adding the port as untagged member of a vlan
-
@prsunny
Copy link
Contributor

prsunny commented May 10, 2019

I'm not sure if these validations must be here. There is an design discussion for overall Config validator and I don't think we need to scatter these checks in multiple places.

'show mac' was taking a lot of time to display the fdb entries when a large number of entries are present.
Using redis pipeline, reduced the time significantly.
Earlier it used to take about 10 minutes to show 32K MAC. After the fix it takes about 17-20 seconds.
revert changes
@anilkpandey anilkpandey changed the title added validation checks for VLAN, IP and Portchannel configurations 'show mac' performance improvements Jun 5, 2019
@anilkpandey
Copy link
Contributor Author

Hi @stcheng and @prsunny,

I just reverted the previous changes for validations and added a new file fdbshow for 'show mac' performance enhancements. Please review the changes.

In case you want to consider the validations changes, let me know, I will readd the changes in that case.

Thanks.

Copy link
Contributor

@stcheng stcheng left a comment

Choose a reason for hiding this comment

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

could you resolve the conflicts? and also remove the .DS_Store file in the pull request?

config/main.py Outdated Show resolved Hide resolved
reverted changes made as part of validations
scripts/fdbshow Outdated Show resolved Hide resolved
scripts/fdbshow Outdated Show resolved Hide resolved
scripts/fdbshow Outdated Show resolved Hide resolved
@prsunny
Copy link
Contributor

prsunny commented Jul 9, 2019

retest this please

prsunny
prsunny previously approved these changes Jul 9, 2019
stcheng
stcheng previously approved these changes Jul 10, 2019
@jleveque
Copy link
Contributor

Retest this please

1 similar comment
@jleveque
Copy link
Contributor

Retest this please

@anilkpandey anilkpandey changed the title 'show mac' performance improvements Layer 2 Forwarding Enhancements Sep 8, 2019
@anilkpandey
Copy link
Contributor Author

Added code changes related to Layer 2 Forwarding Enhancements

@prsunny prsunny self-requested a review September 9, 2019 19:13
@lgtm-com
Copy link

lgtm-com bot commented Dec 9, 2020

This pull request introduces 1 alert when merging 2a9ab88 into d414970 - view on LGTM.com

new alerts:

  • 1 for Unnecessary pass

@lguohan lguohan added this to In progress in brcm upstream Dec 16, 2020
added more tests for vlan range and fdb config commands
@lgtm-com
Copy link

lgtm-com bot commented Dec 18, 2020

This pull request introduces 2 alerts when merging a8c651e into 9419627 - view on LGTM.com

new alerts:

  • 1 for Unnecessary pass
  • 1 for Unused local variable

@anilkpan
Copy link
Contributor

retest this please

1 similar comment
@anilkpan
Copy link
Contributor

retest this please

scripts/fdbshow Outdated
@@ -31,8 +31,8 @@ import json
import sys

from natsort import natsorted
from swsssdk import port_util
from swsscommon.swsscommon import SonicV2Connector
from swsssdk import SonicV2Connector, port_util
Copy link
Contributor

Choose a reason for hiding this comment

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

we should not use swsssdk, it is deprecating.

@lgtm-com
Copy link

lgtm-com bot commented Nov 3, 2021

This pull request introduces 2 alerts when merging 2fcd83d into 474bdbf - view on LGTM.com

new alerts:

  • 1 for Unused local variable
  • 1 for Wrong number of arguments in a call

@lgtm-com
Copy link

lgtm-com bot commented Nov 9, 2021

This pull request introduces 2 alerts when merging b037b7d into 8a8577b - view on LGTM.com

new alerts:

  • 1 for Unreachable code
  • 1 for Wrong number of arguments in a call

@anilkpandey
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 529 in repo Azure/sonic-utilities

@anilkpandey
Copy link
Contributor Author

retest this please

@anilkpandey
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anilkpandey
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ljyfree
Copy link

ljyfree commented Apr 12, 2022

Hi all
I notice that "A Static FDB entry should be configurable in hardware from CLI" was mentioned in SONiC Layer 2 Forwarding Enhancements HLD.md.
Wonder why this pull was not be merged which contain SONiC-CLI to config static FDB? Without this pull,how could I add a static FDB from CLI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
brcm upstream
  
Done
Development

Successfully merging this pull request may close these issues.

None yet