2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

bitmap: Convert single bitmap functions to 64-bit.

Currently the functions to set, clear, and iterate over bitmaps
only operate over 32 bit values. If we convert them to handle
64 bit bitmaps, they can be used in more places.

Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Jesse Gross
2015-06-25 09:18:38 -07:00
parent 099772c025
commit 3ee6026aba
4 changed files with 15 additions and 15 deletions

View File

@@ -3916,14 +3916,14 @@ dpcls_lookup(const struct dpcls *cls, const struct netdev_flow_key keys[],
}
/* Compute hashes for the remaining keys. */
ULONG_FOR_EACH_1(i, map) {
ULLONG_FOR_EACH_1(i, map) {
hashes[i] = netdev_flow_key_hash_in_mask(&mkeys[i],
&subtable->mask);
}
/* Lookup. */
map = cmap_find_batch(&subtable->rules, map, hashes, nodes);
/* Check results. */
ULONG_FOR_EACH_1(i, map) {
ULLONG_FOR_EACH_1(i, map) {
struct dpcls_rule *rule;
CMAP_NODE_FOR_EACH (rule, cmap_node, nodes[i]) {
@@ -3932,7 +3932,7 @@ dpcls_lookup(const struct dpcls *cls, const struct netdev_flow_key keys[],
goto next;
}
}
ULONG_SET0(map, i); /* Did not match. */
ULLONG_SET0(map, i); /* Did not match. */
next:
; /* Keep Sparse happy. */
}