[ovs-discuss] [PATCH] vswitchd: Avoid output port explosion with mirrors that output to VLANs.

Justin Pettit jpettit at nicira.com
Wed Aug 26 21:00:43 UTC 2009


Seems reasonable.

--Justin


On Aug 24, 2009, at 10:43 AM, Ben Pfaff wrote:

> compose_dsts() was updating the VLAN of packets sent to VLAN mirrors
> before it changed the VLAN value, but of course it's the final VLAN  
> value
> that actually matters.
>
> Thanks to Reid for his good work tracking this one down.
>
> Bug #1898.
> ---
> vswitchd/bridge.c |    6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
> index 7ec774a..3ffa671 100644
> --- a/vswitchd/bridge.c
> +++ b/vswitchd/bridge.c
> @@ -1710,12 +1710,14 @@ compose_dsts(const struct bridge *br, const  
> flow_t *flow, uint16_t vlan,
>                 for (i = 0; i < br->n_ports; i++) {
>                     struct port *port = br->ports[i];
>                     if (port_includes_vlan(port, m->out_vlan)
> -                        && set_dst(dst, flow, in_port, port, tags)
> -                        && !dst_is_duplicate(dsts, dst - dsts, dst))
> +                        && set_dst(dst, flow, in_port, port, tags))
>                     {
>                         if (port->vlan < 0) {
>                             dst->vlan = m->out_vlan;
>                         }
> +                        if (dst_is_duplicate(dsts, dst - dsts,  
> dst)) {
> +                            continue;
> +                        }
>                         if (dst->dp_ifidx == flow->in_port
>                             && dst->vlan == vlan) {
>                             /* Don't send out input port on same  
> VLAN. */
> -- 
> 1.6.3.3
>
>
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org





More information about the discuss mailing list