> On Jan 19, 2017, at 11:07 PM, Andy Zhou <az...@ovn.org> wrote:
> 
> When ofproto probe for datapath features, no packets should actually
> be sent to the network. This pactch fixes the userspace by dropping
> probe packets before action execution.
> 
> Signed-off-by: Andy Zhou <az...@ovn.org>
> ---
> lib/dpif-netdev.c | 7 +++++++
> 1 file changed, 7 insertions(+)
> 
> diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
> index 3901129..9c21af3 100644
> --- a/lib/dpif-netdev.c
> +++ b/lib/dpif-netdev.c
> @@ -2660,6 +2660,13 @@ dpif_netdev_execute(struct dpif *dpif, struct 
> dpif_execute *execute)
>         }
>     }
> 
> +    if (execute->probe) {
> +        /* If this is part of a probe, Drop the packet, since executing
> +         * the action may actually cause spurious packets be sent into
> +         * the network. */
> +        return 0;
> +    }
> +

On the linux kernel datapath the execution can also return an error code, so 
the probe may be inconclusive if we do not execute the actions. Have you 
verified this is not the case for the userspace datapath?

This is why I’d rather have the probes not include actions that can have 
visible side effects.

  Jarno

>     /* If the current thread is non-pmd thread, acquires
>      * the 'non_pmd_mutex'. */
>     if (pmd->core_id == NON_PMD_CORE_ID) {
> -- 
> 1.9.1
> 
> _______________________________________________
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to