Skip to content

Port serdes changes#1611

Merged
daall merged 9 commits intosonic-net:masterfrom
dgsudharsan:sixtap
Feb 9, 2021
Merged

Port serdes changes#1611
daall merged 9 commits intosonic-net:masterfrom
dgsudharsan:sixtap

Conversation

@dgsudharsan
Copy link
Collaborator

What I did
Migrating the port serdes programming from existing port attributes to port serdes object

Why I did it
This change is required for supporting 6 tap filters which cannot be supported through existing port attributes

How I verified it
Load the changes on existing platforms and verify the pre-emphasis settings are correctly programmed in the hardware
Load the changes on new platforms requiring 6tap filter and verified the settings are programmed correctly in the hardware

Details if related

@dgsudharsan
Copy link
Collaborator Author

retest this please

@dgsudharsan
Copy link
Collaborator Author

retest vs please

attr.value.u32list.list = serdes_val.data();
if (port_attr.value.oid != SAI_NULL_OBJECT_ID)
{
status = sai_port_api->remove_port_serdes(port_attr.value.oid);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can port_serdes be removed on the fly? Or do you require the port to be shutdown etc?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It can be removed on the fly. It just removes the software object. The logic is introduced because the port serdes object has all attributes as create only and since multiple attributes need to be set which the current set attribute doesn't support, we have this logic of deleting the existing object and recreating it.

port_serdes_attr.id = SAI_PORT_SERDES_ATTR_PORT_ID;
port_serdes_attr.value.oid = port_id;
attr_list.emplace_back(port_serdes_attr);
SWSS_LOG_ERROR("Creating serdes for port 0x%" PRIx64, port_id);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This cannot be error -> please change to INFO as you already have one NOTICE below

return false;
SWSS_LOG_ERROR("Failed to create port serdes for port 0x%" PRIx64,
port_id);
return false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Extra space

@daall
Copy link
Contributor

daall commented Jan 28, 2021

It looks like the same set of tests (acl, CRM, mirror, etc.) are failing consistently between re-runs. @dgsudharsan can you take a look?

@dgsudharsan
Copy link
Collaborator Author

It looks like the same set of tests (acl, CRM, mirror, etc.) are failing consistently between re-runs. @dgsudharsan can you take a look?

Sure. Let me run the tests locally. Meanwhile let me also try to rebuild here again to see if it succeeds.

@dgsudharsan
Copy link
Collaborator Author

retest vs please

@dgsudharsan
Copy link
Collaborator Author

It looks like the same set of tests (acl, CRM, mirror, etc.) are failing consistently between re-runs. @dgsudharsan can you take a look?

Sure. Let me run the tests locally. Meanwhile let me also try to rebuild here again to see if it succeeds.

Currently one test failing. I don't think the failing tests are due to any of my changes as my changes come into play only when media_settings.json is defined which is not for a vs

@dgsudharsan
Copy link
Collaborator Author

retest vs please

1 similar comment
@dgsudharsan
Copy link
Collaborator Author

retest vs please

prsunny
prsunny previously approved these changes Jan 28, 2021
Copy link
Collaborator

@prsunny prsunny left a comment

Choose a reason for hiding this comment

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

lgtm.. wait for other reviewers.

@dgsudharsan
Copy link
Collaborator Author

retest vs please

2 similar comments
@dgsudharsan
Copy link
Collaborator Author

retest vs please

@dgsudharsan
Copy link
Collaborator Author

retest vs please

@prsunny
Copy link
Collaborator

prsunny commented Jan 30, 2021

/AzurePipeline run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lguohan
Copy link
Contributor

lguohan commented Jan 30, 2021

/AzurePipelines run

@prsunny
Copy link
Collaborator

prsunny commented Feb 2, 2021

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

prsunny
prsunny previously approved these changes Feb 2, 2021
@jleveque
Copy link
Contributor

jleveque commented Feb 2, 2021

retest vs please

}
else
{
SWSS_LOG_ERROR("Unknown port field: %s", fvField(i).c_str());
Copy link
Contributor

Choose a reason for hiding this comment

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

The CRM tests are failing b/c the syslog is getting throttled due to this message:

Feb  2 23:46:10.029687 9a649eaefbe1 ERR #orchagent: message repeated 4793 times: [ :- doPortTask: Unknown port field: alias]

Do we need to add/skip "alias" here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can remove this as there might be other fields that could be added in the future which may not be significant for the SAI conversion.

@dgsudharsan
Copy link
Collaborator Author

retest this please

@prsunny
Copy link
Collaborator

prsunny commented Feb 4, 2021

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dgsudharsan
Copy link
Collaborator Author

retest this please

@prsunny
Copy link
Collaborator

prsunny commented Feb 8, 2021

/AzurePipelines run

@azure-pipelines
Copy link

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

@jleveque jleveque requested a review from daall February 9, 2021 18:09
@daall daall merged commit b8193d1 into sonic-net:master Feb 9, 2021
daall pushed a commit that referenced this pull request Feb 16, 2021
Co-authored-by: dgsudharsan <sudharsan_gopalarat@dell.com>
@aravindmani-1
Copy link

@daall

Looks like this PR is not merged into Azure master image.
Can we merge this PR since we need it for DellEMC Z9332f platform?.

Thanks,
Aravind.

DavidZagury pushed a commit to DavidZagury/sonic-swss that referenced this pull request Mar 4, 2021
Co-authored-by: dgsudharsan <sudharsan_gopalarat@dell.com>
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-swss that referenced this pull request Oct 5, 2021
Co-authored-by: dgsudharsan <sudharsan_gopalarat@dell.com>
@kcudnik
Copy link
Contributor

kcudnik commented Feb 19, 2022

this pr is explicitly removing port serdes if it exists on a given port, tis rises a question whether this port serdes should be treated like vlan is (that needs to be explicitly removed before removing port) or whether it can be treated like a queue (that will be auto removed when port is removed)

when implementing portserdes in virtual switch on sairedis lib, first approach will break backward compatibility with previous unittets that are actually removing port, they would need to be updated to remove port serdes as well or remove for both scenarios could be implemented

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

Fix sonic-net/sonic-buildimage#7433

Right now config reload -l is getting failed due to an error.
I guess the problem is here in sonic-utilities repo. If user does not provide filename with config reload -l, command = "{} -j {} -v DEVICE_METADATA.localhost.hwsku".format(SONIC_CFGGEN_PATH, filename) will not provide cfg_hwsku i.e. hwsku parameter as it should which will later cause problem here command = "{} -H -k {} --write-to-db".format(SONIC_CFGGEN_PATH, cfg_hwsku) as hwsku is not available around that time.

that's why we notice errors like No such file or directory: 'None' as pasted in this issue.

- How I did it
To Fix the issue, moved the part where the code gets cfg_hwsku command = "{} -j {} -v DEVICE_METADATA.localhost.hwsku".format(SONIC_CFGGEN_PATH, file) to the same location it needed as we get filename by default.

- How to verify it
'sudo config reload -l'
Added test cases.

Signed-off-by: Sangita Maity <samaity@linkedin.com>
@dgsudharsan dgsudharsan deleted the sixtap branch March 9, 2023 02:00
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
Co-authored-by: dgsudharsan <sudharsan_gopalarat@dell.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.

7 participants