datapath: Use exact lookup for flow_get and flow_del.
authorAlex Wang <alexw@nicira.com>
Mon, 30 Jun 2014 20:48:07 +0000 (13:48 -0700)
committerAlex Wang <alexw@nicira.com>
Mon, 30 Jun 2014 23:58:43 +0000 (16:58 -0700)
commit8f037d1f76033d6398282b1fcb825b0d6c170402
tree6d567d7f740b27ac7b4f3d5d6f005ccd13f3260b
parent3604fabbf965139e0064d7beca4dae4dd73f3497
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.c
datapath/flow.h