[ovs-discuss] The format of flow entry counter

星言 墨虚 beyond1680 at yahoo.cn
Thu May 24 05:49:35 UTC 2012

Hi all,

Sorry to bother you.

I want to use NOX to collect the flow stats. So I try to use ofp_flow_stats_request and flow_stats_in event to do it.

When I receive the event of flow_stats_in, I print the stats like bytes to screen. But there is a problem that it shows

wrong value in screen. I read the code of openvswitch, it use a strange format to store bytes of flow entry counter

which name is  ovs_32aligned_u64 in include/openvswitch/type.h.

typedef struct {
uint32_t hi, lo;
uint32_t lo, hi;
} ovs_32aligned_u64;

I use printf("%lld", flow.bytes) to output this format, but it is wrong in screen. And if I change lld to PRIx64, it is wrong too.

So I want to know how to output this format to decimal in screen?

Thanks very much.

-- Tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20120524/b8b14a8d/attachment.html>

More information about the discuss mailing list