[ovs-dev] [PATCH] datapath: do not add Geneve attributes if vport does not exist

Jesse Gross jesse at nicira.com
Tue Jul 22 16:34:18 UTC 2014


On Mon, Jul 21, 2014 at 5:11 PM, Ansis Atteka <aatteka at nicira.com> wrote:
> On Thu, Jul 17, 2014 at 4:08 PM, Jesse Gross <jesse at nicira.com> wrote:
>> One thing that I worry about is that this has the possibility to
>> change how the flow is reported - before the flow deletion it has
>> Geneve options but immediately after the flow still exists but without
>> options. OVS will likely deal with this but it doesn't seem like a
>> great thing.
> I talked with Pravin on how to solve this "flow changing while vport
> gets added" issue and he seemed to prefer the idea where we simply
> look into tun_opts_len to figure out whether to append Geneve
> attributes.
>
> Basically, the new patch makes assumption that if tun_opts_len>0 then
> that is Geneve port that could potentially have Geneve options. Also,
> I remember you mentioning that it might be good to distinguish between
> the case when there are no tunnel options at all and the case when
> Geneve attributes contain an empty set. Patch v2 does not address
> that. How important is that in your opinion?

The biggest concern that I have is if there is a flow that matches on
Geneve packets without any options. If we it changed to look at
tun_opts_len only, when the upcall goes to userspace there would be no
OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS. Userspace would generally like to
just echo the key back, so that means that we would have a mask
without a key since it needs to specify a mask to match.

This is currently allowed but not really ideal - we have this already
for some existing netlink attributes like the overall
OVS_KEY_ATTR_TUNNEL but it's been a source of bugs and special casing.
The other choice is that we force userspace to insert the key even if
the kernel didn't provide it for Geneve flows but that's somewhat
complicated.

One other possible solution is to tuck a bit into the flow to
differentiate between the cases of an empty option set and no options
but I was somewhat hoping to avoid that.



More information about the dev mailing list