[ovs-dev] [bug 7759 05/11] dpif-linux: Use get_32aligned_u64() in an appropriate place.
Jesse Gross
jesse at nicira.com
Tue Oct 11 18:08:26 UTC 2011
On Wed, Oct 5, 2011 at 11:27 AM, Ben Pfaff <blp at nicira.com> wrote:
> ---
> lib/dpif-linux.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c
> index 4ddd464..79e84d6 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.
This looks good. However, when reviewing this I noticed that we seem
to access vport stats in an unsafe manner since they are also 64-bit
stats aligned on 32-bit boundaries.
More information about the dev
mailing list