On Tue, Mar 1, 2011 at 3:39 PM, Valient Gough <vali...@gmail.com> wrote:
>
> While adding support for a tunnel with optional tunnel key, I've found
> problems handling the key configuration.  In existing tunnel code, such as
> GRE, the tunnel determines a key should be added to the packet if either
> TNL_F_OUT_KEY_ACTION is set, or else out_key is provided.  The logic below
> in tunnel.c will set the ACTION flag if NO key is provided, which means a
> tunnel with key support will always attempt to insert a key.  Patch below.

The two methods of operation are supposed to be mutually exclusive.
Either the port has a specific key associated with it that is
implicitly used or one is provided by a flow action.  That's why the
flag is set if no key is provided.  In general key 0 is treated as
equivalent to key not present, so for GRE we don't include it at all
if the key is permanently zero.  If it is a flow based key then we
always include it in the GRE header for consistency.

Out of curiosity, what protocol are you adding support for?

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev_openvswitch.org

Reply via email to