[ovs-dev] [PATCH] datapath: Do not clear key in ovs_match_init()
jesse at nicira.com
Thu Jun 27 04:55:51 UTC 2013
On Wed, Jun 26, 2013 at 9:53 PM, Simon Horman <horms at verge.net.au> wrote:
> On Mon, Jun 24, 2013 at 12:29:55PM -0700, Jesse Gross wrote:
>> On Sun, Jun 23, 2013 at 7:29 PM, Simon Horman <horms at verge.net.au> wrote:
>> > It appears that in the case where vs_match_init() is called from
>> > ovs_flow_metadata_from_nlattrs() it is undesirable to set the flow key as
>> > some of its values are set earlier on in ovs_flow_metadata_from_nlattrs().
>> > Furthermore in the case where ovs_flow_metadata_from_nlattrs() is called
>> > from ovs_packet_cmd_execute() key has been partially initialised by
>> > ovs_flow_extract().
>> > This manifests in a problem when executing actions as elements of key are
>> > used when verifying some actions. For example a dec_ttl action verifies the
>> > proto of the flow. An example of a flow that fails as a result of this
>> > problem is:
>> > ovs-ofctl add-flow br0 "ip actions=dec_ttl,normal"
>> > This patch resolves this problem by not clearing key in ovs_match_init()
>> > and instead clearing it before calling ovs_match_init() when it is called
>> > other than by ovs_flow_metadata_from_nlattrs().
>> > This appears to be a regression added by "datapath: Mega flow
>> > implementation", a1c564be1e2ffc31f8da09ab654c8ed987907fe5.
>> > Cc: Andy Zhou <azhou at nicira.com>
>> > Signed-off-by: Simon Horman <horms at verge.net.au>
>> > ---
>> > I am unsure of the exact intention of clearing the key and thus the
>> > correctness of this patch. However, it does appear to resolve
>> > the problem that I describe above.
>> Thanks, I think this can simplified a little bit. I applied the following patch:
> Thanks, I have confirmed that resolves the problem that I observed.
Thanks and sorry about not looking at your patches yet - I've been
trying to help stabilize master first (it's getting better but there's
still one that's eluding me at the moment).
X-CudaMail-Whitelist-To: dev at openvswitch.org
More information about the dev