-
Notifications
You must be signed in to change notification settings - Fork 270
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
base: master
Are you sure you want to change the base?
[vslib] SAI_KEY_VS_OPER_SPEED_IS_CONFIGURED_SPEED, SAI_PORT_ATTR_HOST_TX_READY_STATUS support #1458
Conversation
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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed name looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
0d8489c
to
5108c19
Compare
Signed-off-by: Wataru Ishida <wataru.ishid@gmail.com>
Signed-off-by: Wataru Ishida <wataru.ishid@gmail.com>
5108c19
to
75fcfc2
Compare
This PR adds two features to
vslib
.SAI_KEY_VS_OPER_SPEED_IS_CONFIGURED_SPEED
: whentrue
,SAI_PORT_ATTR_SPEED
returns the configured speed instead of the value retrieved via/sys/class/net/<name>/speed
.SAI_PORT_ATTR_HOST_TX_READY_STATUS
: always returnstrue
. Required to support runningxcvrd
in the VS env.