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:24:30 +0000 (13:24 -0700)
commit3440e4bc2f76fdbed6c49116744ded728eebeda1
treea0652485765ef4c181cb0908b592478509e0d1f2
parent09f27436b1fcab822ad358890b0e953b24c4a215
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