[ovs-git] Open vSwitch: datapath: Merge vport "attach" into "create" and "detach" into "destroy". (master)

dev at openvswitch.org dev at openvswitch.org
Fri Dec 3 23:46:59 UTC 2010


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  7237e4f4b6155eb4854cebc0a45fe845f0950b40 (commit)
       via  e779d8d90d65297473febcf82ec44c9225cc4fe3 (commit)
       via  98563392dba5c82a9b952c421dec8b16c8a24023 (commit)
       via  a181129613bd0e48942e84577cbf4c78809ec256 (commit)
       via  c3827f619a38d3d202020838e1f92860046a3dbe (commit)
       via  94903c989826268a7fab3c730cd7d0b35ef423d5 (commit)
      from  17e42975c2d42574072925f3743cc64bfd5a8fc1 (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 7237e4f4b6155eb4854cebc0a45fe845f0950b40
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=7237e4f4b6155eb4854cebc0a45fe845f0950b40
Author: Ben Pfaff <blp at nicira.com>
		
datapath: Merge vport "attach" into "create" and "detach" into "destroy".
		
These steps are sequentially in lockstep, so we might as well combine them.

This expands the region over which the vport_lock is held.  I didn't
carefully verify that this was OK.

This also eliminates the synchronize_rcu() call from destruction of tunnel
vports, since they didn't appear to me to need it.

It should be possible to eliminate the synchronize_rcu() from the netdev,
patch, and internal_dev vports, but this commit does not do that.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Jesse Gross <jesse at nicira.com>


commit e779d8d90d65297473febcf82ec44c9225cc4fe3
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=e779d8d90d65297473febcf82ec44c9225cc4fe3
Author: Ben Pfaff <blp at nicira.com>
		
datapath: Merge "struct dp_port" into "struct vport".
		
After the previous commit, which changed the datapath to always create and
attach a vport at the same time, and to always detach and delete a vport
at the same time, there is no longer any real distinction between a dp_port
and a vport.  This commit, therefore, merges the two together to simplify
code.  It might even improve performance, although I have not checked.

I wasn't sure at first whether the merged structure should be "struct
dp_port" or "struct vport".  I went with the latter since the "v" prefix
sounds cool.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Jesse Gross <jesse at nicira.com>


commit 98563392dba5c82a9b952c421dec8b16c8a24023
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=98563392dba5c82a9b952c421dec8b16c8a24023
Author: Ben Pfaff <blp at nicira.com>
		
netdev-linux: Don't treat "system" devices as vports for setting stats.
		
Linux kernel datapath vports have a "set_stats" method.  Until now,
internal vports have been handled in the userspace netdev library as
type "system", so the "system" netdevs would try to use the vport
"set_stats" method.  Now, however, internal netdevs have been broken out
as a separate netdev type, so only that new type of netdev has to be able
to call into "set_stats".  This commit, therefore, removes it from the
"system" netdevs.


commit a181129613bd0e48942e84577cbf4c78809ec256
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=a181129613bd0e48942e84577cbf4c78809ec256
Author: Ben Pfaff <blp at nicira.com>
		
dpif: Log port number of deleted port in dpif_port_del().
		
This made tracking down a particular bug easier for me.  (It's too bad that
we can't log the port name, but we don't have it here.)


commit c3827f619a38d3d202020838e1f92860046a3dbe
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=c3827f619a38d3d202020838e1f92860046a3dbe
Author: Ben Pfaff <blp at nicira.com>
		
datapath: Make adding and attaching a vport a single step.
		
For some time now, Open vSwitch datapaths have internally made a
distinction between adding a vport and attaching it to a datapath.  Adding
a vport just means to create it, as an entity detached from any datapath.
Attaching it gives it a port number and a datapath.  Similarly, a vport
could be detached and deleted separately.

After some study, I think I understand why this distinction exists.  It is
because ovs-vswitchd tries to open all the datapath ports before it tries
to create them.  However, changing it to create them before it tries to
open them is not difficult, so this commit does this.

The bulk of this commit, however, changes the datapath interface to one
that always creates a vport and attaches it to a datapath in a single step,
and similarly detaches a vport and deletes it in a single step.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Jesse Gross <jesse at nicira.com>


commit 94903c989826268a7fab3c730cd7d0b35ef423d5
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=94903c989826268a7fab3c730cd7d0b35ef423d5
Author: Ben Pfaff <blp at nicira.com>
		
datapath: Encapsulate parameters for new vports in new struct vport_parms.
		
Upcoming commits will keep needing to pass more information to the vport
'create' member function.  It's annoying to have to modify a dozen pieces
of code every time just to do this, so this commit encapsulates all of the
parameters in a new struct and passes that instead.

Acked-by: Jesse Gross <jesse at nicira.com>


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

Summary of changes:
 datapath/actions.c                      |   10 +-
 datapath/datapath.c                     |  210 +++++++-------------
 datapath/datapath.h                     |   37 +---
 datapath/dp_notify.c                    |   21 +--
 datapath/dp_sysfs.h                     |    6 +-
 datapath/dp_sysfs_dp.c                  |   19 +--
 datapath/dp_sysfs_if.c                  |   58 +++---
 datapath/odp-compat.h                   |   13 --
 datapath/tunnel.c                       |   32 ++--
 datapath/tunnel.h                       |    5 +-
 datapath/vport-capwap.c                 |    4 +-
 datapath/vport-gre.c                    |    4 +-
 datapath/vport-internal_dev.c           |   66 ++-----
 datapath/vport-netdev.c                 |   49 ++---
 datapath/vport-patch.c                  |   75 +++-----
 datapath/vport.c                        |  323 +++++--------------------------
 datapath/vport.h                        |   89 ++++++---
 include/openvswitch/datapath-protocol.h |   23 ++-
 include/openvswitch/tunnel.h            |    2 +
 lib/dpif-linux.c                        |  115 ++++++------
 lib/dpif-netdev.c                       |   27 ++-
 lib/dpif-provider.h                     |    5 +-
 lib/dpif.c                              |   27 ++-
 lib/dpif.h                              |    4 +-
 lib/netdev-linux.c                      |  225 ++++++++++------------
 lib/netdev-provider.h                   |    2 +
 lib/netdev-vport.c                      |  218 +++++++++------------
 lib/netdev-vport.h                      |    3 +
 lib/netdev.c                            |   46 ++---
 ofproto/ofproto.c                       |    1 +
 utilities/ovs-dpctl.8.in                |   16 +-
 utilities/ovs-dpctl.c                   |   77 +++++---
 utilities/ovs-openflowd.c               |   11 +-
 vswitchd/bridge.c                       |  159 +++++----------
 34 files changed, 767 insertions(+), 1215 deletions(-)


hooks/post-receive
-- 
Open vSwitch




More information about the git mailing list