Skip to content

Unset SAI_PORT_ATTR_HW_LANE_LIST as key#1278

Closed
byu343 wants to merge 1 commit intoopencomputeproject:masterfrom
byu343:multi-phy
Closed

Unset SAI_PORT_ATTR_HW_LANE_LIST as key#1278
byu343 wants to merge 1 commit intoopencomputeproject:masterfrom
byu343:multi-phy

Conversation

@byu343
Copy link

@byu343 byu343 commented Jul 20, 2021

The reason is that we are using one syncd process to support multiple phy chips and for the ports from different phys, they may
have the same value on SAI_PORT_ATTR_HW_LANE_LIST.

This change is depended by sonic-net/sonic-buildimage#8146. Specifically, multiple switches are defined under guid 1 as below, however, ports from different switches may have the value on SAI_PORT_ATTR_HW_LANE_LIST.
{
"guid" : 1,
"name" : "phys", "dbAsic" : "GB_ASIC_DB",
"dbCounters" : "GB_COUNTERS_DB",
"dbFlex": "GB_FLEX_COUNTER_DB",
"dbState" : "STATE_DB",
"zmq_enable" : false,
"zmq_endpoint": "tcp://127.0.0.1:5565",
"zmq_ntf_endpoint": "tcp://127.0.0.1:5566",
"switches": [
{
"index" : 0,
"hwinfo" : "mdio0_0_0/0"
},
{
"index" : 1,
"hwinfo" : "mdio1_0_0/0"
}
}

Signed-off-by: Boyang Yu [email protected]

The reason is that we are using one syncd process to support
multiple phy chips and for the ports from different phys, they may
have the same value on SAI_PORT_ATTR_HW_LANE_LIST.

Signed-off-by: Boyang Yu <[email protected]>
@lguohan
Copy link
Collaborator

lguohan commented Jul 20, 2021

i do not understand this, they are different switches, the key should only matter on one switch. where do you see the issue?

* @brief Hardware Lane list
*
* @type sai_u32_list_t
* @flags MANDATORY_ON_CREATE | CREATE_ONLY | KEY
Copy link
Collaborator

Choose a reason for hiding this comment

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

hw lane list identifies uniquely ports on a single switch, it must be a KEY, please revert

Copy link
Collaborator

@kcudnik kcudnik Jul 20, 2021

Choose a reason for hiding this comment

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

is the error you getting from metadata in OA or syncd? can you paste error? is the scenario you are facing is that you have 2 SAI switches, one of the ports on 1st switch and one of the ports on 2nd switch have the same lanes ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

this fix will resolve that: sonic-net/sonic-sairedis#865

Copy link
Author

Choose a reason for hiding this comment

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

Sure. I'll the try your fix and hopefully close this PR thereafter. Thanks.

@byu343
Copy link
Author

byu343 commented Jul 20, 2021

i do not understand this, they are different switches, the key should only matter on one switch. where do you see the issue?

Yes, the ports having the same SAI_PORT_ATTR_HW_LANE_LIST are from different switches.

The error is
Jul 20 16:03:41.998421 smm211 DEBUG swss#orchagent: :- constructKey: constructed key: SAI_PORT_ATTR_HW_LANE_LIST:2,3;
Jul 20 16:03:41.998421 smm211 ERR swss#orchagent: :- meta_generic_validation_create: attribute key SAI_PORT_ATTR_HW_LANE_LIST:2,3; already exists, can't create_

raised from https://github.com/Azure/sonic-sairedis/blob/216e5497bfb23e697c269fdac0d6965902ebe644/meta/Meta.cpp#L5060.

It is happening under the setup of using one syncd process and one context to serve 8 phys. I'll investigate further why it happens.

@kcudnik
Copy link
Collaborator

kcudnik commented Jul 20, 2021

my fix on sairedis meta addresses this issue, you can close this issue here, and move it to sairedis issues, since related to sairedis not SAI

@byu343
Copy link
Author

byu343 commented Jul 20, 2021

The issue is fixed by sonic-net/sonic-sairedis#865.

@byu343 byu343 closed this Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants