datapath: Use exact lookup for flow_get and flow_del.
authorAlex Wang <alexw@nicira.com>
Mon, 30 Jun 2014 17:46:59 +0000 (10:46 -0700)
committerAlex Wang <alexw@nicira.com>
Tue, 1 Jul 2014 00:11:21 +0000 (17:11 -0700)
commit3601bd879ac43279338d0a4403174397dbfe2891
tree6f461e9fcdfcfd9375608b8cb3c981c3e3641c7a
parentbc253fd7c6164132bb69e7ac33625eee715a1b59
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