2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

dpif: Eliminate "struct odp_flow_stats" from client-visible interface.

Following this commit, "struct odp_flow_stats" is only used in
Linux-specific parts of OVS userspace code.  This allows the actual Linux
datapath interface to evolve more freely.

Reviewed by Justin Pettit.
This commit is contained in:
Ben Pfaff
2011-01-26 07:11:50 -08:00
parent feebdea2e5
commit c97fb13280
11 changed files with 92 additions and 77 deletions

View File

@@ -177,20 +177,6 @@ format_odp_actions(struct ds *ds, const struct nlattr *actions,
ds_put_cstr(ds, "drop");
}
}
void
format_odp_flow_stats(struct ds *ds, const struct odp_flow_stats *s)
{
ds_put_format(ds, "packets:%llu, bytes:%llu, used:",
(unsigned long long int) s->n_packets,
(unsigned long long int) s->n_bytes);
if (s->used_sec) {
long long int used = s->used_sec * 1000 + s->used_nsec / 1000000;
ds_put_format(ds, "%.3fs", (time_msec() - used) / 1000.0);
} else {
ds_put_format(ds, "never");
}
}
/* Returns the correct length of the payload for a flow key attribute of the
* specified 'type', or -1 if 'type' is unknown. */