aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-10-04 15:25:14 -0700
committerBen Pfaff <blp@nicira.com>2011-10-12 16:23:16 -0700
commit0e70cdcb8ddeb20417e682fd63769f9d16601b07 (patch)
tree7b07663cead5f452d865a9874a577480a26e526e /lib
parent89a1c6d0a5aaa879769a022a71c7cee522013be2 (diff)
dpif-linux: Use get_32aligned_u64() in an appropriate place.
Diffstat (limited to 'lib')
-rw-r--r--lib/dpif-linux.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c
index 0f188c65..98c4682a 100644
--- a/lib/dpif-linux.c
+++ b/lib/dpif-linux.c
@@ -102,9 +102,9 @@ struct dpif_linux_flow {
/* Attributes.
*
- * The 'stats' and 'used' members point to 64-bit data that might only be
- * aligned on 32-bit boundaries, so get_unaligned_u64() should be used to
- * access their values.
+ * The 'stats' member points to 64-bit data that might only be aligned on
+ * 32-bit boundaries, so get_unaligned_u64() should be used to access its
+ * values.
*
* If 'actions' is nonnull then OVS_FLOW_ATTR_ACTIONS will be included in
* the Netlink version of the command, even if actions_len is zero. */
@@ -115,7 +115,7 @@ struct dpif_linux_flow {
const uint32_t *upcall_pid; /* OVS_FLOW_ATTR_UPCALL_PID. */
const struct ovs_flow_stats *stats; /* OVS_FLOW_ATTR_STATS. */
const uint8_t *tcp_flags; /* OVS_FLOW_ATTR_TCP_FLAGS. */
- const uint64_t *used; /* OVS_FLOW_ATTR_USED. */
+ const ovs_32aligned_u64 *used; /* OVS_FLOW_ATTR_USED. */
bool clear; /* OVS_FLOW_ATTR_CLEAR. */
};
@@ -1764,7 +1764,7 @@ dpif_linux_flow_get_stats(const struct dpif_linux_flow *flow,
stats->n_packets = 0;
stats->n_bytes = 0;
}
- stats->used = flow->used ? get_unaligned_u64(flow->used) : 0;
+ stats->used = flow->used ? get_32aligned_u64(flow->used) : 0;
stats->tcp_flags = flow->tcp_flags ? *flow->tcp_flags : 0;
}