Skip to content

Fix for inband port #1788

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

Closed
wants to merge 1 commit into from
Closed

Conversation

ysmanman
Copy link
Contributor

What I did
Fix issues seen with inband port

  • Setting admin and oper status of recirc/inband port to up.
  • Setting system port info for inband port.

Why I did it
Observed the following issues with inband port:

  • SAI does not support setting admin and oper status of recirc ports today.
    As a result, the admin and oper status of inband port are down. This prevents
    remote neighbor from being programmed.
  • For recirc ports, SAI call get_system_port_attribute() returns a pid that's
    different from the pid returned from get_switch_attribute(SAI_SWITCH_ATTR_PORT_LIST).
    As a result, the system port info of recirc ports are not set correctly when adding
    system port of recirc port.

How I verified it
Without the above fix, remote neighbor was not programmed. Verified that remote neighbor was programmed with the fix.

Details if related

Fix the following issues for inband port:
- SAI does not support setting admin and oper status of recirc ports today.
  As a result, the admin and oper status of inband port are down. This prevents
  remote neighbor from being programmed. Fix this by setting admin and oper status
  of recirc port to up.
- For recirc ports, SAI call get_system_port_attribute() returns a pid that's
  different from the pid returned from get_switch_attribute(SAI_SWITCH_ATTR_PORT_LIST).
  As a result, the system port info of recirc ports are not set correctly when adding
  system port of recirc port. Since the aliases of inband port in system port and port
  table are the same, fix this by retrieving local port with alias.
@ysmanman
Copy link
Contributor Author

@vganesan-nokia According to our testing, inband port was not working without this PR. We wanted to make sure we tested inband port correctly. Can you please take a look at this PR and see if this PR is required?

@vganesan-nokia
Copy link
Contributor

vganesan-nokia commented Jun 30, 2021

@vganesan-nokia According to our testing, inband port was not working without this PR. We wanted to make sure we tested inband port correctly. Can you please take a look at this PR and see if this PR is required?

@ysmanman, we do not have this problem. We use only one recycle port. It is defined as Ethernet-IB0 in port_config.ini. The config_db.json also defines this Ethernet-IB0 in PORT table. We get the correct oid (the same oid we get in PortsOrch constructor and later saved in port.m_port_id in initPort()) for SAI_SYSTEM_PORT_ATTR_PORT attribute when we call the get_system_port_attribute() with system port id of the Ethernet-IB0

If Ethernet-Rec is not defined in PORT table in config_db.json, there will not be port entry for this port in port list in PortsOrch. In that case, getting this error is normal (i.e. given the local port id corresponding to the system port id of the Ethernet-Rcy, we'll not get local port. since it is not created as part of initPort). If Ethernet-Rcy iis defined n PORT table and in port_config.ini, still, if port is not seen in the port list, there might be some problem in port initialization or there may be some problem in SAI which has different value for SAI_SYSTEM_PORT_ATTR_PORT attribute of the system port of Ethernet-Rcy.

@ysmanman ysmanman closed this Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants