[ovs-git] Open vSwitch: datapath: Drop unused file ops. (master)

dev at openvswitch.org dev at openvswitch.org
Fri Dec 10 01:43:44 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  fb016a60434e3890ef4db2ccfa23fa1948c6b9f5 (commit)
       via  e22d4953ec00df611fff0fd36ac81087c63e1d1e (commit)
       via  dad80ec3088c787d3fd876e8d3d11ad7b3f0f11b (commit)
       via  eb0e14ed3f3a719b3cd5bef8cb3112e683e2a9dd (commit)
       via  79863c64f9085114759fb1125e35f377301441fb (commit)
       via  1e71f10f38d2ad09ee854b7e926a63744a1883e1 (commit)
       via  6d6266e6c9e387052e34f8434ee1d80690bff75d (commit)
       via  33b38b63e42c1f5aa80d1d7b4ce79cfbe371fae3 (commit)
       via  9099e1fc163534c0d66ba0d6b07889647485819b (commit)
       via  56b20c59a3fbfe94dcbb94fa4abfc013630af541 (commit)
       via  e7d737d175dfe53436b356445ecb154541d2afff (commit)
       via  2986c21ea17a4f31ce153dea12d1f39d05ae5996 (commit)
       via  8b69563f9744877ea15bf8cb69a6bdebf8e7f477 (commit)
       via  02a8cc607590c0f13eb3727ffda8e6ea7898a140 (commit)
       via  6569d3f419c96b18ea81a41ed13f2306119bcc00 (commit)
       via  6068bd7c29bb2dcbb2aa7dd6c90a41c0839d162d (commit)
       via  5b68fb428764e66dc73b2674ceb3f3e3555b59f2 (commit)
       via  a2a96c04cb5d7c4df7578aca5ac073d4ef05ca08 (commit)
       via  9851dd6727c99f25838781a8ff208c28eb0604db (commit)
      from  7aa697ddd2dfe494693be590ae5b03cbec5f9944 (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 fb016a60434e3890ef4db2ccfa23fa1948c6b9f5
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=fb016a60434e3890ef4db2ccfa23fa1948c6b9f5
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Drop unused file ops.
		
There have been two ops to support async access to the datapath
character device for a long time but they have never been implemented.
Drop the commented out code.

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


commit e22d4953ec00df611fff0fd36ac81087c63e1d1e
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=e22d4953ec00df611fff0fd36ac81087c63e1d1e
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Hold mutex for DP while userspace is blocking on read.
		
Currently we get a pointer to the DP in openvswitch_read() and
openvswitch_poll() and use it without any synchronization.  This means
that the DP could disappear from underneath us while we are using it.
Currently, this isn't a problem because userspace is single threaded but
it's better for the locking to be correct.

With this change we hold the mutex while doing a blocking wait, which
means that no changes can be made, including adding/removing flows.  It's
possible to make this finer grained but for the time being that isn't done,
since current userspace doesn't care.

Found with lockdep.

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


commit dad80ec3088c787d3fd876e8d3d11ad7b3f0f11b
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=dad80ec3088c787d3fd876e8d3d11ad7b3f0f11b
Author: Jesse Gross <jesse at nicira.com>
		
datapath: dp_sysfs_add_dp() needs RTNL lock.
		
We currently drop RTNL before adding a new datapath to sysfs but
then access the dp data structures.  This moves the call to
dp_sysfs_add_dp() before we drop the locks to prevent a potential
race.  All other calls to sysfs functions already hold RTNL.

Found with lockdep.

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


commit eb0e14ed3f3a719b3cd5bef8cb3112e683e2a9dd
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=eb0e14ed3f3a719b3cd5bef8cb3112e683e2a9dd
Author: Jesse Gross <jesse at nicira.com>
		
datapath: RCU dereference correct pointer in table.
		
Our hash table implementation consists of two levels of buckets
and then arrays of pointers.  The bucket arrays are fixed by the
size of the table, which is therefore protected by the RCU
dereference of the table pointer.  The arrays change when items
are inserted or deleted.  However, in tbl_insert/remove we need
to look at the old values and we do an rcu_dereference() on the
second level array instead of the bucket itself.  Other places
that access the table for lookup do the pointer dereference in
the correct order.

Found by sparse.

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


commit 79863c64f9085114759fb1125e35f377301441fb
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=79863c64f9085114759fb1125e35f377301441fb
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Don't rcu_dereference() objects in table.
		
Each time that we modify the flow/port table, we reallocate the
array of pointers to objects in a particular bucket.  We then use
RCU to update the link to that bucket.  This means that we don't
need to use RCU to access the individual object pointers, since
they are constant for a given instance of the bucket data structure.
This doesn't cause a problem per se (though it does restrict the
optimizations that the compiler can perform and adds a memory barrier
on Alpha).  However, it is confusing and inconsistent since the
pointers are not protected by RCU and we don't use rcu_assign_pointer().

Found by sparse.

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


commit 1e71f10f38d2ad09ee854b7e926a63744a1883e1
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=1e71f10f38d2ad09ee854b7e926a63744a1883e1
Author: Jesse Gross <jesse at nicira.com>
		
tunneling: Add missing rcu_dereference() to cache cleaner.
		
The cleaner for the header caching accesses the tunnel port table
without holding any locks.  However, it doesn't have a read memory
barrier, so there is no guarantee that the contents of the table
have made it to the right CPU.

Found by sparse.

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


commit 6d6266e6c9e387052e34f8434ee1d80690bff75d
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=6d6266e6c9e387052e34f8434ee1d80690bff75d
Author: Jesse Gross <jesse at nicira.com>
		
brcompat: Simplify generation of bridge ID.
		
Currently we use a fairly complicated method of generating the
bridge ID, since the actual struct is only available in a header
file private to the Linux bridge.  The current method appears to
be correct but is difficult to reason about.  This replaces it
with a simple memcpy, which is more analogous to what the Linux
bridge does.

Flagged by sparse.

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


commit 33b38b63e42c1f5aa80d1d7b4ce79cfbe371fae3
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=33b38b63e42c1f5aa80d1d7b4ce79cfbe371fae3
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Use static where possible.
		
Mark functions and global variables used only in a single file as
static.

Found with sparse.

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


commit 9099e1fc163534c0d66ba0d6b07889647485819b
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=9099e1fc163534c0d66ba0d6b07889647485819b
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Use NULL instead of 0 in alloc_buckets().
		
0 and NULL are the same but NULL has clearer semantics.  This has
no functional change.

Found with sparse.

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


commit 56b20c59a3fbfe94dcbb94fa4abfc013630af541
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=56b20c59a3fbfe94dcbb94fa4abfc013630af541
Author: Jesse Gross <jesse at nicira.com>
		
capwap: Bind address should be big endian.
		
CAPWAP creates a UDP socket that accepts packets from any address using
INADDR_ANY.  IP addresses should be in network byte order but that
constant is in host byte order, so use htonl.  However, this is not a
real bug since the value of INADDR_ANY is 0.

Found with sparse.

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


commit e7d737d175dfe53436b356445ecb154541d2afff
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=e7d737d175dfe53436b356445ecb154541d2afff
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Try to avoid custom checksum update function.
		
Our update_csum() function was exactly the same as
inet_proto_csum_replace4() with the one exception that it uses our
checksum status fields on older kernels that need it.  Unfortunately,
we can't completely move the code to the compat directory because it
relies on fields in OVS CB but we can at least exile it to checksum.h.

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


commit 2986c21ea17a4f31ce153dea12d1f39d05ae5996
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=2986c21ea17a4f31ce153dea12d1f39d05ae5996
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Compatibility code for inet_proto_csum_replace2.
		
Kernels earlier than 2.6.25 did not define inet_proto_csum_replace2,
so implement it ourselves.

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


commit 8b69563f9744877ea15bf8cb69a6bdebf8e7f477
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=8b69563f9744877ea15bf8cb69a6bdebf8e7f477
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Correctly update IP checksum with actions.
		
The update_csum() function that we currently use to update
checksums on actions is really intended for L4 checksums.  In
particular, if the packet has a partial checksum and the field
is not in the pseudo header, it doesn't do anything at all.
This doesn't make sense for the IP header because Linux doesn't
use hardware offload for it, so we always need to recompute the
checksum.  Instead, we can use the kernel function csum_replace4(),
which will always do the right thing.

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


commit 02a8cc607590c0f13eb3727ffda8e6ea7898a140
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=02a8cc607590c0f13eb3727ffda8e6ea7898a140
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Compatibility code for csum_replace4.
		
Kernels ealier than 2.6.25 did not define csum_replace4, so
implement it ourselves.

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


commit 6569d3f419c96b18ea81a41ed13f2306119bcc00
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=6569d3f419c96b18ea81a41ed13f2306119bcc00
Author: Jesse Gross <jesse at nicira.com>
		
tunneling: Update port pools on config change.
		
We keep track of the number of tunnels using the different types of
matching in order to avoid doing the lookup when there are no ports
of that type.  However, when updating the configuration we weren't
changing the port pool counts, which could lead to incorrectly not
finding a tunnel on receive.

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


commit 6068bd7c29bb2dcbb2aa7dd6c90a41c0839d162d
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=6068bd7c29bb2dcbb2aa7dd6c90a41c0839d162d
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Fix indentation in patch-vport.c.
		
Convert spaces to tabs in indents.

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


commit 5b68fb428764e66dc73b2674ceb3f3e3555b59f2
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=5b68fb428764e66dc73b2674ceb3f3e3555b59f2
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Convert patch vport to use call_rcu() on destruction.
		
Since patch ports are virtual devices, we can potentially have many
of them in a datapath.  Currently we have a call to synchronize_rcu()
each time we destroy one, which can be expensive if we are deleting a
datapath with many ports.  This converts it to use call_rcu() instead,
which allows us to wait for only a single RCU grace period independent
of the number of ports.

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


commit a2a96c04cb5d7c4df7578aca5ac073d4ef05ca08
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=a2a96c04cb5d7c4df7578aca5ac073d4ef05ca08
Author: Jesse Gross <jesse at nicira.com>
		
tunneling: Access correct IP header when processing ECN.
		
We attempt to copy the ECN bits from the outside of the tunnel to
the inside on receive if we are encapsulating IP traffic.  However,
we were previously looking at the inner IP header as the source of
the ECN bits, when it should have been the outer header.  This
corrects that and cleans up the function a little bit.

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


commit 9851dd6727c99f25838781a8ff208c28eb0604db
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=9851dd6727c99f25838781a8ff208c28eb0604db
Author: Jesse Gross <jesse at nicira.com>
		
tunneling: Remove call to eth_type_trans() on receive.
		
On receive we call eth_type_trans() to set skb->protocol.  However,
that function also sets skb->pkt_type, which requires several
comparisons to MAC addresses.  Nothing in OVS cares about pkt_type,
so this is wasteful.  If we actually do egress to the IP stack
through an internal device then we'll call eth_type_trans() to get
everything correctly setup.  It's possible for device drivers to
see an incorrect pkt_type or not correctly parse legacy IPX (which
eth_type_trans() also handles) but it's highly unlikely that they
will care.

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


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

Summary of changes:
 datapath/actions.c                                 |   30 ++-----------
 datapath/brcompat.c                                |    9 ++--
 datapath/checksum.h                                |   25 +++++++++++
 datapath/datapath.c                                |   23 +++++-----
 datapath/dp_sysfs_dp.c                             |    2 +-
 datapath/flow.c                                    |    2 +-
 .../linux-2.6/compat-2.6/include/net/checksum.h    |   13 ++++++
 datapath/table.c                                   |    8 ++--
 datapath/tunnel.c                                  |   46 +++++++++++++-------
 datapath/vport-capwap.c                            |    2 +-
 datapath/vport-patch.c                             |   23 ++++++----
 11 files changed, 110 insertions(+), 73 deletions(-)


hooks/post-receive
-- 
Open vSwitch




More information about the git mailing list