[ovs-git] Open vSwitch: datapath: Check tunnel info before dereferencing on send. (master)

dev at openvswitch.org dev at openvswitch.org
Sat Jun 21 01:04:17 UTC 2014


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  2791461076c73d063b60ed1a3a56baeab38d354b (commit)
       via  271e6bc7d27bf19c666a37beeaeeec8017850c44 (commit)
       via  c1fc1411d204c59608bf9fe36a65bd221b10cbb2 (commit)
       via  1d2a1b5f5252e4c6ce8bbf8d91ca27aba52496e6 (commit)
       via  94872594b79d1a4a6cfb9434b1c1d1d506b3c57d (commit)
       via  f0cd669f192495472cd7e76d02b48afe9c3db47c (commit)
       via  9cef26ac6a71aa9cb02f1f515a2f6038e02ae9c7 (commit)
      from  6ddb63134def5509640e5b7713eea39095e1d17f (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 2791461076c73d063b60ed1a3a56baeab38d354b
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=2791461076c73d063b60ed1a3a56baeab38d354b
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Check tunnel info before dereferencing on send.
		
It's possible that the tunnel information may not have been set by
userspace before a packet is output to a tunnel port. Therefore, we
should ensure that we validate that the information is there before
attempting to use it.

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


commit 271e6bc7d27bf19c666a37beeaeeec8017850c44
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=271e6bc7d27bf19c666a37beeaeeec8017850c44
Author: Jesse Gross <jesse at nicira.com>
		
doc: Additional documentation updates for Geneve.
		
Signed-off-by: Jesse Gross <jesse at nicira.com>


commit c1fc1411d204c59608bf9fe36a65bd221b10cbb2
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=c1fc1411d204c59608bf9fe36a65bd221b10cbb2
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Add support for Geneve tunneling.
		
This adds support for Geneve - Generic Network Virtualization
Encapsulation. The protocol is documented at
http://tools.ietf.org/html/draft-gross-geneve-00

The kernel implementation is completely agnostic to the options
that are in use and can handle newly defined options without
further work. It does this by simply matching on a byte array
of options and allowing userspace to setup flows on this array.

Userspace currently implements only support for basic version of
Geneve. It can work with the base header (including the VNI) and
is capable of parsing options but does not currently support any
particular option definitions. Over time, the intention is to
allow options to be matched through OpenFlow without requiring
explicit support in OVS userspace.

Signed-off-by: Jesse Gross <jesse at nicira.com>
Acked-by: Thomas Graf <tgraf at suug.ch>
Acked-by: Pravin B Shelar <pshelar at nicira.com>


commit 1d2a1b5f5252e4c6ce8bbf8d91ca27aba52496e6
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=1d2a1b5f5252e4c6ce8bbf8d91ca27aba52496e6
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Factor out allocation and verification of actions.
		
As the size of the flow key grows, it can put some pressure on the
stack. This is particularly true in ovs_flow_cmd_set(), which needs several
copies of the key on the stack. One of those uses is logically separate,
so this factors it out to reduce stack pressure and improve readibility.

Signed-off-by: Jesse Gross <jesse at nicira.com>
Acked-by: Thomas Graf <tgraf at suug.ch>
Acked-by: Pravin B Shelar <pshelar at nicira.com>


commit 94872594b79d1a4a6cfb9434b1c1d1d506b3c57d
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=94872594b79d1a4a6cfb9434b1c1d1d506b3c57d
Author: Jesse Gross <jesse at nicira.com>
		
tunnel: Add support for matching on OAM packets.
		
Some tunnel formats have mechanisms for indicating that packets are
OAM frames that should be handled specially (either as high priority or
not forwarded beyond an endpoint). This provides support for allowing
those types of packets to be matched.

Signed-off-by: Jesse Gross <jesse at nicira.com>
Acked-by: Thomas Graf <tgraf at suug.ch>
Acked-by: Pravin B Shelar <pshelar at nicira.com>


commit f0cd669f192495472cd7e76d02b48afe9c3db47c
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=f0cd669f192495472cd7e76d02b48afe9c3db47c
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Wrap struct ovs_key_ipv4_tunnel in a new structure.
		
Currently, the flow information that is matched for tunnels and
the tunnel data passed around with packets is the same. However,
as additional information is added this is not necessarily desirable,
as in the case of pointers.

This adds a new structure for tunnel metadata which currently contains
only the existing struct. This change is purely internal to the kernel
since the current OVS_KEY_ATTR_IPV4_TUNNEL is simply a compressed version
of OVS_KEY_ATTR_TUNNEL that is translated at flow setup.

Signed-off-by: Jesse Gross <jesse at nicira.com>
Acked-by: Thomas Graf <tgraf at suug.ch>
Acked-by: Pravin B Shelar <pshelar at nicira.com>


commit 9cef26ac6a71aa9cb02f1f515a2f6038e02ae9c7
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=9cef26ac6a71aa9cb02f1f515a2f6038e02ae9c7
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Eliminate memset() from flow_extract.
		
As new protocols are added, the size of the flow key tends to
increase although few protocols care about all of the fields. In
order to optimize this for hashing and matching, OVS uses a variable
length portion of the key. However, when fields are extracted from
the packet we must still zero out the entire key.

This is no longer necessary now that OVS implements masking. Any
fields (or holes in the structure) which are not part of a given
protocol will be by definition not part of the mask and zeroed out
during lookup. Furthermore, since masking already uses variable
length keys this zeroing operation automatically benefits as well.

In principle, the only thing that needs to be done at this point
is remove the memset() at the beginning of flow. However, some
fields assume that they are initialized to zero, which now must be
done explicitly. In addition, in the event of an error we must also
zero out corresponding fields to signal that there is no valid data
present. These increase the total amount of code but very little of
it is executed in non-error situations.

Removing the memset() reduces the profile of ovs_flow_extract()
from 0.64% to 0.56% when tested with large packets on a 10G link.

Suggested-by: Pravin Shelar <pshelar at nicira.com>
Signed-off-by: Jesse Gross <jesse at nicira.com>
Acked-by: Thomas Graf <tgraf at suug.ch>
Acked-by: Pravin B Shelar <pshelar at nicira.com>


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

Summary of changes:
 INSTALL.RHEL                                   |    6 +-
 INSTALL.XenServer                              |    2 +-
 NEWS                                           |    4 +
 README                                         |    2 +-
 datapath/Modules.mk                            |    1 +
 datapath/actions.c                             |    6 +-
 datapath/datapath.c                            |   73 ++--
 datapath/datapath.h                            |    2 +-
 datapath/flow.c                                |   64 +++-
 datapath/flow.h                                |   42 ++-
 datapath/flow_netlink.c                        |  184 +++++++++-
 datapath/flow_netlink.h                        |    2 +-
 datapath/linux/Modules.mk                      |    1 +
 datapath/linux/compat/include/net/geneve.h     |   23 ++
 datapath/linux/compat/include/net/ip_tunnels.h |    5 +
 datapath/vport-geneve.c                        |  444 ++++++++++++++++++++++++
 datapath/vport-gre.c                           |   38 +-
 datapath/vport-lisp.c                          |   30 +-
 datapath/vport-vxlan.c                         |   31 +-
 datapath/vport.c                               |    7 +-
 datapath/vport.h                               |    3 +-
 include/linux/openvswitch.h                    |    6 +-
 include/openflow/nicira-ext.h                  |    6 +-
 lib/dpif-linux.c                               |    5 +
 lib/flow.c                                     |    2 +
 lib/flow.h                                     |    1 +
 lib/netdev-vport.c                             |   15 +-
 lib/odp-util.c                                 |   53 ++-
 lib/odp-util.h                                 |    6 +-
 lib/packets.h                                  |   18 +
 tests/ovs-vsctl.at                             |    8 +-
 tests/tunnel.at                                |   12 +
 vswitchd/vswitch.xml                           |   31 +-
 33 files changed, 984 insertions(+), 149 deletions(-)
 create mode 100644 datapath/linux/compat/include/net/geneve.h
 create mode 100644 datapath/vport-geneve.c


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list