Skip to content
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

[DPB] Optional fields not set for child ports after DPB #7578

Open
dmytroxshevchuk opened this issue May 11, 2021 · 4 comments
Open

[DPB] Optional fields not set for child ports after DPB #7578

dmytroxshevchuk opened this issue May 11, 2021 · 4 comments

Comments

@dmytroxshevchuk
Copy link
Contributor

dmytroxshevchuk commented May 11, 2021

Description

Dynamic Port Breakout does not work properly because of new port configuration is not consist optional fields for that port.
For example if we have installed fec field for parent port, than after DPB fec will not be set for child ports.

Steps to reproduce the issue:

  1. Add any optional field to hwsku.json, for example it can be "fec": "rs"
  2. Generate and apply config_db.json using hwsku.json and platform.json
  3. Perform show interface status command and take a look that the fec is filled in the correct value rs
  Interface            Lanes    Speed    MTU    FEC        Alias    Vlan    Oper    Admin             Type    Asym PFC
-----------  ---------------  -------  -----  -----  -----------  ------  ------  -------  ---------------  ----------
  Ethernet0          0,1,2,3     100G   9100     rs    Ethernet0  routed      up       up  QSFP28 or later         N/A
  Ethernet4          4,5,6,7     100G   9100     rs    Ethernet4  routed      up       up  QSFP28 or later         N/A
  1. Perform DBP, e.g. sudo config interface breakout Ethernet0 2x50G -f for split single interface Ethernet0 into 2 interfaces Ethernet0 and Ethernet2
  2. Check result using show interface status command and take a look that the fec field is filled as N/A for Ethernet0 and Ethernet2 interfaces
  Interface            Lanes    Speed    MTU    FEC        Alias    Vlan    Oper    Admin             Type    Asym PFC
-----------  ---------------  -------  -----  -----  -----------  ------  ------  -------  ---------------  ----------
  Ethernet0              0,1      50G   9100    N/A    Ethernet0  routed    down       up  QSFP28 or later         N/A
  Ethernet2              2,3      50G   9100    N/A    Ethernet2  routed    down       up              N/A         N/A
  Ethernet4          4,5,6,7     100G   9100     rs    Ethernet4  routed      up       up  QSFP28 or later         N/A
  1. Perform DPB again, e.g. sudo config interface breakout Ethernet0 1x100G -f for unite 2 interfaces Ethernet0 and Ethernet2 into single interface Ethernet0
  2. Perform show interface status command and take a look that the fec field still in N/A state for Ethernet0
  Interface            Lanes    Speed    MTU    FEC        Alias    Vlan    Oper    Admin             Type    Asym PFC
-----------  ---------------  -------  -----  -----  -----------  ------  ------  -------  ---------------  ----------
  Ethernet0          0,1,2,3     100G   9100    N/A    Ethernet0  routed    down       up  QSFP28 or later         N/A
  Ethernet4          4,5,6,7     100G   9100     rs    Ethernet4  routed      up       up  QSFP28 or later         N/A
  1. Compare Ethernet0/fec field in step 3 (before DPB flow) and in step 8 (after DPB flow)

Describe the results you received:

Default configuration of ports after apply config_db.json generated using platform.json, hwsku.json:

  Interface            Lanes    Speed    MTU    FEC        Alias    Vlan    Oper    Admin             Type    Asym PFC
-----------  ---------------  -------  -----  -----  -----------  ------  ------  -------  ---------------  ----------
  Ethernet0          0,1,2,3     100G   9100     rs    Ethernet0  routed      up       up  QSFP28 or later         N/A
  Ethernet4          4,5,6,7     100G   9100     rs    Ethernet4  routed      up       up  QSFP28 or later         N/A

After first execution of DPB using sudo config interface breakout Ethernet0 2x50G -f

  Interface            Lanes    Speed    MTU    FEC        Alias    Vlan    Oper    Admin             Type    Asym PFC
-----------  ---------------  -------  -----  -----  -----------  ------  ------  -------  ---------------  ----------
  Ethernet0              0,1      50G   9100    N/A    Ethernet0  routed    down       up  QSFP28 or later         N/A
  Ethernet2              2,3      50G   9100    N/A    Ethernet2  routed    down       up              N/A         N/A
  Ethernet4          4,5,6,7     100G   9100     rs    Ethernet4  routed      up       up  QSFP28 or later         N/A

After second execution of DBP using sudo config interface breakout Ethernet0 1x100G[40G] -f

  Interface            Lanes    Speed    MTU    FEC        Alias    Vlan    Oper    Admin             Type    Asym PFC
-----------  ---------------  -------  -----  -----  -----------  ------  ------  -------  ---------------  ----------
  Ethernet0          0,1,2,3     100G   9100    N/A    Ethernet0  routed    down       up  QSFP28 or later         N/A
  Ethernet4          4,5,6,7     100G   9100     rs    Ethernet4  routed      up       up  QSFP28 or later         N/A

Describe the results you expected:

Default configuration of ports after apply config_db.json generated using platform.json, hwsku.json:

  Interface            Lanes    Speed    MTU    FEC        Alias    Vlan    Oper    Admin             Type    Asym PFC
-----------  ---------------  -------  -----  -----  -----------  ------  ------  -------  ---------------  ----------
  Ethernet0          0,1,2,3     100G   9100     rs    Ethernet0  routed      up       up  QSFP28 or later         N/A
  Ethernet4          4,5,6,7     100G   9100     rs    Ethernet4  routed      up       up  QSFP28 or later         N/A

After first execution of DPB using sudo config interface breakout Ethernet0 2x50G -f:

  Interface            Lanes    Speed    MTU    FEC        Alias    Vlan    Oper    Admin             Type    Asym PFC
-----------  ---------------  -------  -----  -----  -----------  ------  ------  -------  ---------------  ----------
  Ethernet0              0,1      50G   9100     rs    Ethernet0  routed    down       up  QSFP28 or later         N/A
  Ethernet2              2,3      50G   9100     rs    Ethernet2  routed    down       up              N/A         N/A
  Ethernet4          4,5,6,7     100G   9100     rs    Ethernet4  routed      up       up  QSFP28 or later         N/A

After second execution of DPB using sudo config interface breakout Ethernet0 1x100G[40G] -f:

  Interface            Lanes    Speed    MTU    FEC        Alias    Vlan    Oper    Admin             Type    Asym PFC
-----------  ---------------  -------  -----  -----  -----------  ------  ------  -------  ---------------  ----------
  Ethernet0          0,1,2,3     100G   9100     rs    Ethernet0  routed      up       up  QSFP28 or later         N/A
  Ethernet4          4,5,6,7     100G   9100     rs    Ethernet4  routed      up       up  QSFP28 or later         N/A

Configurations

hwsku.json:

{
    "interfaces": {
        "Ethernet0": {
            "default_brkout_mode": "1x100G[40G]",
            "autoneg": "off",
            "fec": "rs"
        },
...

platform.json:

{
    "interfaces": {
        "Ethernet0": {
            "index": "1,1,1,1",
            "lanes": "0,1,2,3",
            "breakout_modes": {
                "1x100G[40G]": ["Ethernet0"],
                "2x50G": ["Ethernet0", "Ethernet2"],
                "4x25G[10G]": ["Ethernet0", "Ethernet1", "Ethernet2", "Ethernet3"]
            }
        },
...

config_db.json:

    "PORT": {
        "Ethernet0": {
            "alias": "Ethernet0",
            "lanes": "0,1,2,3",
            "speed": "100000",
            "index": "1",
            "admin_status": "up",
            "autoneg": "off",
            "fec": "rs",
            "mtu": "9100"
        },

Output of show version:

(paste your output here)

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

@dmytroxshevchuk
Copy link
Contributor Author

dmytroxshevchuk commented May 11, 2021

Please take a look possible way for resolve this issue.
For now I created 2 PRs for resolve that:
#6660
sonic-net/sonic-utilities#1492
For resolve the issue we need merge both PR.

FYI: PR 1492 depends from 6660, so we need merge 6660 after that CI will pass and then we can merge 1492. In any case we can merge 6660 without 1492 and it will work.

@anshuv-mfst
Copy link

@zhenggen-xu - could you please provide input on the issue, thanks.

@zhenggen-xu
Copy link
Collaborator

The child port optional field values were not part of the initial DPB design. If we would like the DPB to take care of setting that automatically, we would need enhance the design to have the breakout-mode mapping to fields/values in platform.json, so we can apply them with our defined values.

Without those fields available, we could use CLI to set the autoneg and fec etc manually. If the CLI is not available, we should add them, not just for DPB but for generic operations too.

@bebeisdog
Copy link

Hello, I would like to ask if there are any results regarding this series of related issues? I noticed that #6660 is still open. After completing DPB, if Fec is not set and passed to the chip vendor, will there be any unexpected issues? Moreover, as speeds continue to increase, should it be mandatory to configure Fec?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants