linux-stable/net/openvswitch
Simon Horman 651887b0c2 openvswitch: Sample action without side effects
The sample action is rather generic, allowing arbitrary actions to be
executed based on a probability. However its use, within the Open
vSwitch
code-base is limited: only a single user-space action is ever nested.

A consequence of the current implementation of sample actions is that
depending on weather the sample action executed (due to its probability)
any side-effects of nested actions may or may not be present before
executing subsequent actions.  This has the potential to complicate
verification of valid actions by the (kernel) datapath. And indeed
adding support for push and pop MPLS actions inside sample actions
is one case where such case.

In order to allow all supported actions to be continue to be nested
inside sample actions without the potential need for complex
verification code this patch changes the implementation of the sample
action in the kernel datapath so that sample actions are more like
a function call and any side effects of nested actions are not
present when executing subsequent actions.

With the above in mind the motivation for this change is twofold:

* To contain side-effects the sample action in the hope of making it
  easier to deal with in the future and;
* To avoid some rather complex verification code introduced in the MPLS
  datapath patch.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
2014-07-24 09:37:21 -07:00
..
actions.c openvswitch: Sample action without side effects 2014-07-24 09:37:21 -07:00
datapath.c openvswitch: Avoid memory corruption in queue_userspace_packet() 2014-07-24 09:37:20 -07:00
datapath.h openvswitch: Use net_ratelimit in OVS_NLERR 2014-05-16 13:40:28 -07:00
dp_notify.c genetlink: make multicast groups const, prevent abuse 2013-11-19 16:39:06 -05:00
flow.c openvswitch: Fix tracking of flags seen in TCP flows. 2014-06-29 14:10:51 -07:00
flow.h openvswitch: Fix tracking of flags seen in TCP flows. 2014-06-29 14:10:51 -07:00
flow_netlink.c openvswitch: Compact sw_flow_key. 2014-05-22 16:27:34 -07:00
flow_netlink.h openvswitch: Remove 5-tuple optimization. 2014-05-16 13:40:29 -07:00
flow_table.c openvswitch: Use exact lookup for flow_get and flow_del. 2014-06-30 20:47:15 -07:00
flow_table.h openvswitch: Use exact lookup for flow_get and flow_del. 2014-06-30 20:47:15 -07:00
Kconfig openvswitch: Add SCTP support 2013-08-26 14:03:13 -07:00
Makefile openvswitch: Restructure datapath.c and flow.c 2013-10-03 18:16:47 -07:00
vport-gre.c openvswitch: supply a dummy err_handler of gre_cisco_protocol to prevent kernel crash 2014-06-29 14:10:48 -07:00
vport-internal_dev.c openvswitch: Enable tunnel GSO for OVS bridge. 2014-07-24 01:15:04 -07:00
vport-internal_dev.h openvswitch: introduce rtnl ops stub 2014-07-01 14:40:17 -07:00
vport-netdev.c openvswitch: fix vport-netdev unregister 2013-10-16 14:50:22 -07:00
vport-netdev.h openvswitch: fix vport-netdev unregister 2013-10-16 14:50:22 -07:00
vport-vxlan.c vxlan: Call udp_flow_src_port 2014-07-07 21:14:21 -07:00
vport.c openvswitch: Allow each vport to have an array of 'port_id's. 2014-07-24 01:15:04 -07:00
vport.h openvswitch: Allow each vport to have an array of 'port_id's. 2014-07-24 01:15:04 -07:00