On Thu, Dec 13, 2012 at 5:39 AM, Jarno Rajahalme
<jarno.rajaha...@nsn.com> wrote:
>
> On Dec 12, 2012, at 18:23 , ext Jesse Gross wrote:
>> In any case, flags should be converted between userspace and kernel.
>> The same set of flags happen to be defined now with the same values
>> but it shouldn't be assumed that is the case.  In particular, if there
>> are different versions of userspace and kernel then new flags that the
>> other side doesn't know about shouldn't just get carried over.  This
>> can result in not being able to setup flows properly.
>
> Is there a mechanism by which the userspace can detect which flags
> are supported by the kernel module at runtime?

There isn't but all we need here is a mechanism to check whether
userspace understands them.  Here's the situation that I'm worried
about:
 * Flow setup comes from the kernel with new flags.
 * Userspace doesn't understand them and doesn't store them properly.
This could happen if the kernel has a flag in the high 16-bits, for
example.
 * When userspace sets up a flow it thinks that it can replicate the
original kernel flow from the information it has.
 * The kernel flow doesn't match because the flags aren't the same.

So the only piece that we really need is a mechanism to detect whether
we received flags the we don't understand and note that fact (i.e.
return ODP_FIT_TOO_MUCH in odp_flow_key_to_flow()).  The other part,
which isn't strictly required, is that it seems nice to mask out any
flags that we don't understand.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to