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

Mclag enhacements #1349

Merged
merged 23 commits into from
Jun 1, 2021
Merged

Mclag enhacements #1349

merged 23 commits into from
Jun 1, 2021

Conversation

gitsabari
Copy link
Contributor

@gitsabari gitsabari commented Jul 9, 2020

What I did
This PR contains the code changes to support Mclagsyncd changes for mclag enhancements as per HLD sonic-net/SONiC#596

Why I did it
Implemented as per the MCLAG enhancements HLD: sonic-net/SONiC#596

How I verified it
Mclag specific VS tests included part of check-in.

Details:
The PR includes the code changes for the mclagsyncd side of MCLAG enhancements
This PR must work with submitted PR's in other sonic repositories which are listed below.
> Iccpd: sonic-net/sonic-buildimage#4819
> Swss: #1331
> swss-common: sonic-net/sonic-swss-common#405
> Utilities: sonic-net/sonic-utilities#1138
> Mgmt-FW: sonic-net/sonic-mgmt-framework#59
added mclag sonic yang file sonic-net/sonic-buildimage#7622

@ghost
Copy link

ghost commented Jul 9, 2020

CLA assistant check
All CLA requirements met.

@gitsabari
Copy link
Contributor Author

@gechiang, @rlhui , @lguohan
can you please help merge and approve this at the earliest

@gitsabari
Copy link
Contributor Author

@gechiang , @lguohan, @rlhui
can you please help review and approve this merge request

@gitsabari
Copy link
Contributor Author

retest vs please

2 similar comments
@gitsabari
Copy link
Contributor Author

retest vs please

@gitsabari
Copy link
Contributor Author

retest vs please

@gitsabari
Copy link
Contributor Author

@rathnasabapathyv , @prvattem
can you please approve this PR if there are no more questions

@gitsabari
Copy link
Contributor Author

akokhan i have addressed all your review comments. if you dont have futher comments, please help approve the changes

return vid < fdb.vid;
else
return port_name < fdb.port_name;
//else if (port_name != fdb.port_name) return port_name < fdb.port_name;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove if not needed

akokhan
akokhan previously approved these changes May 2, 2021

if (write <= 0)
{
SWSS_LOG_ERROR("mclagsycnd to ICCPD, domain cfg send, buffer full; write to m_connection_socket failed");
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 recovery for buffer full? should it be retried again later? returned to caller with error status? The code seems to jut continue as if no error occurred?


if (write <= 0)
{
SWSS_LOG_ERROR("mclagsycnd to ICCPD, domain cfg send; write to m_connection_socket failed");
Copy link
Contributor

Choose a reason for hiding this comment

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

Any recovery or somehow to abort this operation when such error occurred?


if (write <= 0)
{
SWSS_LOG_ERROR("mclagsycnd to ICCPD, mclag iface cfg send, buffer full; write to m_connection_socket failed");
Copy link
Contributor

Choose a reason for hiding this comment

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

After error detected just continue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gechiang write call failures are rare and currently there is no handling at this point. haven't faced these issues in our testing.
Probably we can consider future enhancement to address it in further enhacements PRs

count = 0;
if (write <= 0)
{
SWSS_LOG_ERROR("mclagsycnd to ICCPD, mclag vlan member updates send, buffer full; write to m_connection_socket failed");
Copy link
Contributor

Choose a reason for hiding this comment

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

should it bail out? skip current iteration?

break;

default:
SWSS_LOG_ERROR("Invalid option type %u", op_hdr->op_type);
Copy link
Contributor

@gechiang gechiang May 4, 2021

Choose a reason for hiding this comment

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

Unexpected option perhaps should skip the rest of the code processing and bail out instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unexpected option perhaps should skip the rest of the code processing and bail out instead?

it is okay to continue. since this is option is not recognised by mclagsyncd although iccpd sends it. this is sub option within main option. next line increments the length and need to continue with next one
cur_len += (MCLAG_SUB_OPTION_HDR_LEN + op_hdr->op_len);

break;

default:
SWSS_LOG_WARN("Invalid option type %u", op_hdr->op_type);
Copy link
Contributor

Choose a reason for hiding this comment

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

Invalid Option Ok to continue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is okay to continue. since this is option is not recognised by mclagsyncd although iccpd sends it. this is sub option within main option. next line increments the length and need to continue with next one
cur_len += (MCLAG_SUB_OPTION_HDR_LEN + op_hdr->op_len);

@gechiang
Copy link
Contributor

gechiang commented May 4, 2021

I did not see any unit test code created for this set of changes. Can you please add the necessary unit test code?
At least add test cases to exercise all the messaging interactions. Please see sample unit test cases in the tests directory for docker virtual switch tests:
https://github.com/Azure/sonic-swss/tree/master/tests

@gitsabari
Copy link
Contributor Author

@gechiang for write call failures are rare and currently there is no handling at this point. haven't faced these issues in our testing.
Probably we can consider future enhancement to address it in further enhacements PRs

@gechiang
Copy link
Contributor

@gechiang for write call failures are rare and currently there is no handling at this point. haven't faced these issues in our testing.
Probably we can consider future enhancement to address it in further enhacements PRs

Sure. Since you did capture it with syslog we can defer this as future enhancement.

@gechiang
Copy link
Contributor

I did not see any unit test code created for this set of changes. Can you please add the necessary unit test code?
At least add test cases to exercise all the messaging interactions. Please see sample unit test cases in the tests directory for docker virtual switch tests:
https://github.com/Azure/sonic-swss/tree/master/tests

How about additional test cases to cover this new set of changes?
Can you please work on this to provide good coverage of your new code changes?

@gitsabari
Copy link
Contributor Author

I did not see any unit test code created for this set of changes. Can you please add the necessary unit test code?
At least add test cases to exercise all the messaging interactions. Please see sample unit test cases in the tests directory for docker virtual switch tests:
https://github.com/Azure/sonic-swss/tree/master/tests

How about additional test cases to cover this new set of changes?
Can you please work on this to provide good coverage of your new code changes?

@gechiang
i checked again. there are already test cases added part of #1331. It covers cases for new set of changes
tests/test_mclag.py
tests/test_mclag_fdb.py
tests/test_mclag_cfg.py

@gechiang
Copy link
Contributor

gechiang commented Jun 1, 2021

I did not see any unit test code created for this set of changes. Can you please add the necessary unit test code?
At least add test cases to exercise all the messaging interactions. Please see sample unit test cases in the tests directory for docker virtual switch tests:
https://github.com/Azure/sonic-swss/tree/master/tests

How about additional test cases to cover this new set of changes?
Can you please work on this to provide good coverage of your new code changes?

@gechiang
i checked again. there are already test cases added part of #1331. It covers cases for new set of changes
tests/test_mclag.py
tests/test_mclag_fdb.py
tests/test_mclag_cfg.py

Ok. Will go ahead approve this and merge...

@gechiang gechiang merged commit 72892e4 into sonic-net:master Jun 1, 2021
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-swss that referenced this pull request Oct 5, 2021
* mclagsyncd enhancements as per HLD at sonic-net/SONiC#596

* mclagsyncd enhancements as per HLD at sonic-net/SONiC#596

* mclagsyncd enhancements as per HLD at sonic-net/SONiC#596

* mclagsyncd enhancements as per HLD at sonic-net/SONiC#596

* updated mclag port isolate platform check function

* MCLAG Unique IP Changes.

* updated mclagsyncd

* resolved compilation issues with master branch

* updated mclagsyncd merge issue

* addressed review comments

* addressed review comments

* fixed build issues with armhf platform

* fixed build issues with armhf platform

* fixed build issue

* fixed build issue

* addressed review comments

* addressed review comments

* removed unused code

Co-authored-by: Tapash Das <tapash.das@broadcom.com>
@globaltrouble
Copy link
Contributor

FieldValueTuple desc_attr("policy_desc", "Mclag egress port isolate acl");
acl_attrs.push_back(desc_attr);

FieldValueTuple type_attr("type", "L3");
Copy link
Contributor

Choose a reason for hiding this comment

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

@gitsabari From the HLD it looks that ACL is needed for L2 traffic isolation, but table type is L3.
Why do we use L3?
Is it a bug?

EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…net#1349)

* [storyteller] adding a grep wrapper with predefined scenarios

Introduce storyteller tool to grep syslog (or any other logs) for
a story line of a certain scenario.

Defined scenarios are:
- reboot  : device reboot related events.
- service : service start/stop events.
- link    : link up/down events.
- lag     : LAG up/down events.
- bgp     : BGP config change events.
- crash   : process/service crash events.

Unmatched cateory is used as grepping regex directly.

Signed-off-by: Ying Xie <ying.xie@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.

9 participants