ofproto-dpif-upcall: Pass key to dpif_flow_get().
authorJoe Stringer <joe@ovn.org>
Tue, 10 May 2016 22:42:01 +0000 (15:42 -0700)
committerJoe Stringer <joe@ovn.org>
Wed, 11 May 2016 23:45:46 +0000 (16:45 -0700)
commitaf50de800ecbe86d25b123971606e31653605108
tree46e25a3e8f6cea8185d333972a9222198cafa5c8
parentb351ac0c9bc270b3fff07ae8c7434c53d59b132c
ofproto-dpif-upcall: Pass key to dpif_flow_get().

Windows datapath folks have reported instances where OVS userspace will
pass down a flow_get request to the datapath using a UFID even though the
datapath has no support for UFIDs. Since commit e672ff9b4d22
("ofproto-dpif: Restore metadata and registers on recirculation."), if a
flow dump provides a flow that userspace isn't aware of, and the flow
dump doesn't provide actions for that flow, then userspace will attempt
a flow_get using just the UFID. This is because the ofproto-dpif layer
doesn't pass the key down to the dpif layer even if it's available.
Prior to the above commit, the codepath was only hit if the key was not
available, which would have implied UFID support. This assumption is now
broken: An empty set of actions could also trigger flow_get, and
datapaths without UFID support are free to pass up empty actions lists.

Pass down the flow key if available, and don't pass down the UFID if
unavailable to be more consistent with the usage of other dpif APIs
within this file.

Fixes: e672ff9b4d22 ("ofproto-dpif: Restore metadata and registers on recirculation.")
Reported-by: Sairam Venugopal <vsairam@vmware.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Jarno Rajahalme <jarno@ovn.org>
ofproto/ofproto-dpif-upcall.c