On Fri, Sep 23, 2011 at 5:17 PM, Ben Pfaff <[email protected]> wrote:
> OFP_VLAN_NONE used to be convenient as a value for struct dst's 'vlan'
> member, because it ended up being used in actions anyway, but now it's
> much better to just use 0.
> ---
>  ofproto/ofproto-dpif.c |   55 ++++++++++++++++++-----------------------------
>  1 files changed, 21 insertions(+), 34 deletions(-)
>
> diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> index ec5e3be..0459e96 100644
> --- a/ofproto/ofproto-dpif.c
> +++ b/ofproto/ofproto-dpif.c
> @@ -2281,12 +2281,6 @@ facet_install(struct ofproto_dpif *p, struct facet 
> *facet, bool zero_stats)
>     }
>  }
>
> -static int
> -vlan_tci_to_openflow_vlan(ovs_be16 vlan_tci)
> -{
> -    return vlan_tci != htons(0) ? vlan_tci_to_vid(vlan_tci) : OFP_VLAN_NONE;
> -}
> -
>  static void
>  facet_account(struct ofproto_dpif *ofproto, struct facet *facet)
>  {
> @@ -2331,7 +2325,7 @@ facet_account(struct ofproto_dpif *ofproto, struct 
> facet *facet)
>             port = get_odp_port(ofproto, nl_attr_get_u32(a));
>             if (port && port->bundle && port->bundle->bond) {
>                 bond_account(port->bundle->bond, &facet->flow,
> -                             vlan_tci_to_openflow_vlan(vlan_tci), n_bytes);
> +                             vlan_tci_to_vid(vlan_tci), n_bytes);
>             }
>             break;
>
> @@ -3220,7 +3214,7 @@ xlate_autopath(struct action_xlate_ctx *ctx,
>     } else if (port->bundle->bond) {
>         /* Autopath does not support VLAN hashing. */
>         struct ofport_dpif *slave = bond_choose_output_slave(
> -            port->bundle->bond, &ctx->flow, OFP_VLAN_NONE, &ctx->tags);
> +            port->bundle->bond, &ctx->flow, 0, &ctx->tags);

I am not sure what is expected type for vlan-id in bonding code, but
atleast bond_unixctl_hash() is still using OFP_VLAN_NONE to generate
bond hash. which is looking inconsistent.

Thanks,
Pravin.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to