lib/flow: Simplify miniflow accessors, add ipv6 support.
authorJarno Rajahalme <jrajahalme@nicira.com>
Tue, 29 Apr 2014 22:50:38 +0000 (15:50 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Tue, 29 Apr 2014 22:50:38 +0000 (15:50 -0700)
commit28a560d97a8b6882e7dfd4df2e52806dba4fd0e5
tree27ccd0f43e3fdad375c6d91a550f67b9c8d07dc7
parent003ce655b7116d18c86a74c50391e54990346931
lib/flow: Simplify miniflow accessors, add ipv6 support.

Add new macro MINIFLOW_MAP(FIELD) that returns the map covering the
given struct flow field.

Change the miniflow accessors to macros so that they can take the
field name directly.

Use these to add ipv6 support to miniflow_hash_5tuple().

Add ipv6 support to flow_hash_5tuple() as well so that these two
functions continue to return the same hash value for the corresponding
flows.

Also, simplify miniflow_get_metadata().

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/flow.c
lib/flow.h
tests/test-classifier.c