Weitao,

> I noticed that in interface.api.
> 
> manual_print manual_endian define vnet_interface_combined_counters
> {
>   /* enums - plural - in vnet/interface.h */
>   u8 vnet_counter_type;
>   u32 first_sw_if_index;
>   u32 count;
>   vl_api_vlib_counter_t data[count];
> };
> 
> 
> Should vl_api_vlib_counter_t be u64? Is that right?

interface.api:
typeonly manual_print manual_endian define vlib_counter
{
  u64 packets;                  /**< packet counter */
  u64 bytes;                    /**< byte counter  */
};

Cheers,
Ole


> 2017-06-13 18:56 GMT+08:00 <otr...@employees.org>:
> Hi again,
> 
> > I tried the method you told me, but the data that I got is '\x00'.
> >
> > Like this, vnet_interface_counters(_0=49, vnet_counter_type=1, 
> > is_combined=1, first_sw_if_index=0, count=7, 
> > data='\x00\x00\x00\x00\x00\x00\x00')
> >
> > I don't why this happened.
> 
> Ah, yes sorry. Forgot to tell you that it was broken prior to below commit.
> 
> You need:
> 
> commit ee551988bcce08ad7a15f71fb9d2239b4239ab08
> Author: Aloys Augustin <aloys.augus...@polytechnique.org>
> Date:   Fri Feb 17 14:55:29 2017 +0100
> 
>     Fix vnet_interface_counters API definition
> 
>     The api specification had u8 as data type, which caused the python
>     binding to fail.
>     Fixes VPP-642
> 
>     Change-Id: I9ba97959740d44c8f4a12db9356d0d1bcd709a73
>     Signed-off-by: Aloys Augustin <aloys.augus...@polytechnique.org>
>     Signed-off-by: Ole Troan <o...@cisco.com>
> 
> 
> And that changes vnet_interface_counters to a simple and a combined counters 
> version.
> 
> Sorry, for trickle feeding you information, my brain trashed in the middle of 
> the context switch. ;-)
> 
> Feel free to put something on the wiki as you go along.
> 
> Best regards,
> Ole
> 

Attachment: signature.asc
Description: Message signed with OpenPGP

_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to