lib/dpif-netdev: Fix EMC lookup.
authorJarno Rajahalme <jrajahalme@nicira.com>
Sat, 18 Oct 2014 00:03:13 +0000 (17:03 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Sat, 18 Oct 2014 00:03:13 +0000 (17:03 -0700)
commitcaeb4906d4f65fbb7873ee5efaf386b43f7b333d
tree86a207013f1003d1a10f99ae9903235e442bc538
parent10173ceaa9acb3d76688eae5554e2b61a9e7c800
lib/dpif-netdev: Fix EMC lookup.

Patch 0de8783a9 (lib/dpif-netdev: Integrate megaflow classifier.)
broke exact match cache lookup, but it went undetected since there are
no separate stats for EMC.

This patch fixes the problem by changing the struct netdev_flow_key
'len' member to cover only the 'mf' member, not the whole
netdev_flow_key, and ignoring the 'len' field in
netdev_flow_key_equal.  Comparison is still accurate, as the miniflow
'map' field encodes the length in the number of 1-bits, and the map is
included in the comparison.

Reported-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
lib/dpif-netdev.c