classifier: Change type used for priorities from 'unsigned int' to 'int'.
authorBen Pfaff <blp@nicira.com>
Thu, 30 Oct 2014 18:40:07 +0000 (11:40 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 31 Oct 2014 00:42:58 +0000 (17:42 -0700)
commiteb391b76aff9639547312ab93bdac9cc2e76c119
tree74def014a95802688c356056eb00209d96e0e68d
parentfa373af463a1421a1b55539911abf33a847bc9b1
classifier: Change type used for priorities from 'unsigned int' to 'int'.

OpenFlow has priorities in the 16-bit unsigned range, from 0 to 65535.
In the classifier, it is sometimes useful to be able to have values below
and above this range.  With the 'unsigned int' type used for priorities
until now, there were no values below the range, so some code worked
around it by converting priorities to 64-bit signed integers.  This didn't
seem so great to me given that a plain 'int' also had the needed range.
This commit therefore changes the type used for priorities to int.

The interesting parts of this change are in pvector.h and classifier.c,
where one can see the elimination of the use of int64_t.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
13 files changed:
lib/classifier-private.h
lib/classifier.c
lib/classifier.h
lib/match.c
lib/match.h
lib/ofp-util.h
lib/pvector.c
lib/pvector.h
ofproto/in-band.c
ofproto/ofproto-provider.h
ofproto/ofproto.c
tests/test-classifier.c
utilities/ovs-ofctl.c