[ovs-git] Open vSwitch: Do not perform validation in learn_parse(); (master)

dev at openvswitch.org dev at openvswitch.org
Wed May 8 17:47:53 UTC 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  dd43a558597bbf99a62541bc77e85f86f63e2f12 (commit)
       via  b019d34da6e6c185bb093984906adcb36c3f6686 (commit)
      from  d652859bfd3fd81f3db9344ae5760ba756600b97 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit dd43a558597bbf99a62541bc77e85f86f63e2f12
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=dd43a558597bbf99a62541bc77e85f86f63e2f12
Author: Simon Horman <horms at verge.net.au>
		
Do not perform validation in learn_parse();
		
I believe this is consistent with the handling of all other action
parsing called from parse_named_action().

Verification of all actions, including learn actions, occurs separately
in ofpact_check__(). It also occurs via in a call to ofpacts_check()
in parse_ofp_str(),

This patch is larger than might otherwise be expected as the flow argument
of learn_parse() is now unused and thus removed.  This propagates up the
call-chain some way.

This implementation was suggested by Jesse Gross in response to an
enhancement I made to the validation performed during parsing learn actions
to allow it to correctly account for changes to the dl_type due to MPLS
push and pop actions.

Tests have also been updated to check for the less specific messages
generated by the call to ofpacts_check() in parse_ofp_str() which at the
suggestion of Ben Pfaff was added by a prior patch for this purpose.

Cc: Jesse Gross <jesse at nicira.com>
Cc: Ben Pfaff <blp at nicira.com>
Signed-off-by: Simon Horman <horms at verge.net.au>
Signed-off-by: Ben Pfaff <blp at nicira.com>


commit b019d34da6e6c185bb093984906adcb36c3f6686
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=b019d34da6e6c185bb093984906adcb36c3f6686
Author: Simon Horman <horms at verge.net.au>
		
Check actions prerequisites in parse_ofp_str()
		
Add a call to ofpacts_check() in parse_ofp_str() to check pre-requisites.
This is in preparation for removing special-case pre-requisite checking
of learn actions which is useful for the test-suite.

This patch also fixes two tests which this change revealed to be incorrect.

1. Open Flow 1.0 action which sets NXM_NX_IPV6_SRC
   without any pre-requisites

   This is not valid because there should be an IPv6 pre-requisite.

   This portion of the test has been removed as IPv6 pre-requisites are
   only valid when using OXM or NXM, however the test appears
   to be a (non-NXM) Open Flow 1.0 test.

   It has been replaced with a similar test of an action
   that sets the IPv4 source address.

2. Open Flow 1.2 action which sets NXM_NX_IPV6_SRC
   without any pre-requisites.

   This is not valid because there should be an IPv6 pre-requisite.

   This test has been corrected by adding IPv6 as a pre-requisite,
   which is valid for Open Flow 1.2 as it uses OXM.

Use of ofpacts_check() in parse_ofp_str() suggested by Ben Pfaff.

Cc: Ben Pfaff <blp at nicira.com>
Signed-off-by: Simon Horman <horms at verge.net.au>
Signed-off-by: Ben Pfaff <blp at nicira.com>


-----------------------------------------------------------------------

Summary of changes:
 lib/learn.c        |   25 +------------------------
 lib/learn.h        |    2 +-
 lib/ofp-parse.c    |   28 ++++++++++++++++++----------
 tests/learn.at     |   12 +++++++-----
 tests/ovs-ofctl.at |   10 +++++-----
 5 files changed, 32 insertions(+), 45 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list