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

[vslib] SAI_KEY_VS_OPER_SPEED_IS_CONFIGURED_SPEED, SAI_PORT_ATTR_HOST_TX_READY_STATUS support #1458

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ishidawataru
Copy link
Contributor

This PR adds two features to vslib.

vslib/saivs.h Outdated
*
* By default this flag is set to false.
*/
#define SAI_KEY_VS_OPER_SPEED_IS_CONFIGURED_SPEED "SAI_VS_OPER_SPEED_IS_CONFIGURED_SPEED"
Copy link
Collaborator

Choose a reason for hiding this comment

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

this name is a little bit confusing, it suggest that this is a question or value to read and not an config value

why we need this actually ?

also does this only applies when tap device is in use?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this name is a little bit confusing,

How about SAI_KEY_VS_USE_CONFIGURED_SPEED_AS_OPER_SPEED?

why we need this actually ?

I'm testing DPB on the VS environment.
To check that DPB is working as expected, it'd be nice to see the show interface status command shows the expected interface speed.

admin@sonic:~$ show interface status
  Interface    Lanes    Speed    MTU    FEC    Alias    Vlan    Oper    Admin                                             Type    Asym PFC
-----------  -------  -------  -----  -----  -------  ------  ------  -------  -----------------------------------------------  ----------
  Ethernet0  1,2,3,4     400G   9100    N/A   Eth0/0  routed    down     down  QSFP-DD Double Density 8X Pluggable Transceiver         N/A
admin@sonic:~$ sudo config interface breakout Ethernet0 "2x200G"
Do you want to Breakout the port, continue? [y/N]: y

Running Breakout Mode : 1x400G 
Target Breakout Mode : 2x200G

Ports to be deleted : 
 {
    "Ethernet0": "400000"
}
Ports to be added : 
 {
    "Ethernet0": "200000",
    "Ethernet2": "200000"
}
Breakout process got successfully completed.
Please note loaded setting will be lost after system reboot. To preserve setting, run `config save`.
admin@sonic:~$ show interface status
  Interface    Lanes    Speed    MTU    FEC    Alias    Vlan    Oper    Admin                                             Type    Asym PFC
-----------  -------  -------  -----  -----  -------  ------  ------  -------  -----------------------------------------------  ----------
  Ethernet0      1,2     200G   9100    N/A   Eth0/0  routed    down     down  QSFP-DD Double Density 8X Pluggable Transceiver         N/A
  Ethernet2      3,4     200G   9100    N/A   Eth0/1  routed    down     down                                              N/A         N/A

also does this only applies when tap device is in use?

I don't think so. SwitchStateBase::refresh_port_oper_speed doesn't care SAI_VS_HOSTIF_USE_TAP_DEVICE configuration.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Changed name looks good

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

vslib/SwitchStateBase.cpp Outdated Show resolved Hide resolved
@ishidawataru ishidawataru force-pushed the vslib-oper-speed-is-configured-speed branch from 0d8489c to 5108c19 Compare November 14, 2024 09:32
Signed-off-by: Wataru Ishida <wataru.ishid@gmail.com>
Signed-off-by: Wataru Ishida <wataru.ishid@gmail.com>
@ishidawataru ishidawataru force-pushed the vslib-oper-speed-is-configured-speed branch from 5108c19 to 75fcfc2 Compare November 14, 2024 09:37
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.

Subinterface doesn't inherit the speed of ancestors on kvm testbed.
2 participants