sonic-sairedis icon indicating copy to clipboard operation
sonic-sairedis copied to clipboard

Error log "SAI_BRIDGE: mlnx_sai_bridge.c[1749]- mlnx_bridge_port_lag_or_port_get: Invalid port type - 2"

Open Junchao-Mellanox opened this issue 4 years ago • 1 comments

I run into this error log with SONiC regression. I believe this log is not related to my test case but a common issue. Related error logs are:

Mar 4 01:38:32.979542 r-tigris-04 INFO syncd#supervisord: syncd Mar 04 01:38:32 ERROR SAI_BRIDGE: mlnx_sai_bridge.c1749- mlnx_bridge_port_lag_or_port_get: Invalid port type - 2 Mar 4 01:38:32.979670 r-tigris-04 INFO syncd#supervisord: syncd Mar 04 01:38:32 ERROR SAI_UTILS: mlnx_sai_utils.c2477- get_dispatch_attribs_handler: Failed getting attrib SAI_BRIDGE_PORT_ATTR_PORT_ID

Sonic is trying to query SAI_BRIDGE_PORT_ATTR_PORT_ID for every bridge port However, this attribute is valid just for certain types of bridge port * @condition SAI_BRIDGE_PORT_ATTR_TYPE SAI_BRIDGE_PORT_TYPE_PORT or SAI_BRIDGE_PORT_ATTR_TYPE SAI_BRIDGE_PORT_TYPE_SUB_PORT Sonic in this case also tried to query the .1Q router bridge port SAI_BRIDGE_PORT_TYPE_1Q_ROUTER.

I checked the code, the related code is at stub_sai_utils.c. It is a very general function, I am not sure if we could check the port type before query the attribute. However, maybe we should suppress this kind of error log because it would fail regression case sometimes.

Logs: syslog.txt

Junchao-Mellanox avatar Mar 27 '20 09:03 Junchao-Mellanox

yes, this is common, discovery method don't respect conditions, just query all oid attributes, related https://github.com/Azure/sonic-buildimage/issues/7895

kcudnik avatar Jul 06 '21 13:07 kcudnik

I am closing this since it is a duplication of https://github.com/sonic-net/sonic-buildimage/issues/7895

Junchao-Mellanox avatar Jul 01 '24 03:07 Junchao-Mellanox