[ovs-dev] [PATCHv3] datapath: do not use vport type to determine presence of Geneve attributes

Ansis Atteka aatteka at nicira.com
Fri Aug 1 21:27:17 UTC 2014


On Fri, Aug 1, 2014 at 10:56 AM, Jesse Gross <jesse at nicira.com> wrote:
> 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.
I sent v4 for that.



More information about the dev mailing list