[ovs-dev] [PATCH 2/4] ofproto-dpif: Handle failed flow 'put's.

Ben Pfaff blp at nicira.com
Thu Jun 20 23:06:46 UTC 2013


On Thu, Jun 20, 2013 at 03:16:43PM -0700, Justin Pettit wrote:
> If a flow cannot be installed in the datapath, we should notice
> this and not treat it as installed.  This becomes an issue with
> megaflows, since a batch of unique flows may come in that generate
> a single new datapath megaflow that covers them.  Since userspace
> doesn't know whether the datapath supports megaflows, each unique
> flow will get a separate flow entry (which overlap when masks are
> applied) and all except the first will get rejected by a megaflow-
> supporting datapath as duplicates.
> 
> Signed-off-by: Justin Pettit <jpettit at nicira.com>

The following is a little worrisome because EINVAL is very generic and
can indicate many kinds of errors.  If we always suppress logging
EINVAL, then we could miss important problems.  I am surprised that we
do not use EEXIST or another error that is less overloaded:
> +    /* If flows arrive in a batch, userspace may push down multiple
> +     * unique flow definitions that overlap when wildcards are applied.
> +     * Kernels that support flow wildcarding will reject these flows as
> +     * duplicates (EINVAL), so lower the log level to debug for these
> +     * types of messages. */
> +    return (error && error != EINVAL) ? VLL_WARN : VLL_DBG;



More information about the dev mailing list