[ovs-dev] [PATCHv3] datapath: do not use vport type to determine presence of Geneve attributes
Jesse Gross
jesse at nicira.com
Fri Aug 1 17:56:07 UTC 2014
On Tue, Jul 29, 2014 at 5:11 PM, Ansis Atteka <aatteka at nicira.com> wrote:
> diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c
> index e1eadbb..41199ff 100644
> --- a/datapath/flow_netlink.c
> +++ b/datapath/flow_netlink.c
> @@ -1051,10 +1052,7 @@ int ovs_nla_put_flow(struct datapath *dp, const struct sw_flow_key *swkey,
> const struct geneve_opt *opts = NULL;
>
> if (!is_mask) {
> - struct vport *in_port;
> -
> - in_port = ovs_vport_ovsl_rcu(dp, swkey->phy.in_port);
> - if (in_port->ops->type == OVS_VPORT_TYPE_GENEVE)
> + if (swkey->tun_key.tun_flags & TUNNEL_OPTIONS_PRESENT)
> opts = GENEVE_OPTS(output, swkey->tun_opts_len);
> } else {
> if (output->tun_opts_len)
I think we can probably use this logic for both the mask and non-mask
cases, right? TUNNEL_OPTIONS_PRESENT is set in the same cases that the
mask tun_opts_len is set and is probably clearer.
More information about the dev
mailing list