[ovs-git] [openvswitch/ovs] 4ed471: util: Generalize rightmost_1bit_idx(), leftmost_1b...

GitHub noreply at github.com
Wed Sep 30 06:10:40 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 4ed471445ebbf2734be5cc99137c36335c079b6c
      https://github.com/openvswitch/ovs/commit/4ed471445ebbf2734be5cc99137c36335c079b6c
  Author: Ben Pfaff <blp at nicira.com>
  Date:   2015-09-29 (Tue, 29 Sep 2015)

  Changed paths:
    M lib/util.h

  Log Message:
  -----------
  util: Generalize rightmost_1bit_idx(), leftmost_1bit_idx().

These functions could only work with 32-bit integers because of their
special cases for an argument of value 0.  However, none of the existing
users depended on this special case, and some of the users did try to use
these functions with 64-bit integer arguments.  Thus, this commit changes
them to support 64-bit integer arguments and drops the special cases for
zero.

This fixes a latent bug that applied rightmost_1bit_idx() to an ofpact
bitmap, which only becomes visible when an OFPACT_* with value greater than
32 is included in the bitmap.

Reported-by: Kyle Upton <kupton at baymicrosystems.com>
Reported-at: http://openvswitch.org/pipermail/dev/2015-September/060128.html
Signed-off-by: Ben Pfaff <blp at nicira.com>




More information about the git mailing list