[ovs-dev] [PATCH] bridge: Eject NORMAL flows from datapath after bridge flush.

reid at nicira.com reid at nicira.com
Thu Oct 22 01:19:35 UTC 2009


Would you mind clarifying the commit message a little?  I feel like:
"This means that existing flows can continue as is but flooding packets
because we don't learn the MAC addresses as the flows never come to
userspace."
is missing a word or two after 'flooding packets'.
  -Reid

On Wed, 21 Oct 2009 17:48:55 -0700, Jesse Gross <jesse at nicira.com> wrote:
> During a bridge flush we clear the learning table and revalidate all
> flows.  When revalidating NORMAL flows we consult the empty learning
> table and install flows that flood packets.  This means that existing
> flows can continue as is but flooding packets because we don't learn
> the MAC addresses as the flows never come to userspace.  The problem
> is worse with bonding because we can receive one of the flooded
> packets back on a bond slave and learn that port, causing us to send
> traffic to the wrong location.
> ---
>  vswitchd/bridge.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
> index fda80f1..446ddfc 100644
> --- a/vswitchd/bridge.c
> +++ b/vswitchd/bridge.c
> @@ -1813,6 +1813,13 @@ process_flow(struct bridge *br, const flow_t
*flow,
>      struct port *out_port = NULL; /* By default, drop the packet/flow.
*/
>      int vlan;
> 
> +    /* If we are in the process of revalidating flows due to a flush
then
> +     * eject the flow.  We just cleared our learning table and as a
> result
> +     * will only install flows that flood packets. */
> +    if (!packet && br->flush) {
> +        return false;
> +    }
> +
>      /* Find the interface and port structure for the received packet. */
>      in_iface = iface_from_dp_ifidx(br, flow->in_port);
>      if (!in_iface) {
> --
> 1.6.0.4
> 
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org





More information about the dev mailing list