On 6 April 2017 at 17:18, Andy Zhou <az...@ovn.org> wrote:
> Upstream commit:
>     openvswitch: Optimize sample action for the clone use cases
>
>     With the introduction of open flow 'clone' action, the OVS user space
>     can now translate the 'clone' action into kernel datapath 'sample'
>     action, with 100% probability, to ensure that the clone semantics,
>     which is that the packet seen by the clone action is the same as the
>     packet seen by the action after clone, is faithfully carried out
>     in the datapath.
>
>     While the sample action in the datpath has the matching semantics,
>     its implementation is only optimized for its original use.
>     Specifically, there are two limitation: First, there is a 3 level of
>     nesting restriction, enforced at the flow downloading time. This
>     limit turns out to be too restrictive for the 'clone' use case.
>     Second, the implementation avoid recursive call only if the sample
>     action list has a single userspace action.
>
>     The main optimization implemented in this series removes the static
>     nesting limit check, instead, implement the run time recursion limit
>     check, and recursion avoidance similar to that of the 'recirc' action.
>     This optimization solve both #1 and #2 issues above.
>
>     One related optimization attempts to avoid copying flow key as
>     long as the actions enclosed does not change the flow key. The
>     detection is performed only once at the flow downloading time.
>
>     Another related optimization is to rewrite the action list
>     at flow downloading time in order to save the fast path from parsing
>     the sample action list in its original form repeatedly.
>
>     Signed-off-by: Andy Zhou <az...@ovn.org>
>     Acked-by: Pravin B Shelar <pshe...@ovn.org>
>     Signed-off-by: David S. Miller <da...@davemloft.net>
>
> Upstream: 798c166173ff ("openvswitch: Optimize sample action for the clone 
> use cases")
> Signed-off-by: Andy Zhou <az...@ovn.org>
> ---
>  datapath/actions.c                                | 112 +++++++++--------
>  datapath/datapath.h                               |   2 -
>  datapath/flow_netlink.c                           | 141 
> +++++++++++++++-------
>  datapath/linux/compat/include/linux/openvswitch.h |  15 +++
>  4 files changed, 172 insertions(+), 98 deletions(-)
>
> diff --git a/datapath/actions.c b/datapath/actions.c
> index f300307b422b..32c0c10e7c62 100644
> --- a/datapath/actions.c
> +++ b/datapath/actions.c
> @@ -43,6 +43,11 @@
>  #include "gso.h"
>  #include "vport.h"
>
> +/* U32_MAX was introduced in include/linux/kernel.h after version 3.14. */
> +#ifndef U32_MAX
> +#define U32_MAX                ((u32)~0U)
> +#endif
> +

I think this hunk should belong in the compat code. We already have
datapath/linux/compat/include/linux/kernel.h, so it can go there.

Other than that:

Acked-by: Joe Stringer <j...@ovn.org>
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to