Hi, Yes it helped now it returns the value in kbps.
Thanks Michal Cmarada Engineer - Software mcmar...@cisco.com Tel: Cisco Systems, Inc. Slovakia cisco.com 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. http://www.cisco.com/c/en/us/about/legal/terms-sale-software-license-agreement/company-registration-information.html -----Original Message----- From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Ole Troan Sent: Tuesday, November 20, 2018 11:05 AM To: Michal Cmarada -X (mcmarada - PANTHEON TECHNOLOGIES at Cisco) <mcmar...@cisco.com> Cc: vpp-dev@lists.fd.io Subject: Re: [vpp-dev] Interface dump - link speed value Michal, At least one bug. Can you verify if https://gerrit.fd.io/r/16046 Fixes your problem? Best regards, Ole > On 20 Nov 2018, at 10:58, Michal Cmarada via Lists.Fd.Io > <mcmarada=cisco....@lists.fd.io> wrote: > > 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 > > > > > <image001.png> > Michal Cmarada > Engineer - Software > mcmar...@cisco.com > Tel: > > > > > Cisco Systems, Inc. > > > > Slovakia > cisco.com > <image002.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 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/675193 > Group Owner: vpp-dev+ow...@lists.fd.io > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub > [otr...@employees.org] > -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11333): https://lists.fd.io/g/vpp-dev/message/11333 Mute This Topic: https://lists.fd.io/mt/28266097/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-