datapath: Use exact lookup for flow_get and flow_del.
authorAlex Wang <alexw@nicira.com>
Mon, 30 Jun 2014 21:51:02 +0000 (14:51 -0700)
committerAlex Wang <alexw@nicira.com>
Tue, 1 Jul 2014 20:25:29 +0000 (13:25 -0700)
commit5a8750ef98d4793a680102af13e863d3b58fd45b
tree8aa331f040a7f0aeb571d9fcb7bd357643bbf390
parent80a7d673e610508c66103fb7f5174a93dc8b4df9
datapath: Use exact lookup for flow_get and flow_del.

Due to the race condition in userspace, there is chance that two
overlapping megaflows could be installed in datapath.  And this
causes userspace unable to delete the less inclusive megaflow flow
even after it timeout, since the flow_del logic will stop at the
first match of masked flow.

This commit fixes the bug by making the kernel flow_del and flow_get
logic check all masks in that case.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
datapath/datapath.c
datapath/flow_table.c
datapath/flow_table.h