2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-13 14:07:02 +00:00

miniflow: Use 64-bit map.

Signed-off By: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Jarno Rajahalme
2013-11-18 09:28:44 -08:00
parent cc4c738e12
commit 080e28d0f0
3 changed files with 92 additions and 154 deletions

View File

@@ -287,7 +287,7 @@ bool flow_equal_except(const struct flow *a, const struct flow *b,
/* Compressed flow. */
#define MINI_N_INLINE (sizeof(void *) == 4 ? 7 : 8)
#define MINI_N_MAPS DIV_ROUND_UP(FLOW_U32S, 32)
BUILD_ASSERT_DECL(FLOW_U32S <= 64);
/* A sparse representation of a "struct flow".
*
@@ -321,9 +321,9 @@ bool flow_equal_except(const struct flow *a, const struct flow *b,
* same 'map' allows optimization .
*/
struct miniflow {
uint64_t map;
uint32_t *values;
uint32_t inline_values[MINI_N_INLINE];
uint32_t map[MINI_N_MAPS];
};
void miniflow_init(struct miniflow *, const struct flow *);