[ovs-git] Open vSwitch: ofproto-dpif: Get rid of "struct dst". (master)

dev at openvswitch.org dev at openvswitch.org
Thu Nov 17 19:08:24 UTC 2011


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  395e68cea13545eb23d5d50f529513e7ec6d73b6 (commit)
       via  becffb862616fa1a5c76c948b4f39cd61f6efca8 (commit)
       via  7202cbe5521ed327ea0c9c959493a08ad2bf8d01 (commit)
       via  b2a60db8e407196d0e6634379e8aedbfe2ec774c (commit)
       via  39db78a0fb8bcf91a6b0e31867018572e2b6dbe9 (commit)
       via  c4a0802f06ff2c66b6a2736491d046afb646bbc0 (commit)
       via  e74a239deb5a35a91807630f36d9d3f5e62239af (commit)
       via  79049a242a64f9e8e26f575c431ff0456b6424d8 (commit)
       via  9ba15e2a491ccb0f2c1e9f0660d041135a3afc7d (commit)
       via  cb77e39b04904c8e8ae34d5bd6dd99c852018d52 (commit)
       via  5da5ec37e45c0287ebe7e52278dfed3a485b6f2a (commit)
       via  653fe3a3f50c74065cb5fa86dbe96b4884ece091 (commit)
       via  9ac130ad15cdd41538242daa3adff3150da29209 (commit)
      from  0fb426263e7834f7403eefd860cf5d36d43f8c45 (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 395e68cea13545eb23d5d50f529513e7ec6d73b6
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=395e68cea13545eb23d5d50f529513e7ec6d73b6
Author: Ben Pfaff <blp at nicira.com>
		
ofproto-dpif: Get rid of "struct dst".
		
struct dst is an intermediate form for OFPP_NORMAL translation that
has existed since the beginning of Open vSwitch development.  It
has always been a bit ugly, since ideally we wouldn't need any intermediate
form at all.  This commit eliminates it, which speeds up OFPP_NORMAL
translation.

struct dst was used earlier to eliminate duplicate packets in OFPP_NORMAL
output.  Now, we have rules that eliminate duplicate packets in a cheaper
way.

OFPP_NORMAL outputs packets for two different reasons, forwarding and
mirroring, so those are the two possible sources of packet duplication.
Forwarding by itself never outputs two copies of a packet to a single port
on a given VLAN, and this is also true of mirroring by itself since commit
"ofproto-dpif: Improve RSPAN translation performance from O(n**2) to O(n)".

The only remaining possibility, then, is that forwarding and mirroring
between them duplicate an output packet.  However, the algorithms are now
designed to prevent this.  Forwarding will never output to a mirroring
destination output port.  Forwarding will only output to a mirroring
output VLAN if the packet arrived on a mirroring output VLAN, and in that
case mirroring is disabled.

This commit has the side effect of improving behavior for VLAN output.
Previously, a packet that arrived with an 802.1Q tag with both VID and PCP
of 0 would be output with a similar tag in some cases; now it is
consistently stripped.  This change is reflected in the unit test change.

We really need some unit tests for mirroring.  I have not tested mirroring
behavior, only theorized about it (see above).


commit becffb862616fa1a5c76c948b4f39cd61f6efca8
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=becffb862616fa1a5c76c948b4f39cd61f6efca8
Author: Ben Pfaff <blp at nicira.com>
		
tests: Rewrite code for comparing sets of ODP actions.
		
The compare-odp-actions.pl utility isn't fully general, even for its
intended purpose of allowing sets of ODP actions to be compared
ignoring unimportant differences in ordering of output actions and
VLAN set actions.  I decided that the proper way to do it was to have
a utility that can actually parse the actions, instead of just
doing textual transformations on them.  So, this commit replaces
compare-odp-actions.pl by "ovs-dpctl normalize-actions", which is
sufficiently general for the intended purpose.

The new ovs-dpctl functionality can be easily extended to handle
differences in fields other than VLAN, but only VLAN is needed so
far.

This will be needed in an upcoming commit that in some cases
introduces redundant "set vlan" actions into the ODP actions, which
compare-odp-actions.pl doesn't tolerate.


commit 7202cbe5521ed327ea0c9c959493a08ad2bf8d01
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=7202cbe5521ed327ea0c9c959493a08ad2bf8d01
Author: Ben Pfaff <blp at nicira.com>
		
odp-util: New function odp_actions_from_string().
		
An upcoming commit will add a user.  The only planned users for now are
part of unit tests themselves, so it doesn't seem important to unit test
it.


commit b2a60db8e407196d0e6634379e8aedbfe2ec774c
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=b2a60db8e407196d0e6634379e8aedbfe2ec774c
Author: Ben Pfaff <blp at nicira.com>
		
odp-util: Add support for named ports to odp_flow_key_from_string().
		
Really the "trace" command should support this but in fact I need it for
an upcoming update to a test.


commit 39db78a0fb8bcf91a6b0e31867018572e2b6dbe9
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=39db78a0fb8bcf91a6b0e31867018572e2b6dbe9
Author: Ben Pfaff <blp at nicira.com>
		
odp-util: New function factored out of put_userspace_action().
		
An upcoming patch to odp-util will add a new user, but this seems like a
reasonable change in any case.


commit c4a0802f06ff2c66b6a2736491d046afb646bbc0
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=c4a0802f06ff2c66b6a2736491d046afb646bbc0
Author: Ben Pfaff <blp at nicira.com>
		
odp-util: Code formatting improvements.
		


commit e74a239deb5a35a91807630f36d9d3f5e62239af
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=e74a239deb5a35a91807630f36d9d3f5e62239af
Author: Ben Pfaff <blp at nicira.com>
		
shash: New function shash_find_len().
		
This will acquire a user in an upcoming commit that uses it in parsing
without modifying the text being parsed or copying it.


commit 79049a242a64f9e8e26f575c431ff0456b6424d8
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=79049a242a64f9e8e26f575c431ff0456b6424d8
Author: Ben Pfaff <blp at nicira.com>
		
flow: Rename flow_compare() to flow_compare_3way().
		
I like the _3way suffix convention.  It makes the interpretation of the
return value clear.  We use it elsewhere in the tree, so use it here too.

There weren't any users of flow_compare() outside of flow.h, but there soon
will be.


commit 9ba15e2a491ccb0f2c1e9f0660d041135a3afc7d
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=9ba15e2a491ccb0f2c1e9f0660d041135a3afc7d
Author: Ben Pfaff <blp at nicira.com>
		
ofproto-dpif: Improve RSPAN translation performance from O(n**2) to O(n).
		
This code previously checked whether each individual mirror output was
already in the set of destinations.  This is O(n**2) in the number of
ports in a bridge.

The new code uses a smarter algorithm to eliminate duplicates, one that is
O(n) in the number of ports in a bridge.


commit cb77e39b04904c8e8ae34d5bd6dd99c852018d52
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=cb77e39b04904c8e8ae34d5bd6dd99c852018d52
Author: Ben Pfaff <blp at nicira.com>
		
ofproto-dpif: Make compose_mirror_dsts() harder to screw up.
		
I came close to add a "continue;" inside the main "while" loop in
compose_mirror_dsts(), which would have turned it into an infinite loop.
This commit changes it to a "for" loop that is harder to screw up.


commit 5da5ec37e45c0287ebe7e52278dfed3a485b6f2a
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=5da5ec37e45c0287ebe7e52278dfed3a485b6f2a
Author: Ben Pfaff <blp at nicira.com>
		
ofproto-dpif: Remove duplicate VLAN logic.
		
flow_get_vlan() duplicated the logic in input_vid_to_vlan() in an
unclear way and added some logic of its own to detect invalid
input VLANs.  This commit eliminates the duplication and makes the
code easier to understand.


commit 653fe3a3f50c74065cb5fa86dbe96b4884ece091
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=653fe3a3f50c74065cb5fa86dbe96b4884ece091
Author: Ben Pfaff <blp at nicira.com>
		
ofproto-dpif: Do not output RSPAN packets to SPAN ports.
		
It's always been my intention that ports used as port mirroring
destinations (SPAN) be reserved solely for that purpose.  When SPAN and
RSPAN are both configured, however, RSPAN mirror packets could get directed
to SPAN ports, which was unintentional.

This commit also updates the documentation to make it clear (if that is
even necessary) that this behavior is intentional.

Found by inspection.


commit 9ac130ad15cdd41538242daa3adff3150da29209
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=9ac130ad15cdd41538242daa3adff3150da29209
Author: Ben Pfaff <blp at nicira.com>
		
odp-util: Reorder OVS_KEY_ATTR_* cases for consistency.
		
This matches the order of their definition in openvswitch.h.

Reported-by: Justin Pettit <jpettit at nicira.com>


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

Summary of changes:
 lib/flow.h                   |    6 +-
 lib/odp-util.c               |  279 +++++++++++++++++++++-
 lib/odp-util.h               |   10 +-
 lib/shash.c                  |   25 ++-
 lib/shash.h                  |    3 +-
 ofproto/ofproto-dpif.c       |  551 ++++++++++++++++++-----------------------
 tests/automake.mk            |    1 -
 tests/compare-odp-actions.pl |   66 -----
 tests/ofproto-dpif.at        |   20 +-
 tests/test-odp.c             |    2 +-
 utilities/ovs-dpctl.c        |  240 ++++++++++++++++++
 vswitchd/vswitch.xml         |    1 +
 12 files changed, 799 insertions(+), 405 deletions(-)
 delete mode 100644 tests/compare-odp-actions.pl


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list