]> git.baikalelectronics.ru Git - kernel.git/commit
ovs: allow nl 'flow set' to use ufid without flow key
authorSamuel Gauthier <samuel.gauthier@6wind.com>
Thu, 10 Mar 2016 16:14:59 +0000 (17:14 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Mar 2016 02:18:26 +0000 (22:18 -0400)
commitff51483f9d6c28b8e4f337cd4fe334d0ccb3fb0b
tree0c72d65d34a15e8514ac033cc8a798ab7af7e8c8
parent47ce014f6b959c86dd5202173ccd244708deaa42
ovs: allow nl 'flow set' to use ufid without flow key

When we want to change a flow using netlink, we have to identify it to
be able to perform a lookup. Both the flow key and unique flow ID
(ufid) are valid identifiers, but we always have to specify the flow
key in the netlink message. When both attributes are there, the ufid
is used. The flow key is used to validate the actions provided by
the userland.

This commit allows to use the ufid without having to provide the flow
key, as it is already done in the netlink 'flow get' and 'flow del'
path. The flow key remains mandatory when an action is provided.

Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/datapath.c