Hi VPP-devs,
I was recently testing interface dump and I noticed that it returns weird value
for link_speed. I tested both Java API and Python API for VPP together with
console output.
When I called sudo vppctl sh hardware in console I get:
Name Idx Link Hardware
GigabitEthernet0/9/0 1 down GigabitEthernet0/9/0
Link speed: 1 Gbps
Ethernet address 08:00:27:04:6e:c0
...
Which says that link speed is 1Gbps. When I try this using Java API or Python
API I get a value of 1078071040.
Part of python script which returns the result:
...
for intf in vpp.api.sw_interface_dump():
print(intf.interface_name.decode() + ", link speed:" + str(intf.link_speed))
...
Output:
local0, link speed:0
GigabitEthernet0/9/0, link speed:1078071040
The provided value should be in kbps according to documentation for API:
define sw_interface_details
...
/* link speed in kbps */
u32 link_speed;
Is this value in bps or kbps? Should it be divided (1Gbps should be 1 000 000
000bps) and rounded? Or is this a bug?
Thanks Michal
[https://www.cisco.com/c/dam/m/en_us/signaturetool/images/banners/standard/06_standard_graphic.png]
Michal Cmarada
Engineer - Software
[email protected]<mailto:[email protected]>
Tel:
Cisco Systems, Inc.
Slovakia
cisco.com
[http://www.cisco.com/assets/swa/img/thinkbeforeyouprint.gif]
Think before you print.
This email may contain confidential and privileged material for the sole use of
the intended recipient. Any review, use, distribution or disclosure by others
is strictly prohibited. If you are not the intended recipient (or authorized to
receive for the recipient), please contact the sender by reply email and delete
all copies of this message.
Please click
here<http://www.cisco.com/c/en/us/about/legal/terms-sale-software-license-agreement/company-registration-information.html>
for Company Registration Information.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#11330): https://lists.fd.io/g/vpp-dev/message/11330
Mute This Topic: https://lists.fd.io/mt/28266097/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-