[ovs-git] Open vSwitch: datpath: Fix memory leak when a loop is detected. (master)

dev at openvswitch.org dev at openvswitch.org
Sat Dec 11 23:21:40 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  f267de8ae6af2509128d28e1cd0dd21aee7c9734 (commit)
       via  2d7ce2ee1af5c4925ebbc681bb72e660d87faa71 (commit)
       via  60ba76ea15b6758904b37c4c030e3f133c503c69 (commit)
       via  055dae4f7f6d3316ca326736f7b731db1bde0f09 (commit)
       via  c052da844bdf7fc2f87500f76fca529c4e3dc598 (commit)
      from  19739aee088aad011995f5f8e891fb65bd13aa09 (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 f267de8ae6af2509128d28e1cd0dd21aee7c9734
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=f267de8ae6af2509128d28e1cd0dd21aee7c9734
Author: Jesse Gross <jesse at nicira.com>
		
datpath: Fix memory leak when a loop is detected.
		
If we detect a packet that is looping we kill the flow but then
don't do anything with the packet that caused the problem in the
first place, so this frees the packet.  This isn't a very serious
leak because we try to shut off the flow that lead to the loop
as early as possible.  Once this happens, packets will no longer
hit the loop detector and will be freed just as any other packet
that should be dropped.

It also fixes an issue where the offset to the stats counter is
uninitialized after a loop is detected.

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


commit 2d7ce2ee1af5c4925ebbc681bb72e660d87faa71
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=2d7ce2ee1af5c4925ebbc681bb72e660d87faa71
Author: Jesse Gross <jesse at nicira.com>
		
datapth: Drop check for impossible condition after skb_gso_segment().
		
It's possible for skb_gso_segment to return NULL but only if the
hardware supports the correct form of segmentation offload but just
wants software to verify the offload parameters.  However, since we're
not hardware and don't support any kind of segmentation offload natively,
we can never get in this situation.  Therefore drop the check and
comment.

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


commit 60ba76ea15b6758904b37c4c030e3f133c503c69
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=60ba76ea15b6758904b37c4c030e3f133c503c69
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Drop synchronize_rcu() in internal dev destroy.
		
unregister_netdevice() contains a call to synchronize_rcu(), so there
is no need to directly call it ourselves immediately beforehand.
We were relying on the call during unregistration anyways to stop
packets from being transmited on the device, so our version was
both misleading and had a performance penalty.

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


commit 055dae4f7f6d3316ca326736f7b731db1bde0f09
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=055dae4f7f6d3316ca326736f7b731db1bde0f09
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Take advantage of IFF_OVS_DATAPATH.
		
Starting in 2.6.37 we have our own unique identifier to be able
to find ports attached to OVS.  Take advantage of it to avoid
ugly workarounds.

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


commit c052da844bdf7fc2f87500f76fca529c4e3dc598
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=c052da844bdf7fc2f87500f76fca529c4e3dc598
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Don't use RCU for internal dev vport.
		
The vports are now attached and ready to go when they are allocated,
so we don't have to worry about future changes.  As a result, we can
directly store the pointer in the internal dev's netdevice private
space before it is registered.  The registration process will handle
the necessary write memory barriers and anyone who has a reference
to the netdev will have done the read side barriers, we don't need
to use RCU at all.

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


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

Summary of changes:
 datapath/datapath.c           |   19 ++++++++-----------
 datapath/vport-internal_dev.c |   15 +++------------
 datapath/vport-netdev.c       |   16 ++++++++--------
 3 files changed, 19 insertions(+), 31 deletions(-)


hooks/post-receive
-- 
Open vSwitch




More information about the git mailing list