git://git.onelab.eu
/
sliver-openvswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
89a1c6d
)
dpif-linux: Use get_32aligned_u64() in an appropriate place.
author
Ben Pfaff
<blp@nicira.com>
Tue, 4 Oct 2011 22:25:14 +0000
(15:25 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Wed, 12 Oct 2011 23:23:16 +0000
(16:23 -0700)
lib/dpif-linux.c
patch
|
blob
|
history
diff --git
a/lib/dpif-linux.c
b/lib/dpif-linux.c
index
0f188c6
..
98c4682
100644
(file)
--- a/
lib/dpif-linux.c
+++ b/
lib/dpif-linux.c
@@
-102,9
+102,9
@@
struct dpif_linux_flow {
/* Attributes.
*
/* 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. */
*
* 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 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. */
};
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->n_packets = 0;
stats->n_bytes = 0;
}
- stats->used = flow->used ? get_
un
aligned_u64(flow->used) : 0;
+ stats->used = flow->used ? get_
32
aligned_u64(flow->used) : 0;
stats->tcp_flags = flow->tcp_flags ? *flow->tcp_flags : 0;
}
stats->tcp_flags = flow->tcp_flags ? *flow->tcp_flags : 0;
}