Skip to content

remove low speed port from test port list for breakout test scenario#12084

Merged
StormLiangMS merged 1 commit intosonic-net:masterfrom
XuChen-MSFT:xuchen3/master/remove-low-speed-port
Apr 2, 2024
Merged

remove low speed port from test port list for breakout test scenario#12084
StormLiangMS merged 1 commit intosonic-net:masterfrom
XuChen-MSFT:xuchen3/master/remove-low-speed-port

Conversation

@XuChen-MSFT
Copy link
Contributor

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

Regarding to 7050qx's QoS SAI test for topo t0:

test port select result is as below:
testPortIds={0: {0:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]}};

and 1,2,3 are low speed breakout port. as below:

admin@bjw-can-7050qx-3:~$ show int st
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC


 Ethernet0                9      10G   9100    N/A     Ethernet1          routed      up     down                            SFP/SFP+/SFP28         off
 Ethernet1               10      10G   9100    N/A     Ethernet2           trunk      up       up                            SFP/SFP+/SFP28         off
 Ethernet2               11      10G   9100    N/A     Ethernet3           trunk      up       up                            SFP/SFP+/SFP28         off
 Ethernet3               12       1G   9100    N/A     Ethernet4           trunk      up       up                            SFP/SFP+/SFP28         off
 Ethernet4      13,14,15,16      40G   9100    N/A   Ethernet6/1           trunk      up       up  QSFP+ or later with SFF-8636 or SFF-8436         off

it cause two issue:

  • caused using wrong test target porfile for qos sai test. as below:

      profileName = ingressLosslessProfile["profileName"]      >>>>> [Xu]: just get profile of first test port, in this function.
      logger.info(
          "Lossless Buffer profile selected is {}".format(profileName))
    
      if self.isBufferInApplDb(dut_asic):
          profile_pattern = "^BUFFER_PROFILE_TABLE\\:pg_lossless_(.*)_profile$"
      else:
          profile_pattern = "^BUFFER_PROFILE\\|pg_lossless_(.*)_profile"
      m = re.search(profile_pattern, profileName)
      pytest_assert(m.group(1), "Cannot find port speed/cable length")
    
      # portSpeedCableLength = m.group(1)
      portSpeedCableLength = "40000_300m"     >>>> [Xu]: according to above sample result of test port selection, first port' id is 1 (it's Etherent1), the corresponding PG lossless porfile is "pg_lossless_10000_300m_profile". so we can never get expected pg_lossless_40000_300m_profile profile.
    
  • cause qos sai test traffic go through low speed breakout port rather than high speed 40G port
    and eventually, caused Xon case failure.

How did you do it?

remove low speed port out of test port list

How did you verify/test it?

pass UT

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

'Arista-7050CX3-32S-D48C8'
]

BREAKOUT_SKUS = ['Arista-7050-QX-32S']
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this removed?

Copy link
Contributor Author

@XuChen-MSFT XuChen-MSFT Mar 30, 2024

Choose a reason for hiding this comment

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

move this to qos_sai_base.py

because need to check it in dutConfig() method, in order to only remove low speed port for "BREAKOUT_SKUS" for safe.

        if src_dut.facts['hwsku'] in **self.BREAKOUT_SKUS** and 'backend' not in topo:
            for speed, portlist in port_speeds.items():
                if int(speed) < 40000:
                    for portname in portlist:
                        low_speed_portIds.append(src_mgFacts["minigraph_ptf_indices"][portname])

Copy link
Collaborator

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

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

LGTM

@StormLiangMS StormLiangMS merged commit 49335ba into sonic-net:master Apr 2, 2024
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Apr 2, 2024
…onic-net#12084)

What is the motivation for this PR?
Regarding to 7050qx's QoS SAI test for topo t0:

test port select result is as below:
testPortIds={0: {0:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]}};

and 1,2,3 are low speed breakout port. as below:

admin@bjw-can-7050qx-3:~$ show int st
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC

 Ethernet0                9      10G   9100    N/A     Ethernet1          routed      up     down                            SFP/SFP+/SFP28         off
 Ethernet1               10      10G   9100    N/A     Ethernet2           trunk      up       up                            SFP/SFP+/SFP28         off
 Ethernet2               11      10G   9100    N/A     Ethernet3           trunk      up       up                            SFP/SFP+/SFP28         off
 Ethernet3               12       1G   9100    N/A     Ethernet4           trunk      up       up                            SFP/SFP+/SFP28         off
 Ethernet4      13,14,15,16      40G   9100    N/A   Ethernet6/1           trunk      up       up  QSFP+ or later with SFF-8636 or SFF-8436         off
it cause two issue:

caused using wrong test target porfile for qos sai test. as below:

  profileName = ingressLosslessProfile["profileName"]      >>>>> [Xu]: just get profile of first test port, in this function.
  logger.info(
      "Lossless Buffer profile selected is {}".format(profileName))

  if self.isBufferInApplDb(dut_asic):
      profile_pattern = "^BUFFER_PROFILE_TABLE\\:pg_lossless_(.*)_profile$"
  else:
      profile_pattern = "^BUFFER_PROFILE\\|pg_lossless_(.*)_profile"
  m = re.search(profile_pattern, profileName)
  pytest_assert(m.group(1), "Cannot find port speed/cable length")

  # portSpeedCableLength = m.group(1)
  portSpeedCableLength = "40000_300m"     >>>> [Xu]: according to above sample result of test port selection, first port' id is 1 (it's Etherent1), the corresponding PG lossless porfile is "pg_lossless_10000_300m_profile". so we can never get expected pg_lossless_40000_300m_profile profile.
cause qos sai test traffic go through low speed breakout port rather than high speed 40G port
and eventually, caused Xon case failure.

How did you do it?
remove low speed port out of test port list

How did you verify/test it?
pass UT
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Apr 2, 2024
…onic-net#12084)

What is the motivation for this PR?
Regarding to 7050qx's QoS SAI test for topo t0:

test port select result is as below:
testPortIds={0: {0:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]}};

and 1,2,3 are low speed breakout port. as below:

admin@bjw-can-7050qx-3:~$ show int st
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC

 Ethernet0                9      10G   9100    N/A     Ethernet1          routed      up     down                            SFP/SFP+/SFP28         off
 Ethernet1               10      10G   9100    N/A     Ethernet2           trunk      up       up                            SFP/SFP+/SFP28         off
 Ethernet2               11      10G   9100    N/A     Ethernet3           trunk      up       up                            SFP/SFP+/SFP28         off
 Ethernet3               12       1G   9100    N/A     Ethernet4           trunk      up       up                            SFP/SFP+/SFP28         off
 Ethernet4      13,14,15,16      40G   9100    N/A   Ethernet6/1           trunk      up       up  QSFP+ or later with SFF-8636 or SFF-8436         off
it cause two issue:

caused using wrong test target porfile for qos sai test. as below:

  profileName = ingressLosslessProfile["profileName"]      >>>>> [Xu]: just get profile of first test port, in this function.
  logger.info(
      "Lossless Buffer profile selected is {}".format(profileName))

  if self.isBufferInApplDb(dut_asic):
      profile_pattern = "^BUFFER_PROFILE_TABLE\\:pg_lossless_(.*)_profile$"
  else:
      profile_pattern = "^BUFFER_PROFILE\\|pg_lossless_(.*)_profile"
  m = re.search(profile_pattern, profileName)
  pytest_assert(m.group(1), "Cannot find port speed/cable length")

  # portSpeedCableLength = m.group(1)
  portSpeedCableLength = "40000_300m"     >>>> [Xu]: according to above sample result of test port selection, first port' id is 1 (it's Etherent1), the corresponding PG lossless porfile is "pg_lossless_10000_300m_profile". so we can never get expected pg_lossless_40000_300m_profile profile.
cause qos sai test traffic go through low speed breakout port rather than high speed 40G port
and eventually, caused Xon case failure.

How did you do it?
remove low speed port out of test port list

How did you verify/test it?
pass UT
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202311: #12272

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #12271

mssonicbld pushed a commit that referenced this pull request Apr 2, 2024
…12084)

What is the motivation for this PR?
Regarding to 7050qx's QoS SAI test for topo t0:

test port select result is as below:
testPortIds={0: {0:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]}};

and 1,2,3 are low speed breakout port. as below:

admin@bjw-can-7050qx-3:~$ show int st
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC

 Ethernet0                9      10G   9100    N/A     Ethernet1          routed      up     down                            SFP/SFP+/SFP28         off
 Ethernet1               10      10G   9100    N/A     Ethernet2           trunk      up       up                            SFP/SFP+/SFP28         off
 Ethernet2               11      10G   9100    N/A     Ethernet3           trunk      up       up                            SFP/SFP+/SFP28         off
 Ethernet3               12       1G   9100    N/A     Ethernet4           trunk      up       up                            SFP/SFP+/SFP28         off
 Ethernet4      13,14,15,16      40G   9100    N/A   Ethernet6/1           trunk      up       up  QSFP+ or later with SFF-8636 or SFF-8436         off
it cause two issue:

caused using wrong test target porfile for qos sai test. as below:

  profileName = ingressLosslessProfile["profileName"]      >>>>> [Xu]: just get profile of first test port, in this function.
  logger.info(
      "Lossless Buffer profile selected is {}".format(profileName))

  if self.isBufferInApplDb(dut_asic):
      profile_pattern = "^BUFFER_PROFILE_TABLE\\:pg_lossless_(.*)_profile$"
  else:
      profile_pattern = "^BUFFER_PROFILE\\|pg_lossless_(.*)_profile"
  m = re.search(profile_pattern, profileName)
  pytest_assert(m.group(1), "Cannot find port speed/cable length")

  # portSpeedCableLength = m.group(1)
  portSpeedCableLength = "40000_300m"     >>>> [Xu]: according to above sample result of test port selection, first port' id is 1 (it's Etherent1), the corresponding PG lossless porfile is "pg_lossless_10000_300m_profile". so we can never get expected pg_lossless_40000_300m_profile profile.
cause qos sai test traffic go through low speed breakout port rather than high speed 40G port
and eventually, caused Xon case failure.

How did you do it?
remove low speed port out of test port list

How did you verify/test it?
pass UT
mssonicbld pushed a commit that referenced this pull request Apr 2, 2024
…12084)

What is the motivation for this PR?
Regarding to 7050qx's QoS SAI test for topo t0:

test port select result is as below:
testPortIds={0: {0:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]}};

and 1,2,3 are low speed breakout port. as below:

admin@bjw-can-7050qx-3:~$ show int st
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC

 Ethernet0                9      10G   9100    N/A     Ethernet1          routed      up     down                            SFP/SFP+/SFP28         off
 Ethernet1               10      10G   9100    N/A     Ethernet2           trunk      up       up                            SFP/SFP+/SFP28         off
 Ethernet2               11      10G   9100    N/A     Ethernet3           trunk      up       up                            SFP/SFP+/SFP28         off
 Ethernet3               12       1G   9100    N/A     Ethernet4           trunk      up       up                            SFP/SFP+/SFP28         off
 Ethernet4      13,14,15,16      40G   9100    N/A   Ethernet6/1           trunk      up       up  QSFP+ or later with SFF-8636 or SFF-8436         off
it cause two issue:

caused using wrong test target porfile for qos sai test. as below:

  profileName = ingressLosslessProfile["profileName"]      >>>>> [Xu]: just get profile of first test port, in this function.
  logger.info(
      "Lossless Buffer profile selected is {}".format(profileName))

  if self.isBufferInApplDb(dut_asic):
      profile_pattern = "^BUFFER_PROFILE_TABLE\\:pg_lossless_(.*)_profile$"
  else:
      profile_pattern = "^BUFFER_PROFILE\\|pg_lossless_(.*)_profile"
  m = re.search(profile_pattern, profileName)
  pytest_assert(m.group(1), "Cannot find port speed/cable length")

  # portSpeedCableLength = m.group(1)
  portSpeedCableLength = "40000_300m"     >>>> [Xu]: according to above sample result of test port selection, first port' id is 1 (it's Etherent1), the corresponding PG lossless porfile is "pg_lossless_10000_300m_profile". so we can never get expected pg_lossless_40000_300m_profile profile.
cause qos sai test traffic go through low speed breakout port rather than high speed 40G port
and eventually, caused Xon case failure.

How did you do it?
remove low speed port out of test port list

How did you verify/test it?
pass UT
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.

4 participants