[ovs-git] Open vSwitch: tunneling: Remove old GRE implementation. (master)

dev at openvswitch.org dev at openvswitch.org
Mon Apr 19 13:37:58 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  6f643e4946016399f0b217c2226284e3892b6267 (commit)
       via  3fe8053b36da715c411b907ac125e41f9e9a28f2 (commit)
       via  4c0f178060b740faac9a5aec915a24dc3b61770c (commit)
       via  658797c83a9b656493c8911026f12a5397cbd5ba (commit)
       via  15b3596a4105bbea82108ac251f9b19dc316e19d (commit)
       via  2736b84e2348090d4756f987db37aa7ddfcb50e0 (commit)
       via  ff6402a9f0d9ee4c29567b62938c82924d502b92 (commit)
       via  2d2a0e309f2464fd2cf77a328b15acc62cfc7c09 (commit)
       via  8d5ebd839b86463c72239fe972001e4f1a367a7b (commit)
       via  3abc4a1a6c29ebecffeecedd582c64e0bb7d4c53 (commit)
       via  fdd8224884cbc92dd6e42f617018625f6a6d4c96 (commit)
       via  f2459fe7d91c4c325dfaa3ed18f56200b63ae27e (commit)
       via  6b8a6c529b2bd8ce03584b132263dca5ac932c1b (commit)
       via  b5e80aecc4b10f73196f272598bac0644f196471 (commit)
       via  c5ccff0db1e0ef75e36a414e8c0c2b8421cdeda8 (commit)
       via  659586efcf6f9539282da9447007897907c41112 (commit)
      from  db0e2ad101f10288c002bd537047f3d9e1979c9f (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 6f643e4946016399f0b217c2226284e3892b6267
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=6f643e4946016399f0b217c2226284e3892b6267
Author: Jesse Gross <jesse at nicira.com>
tunneling: Remove old GRE implementation.
The new GRE implementation provides a complete drop in replacement
for the old Linux based implementation.  Therefore, remove the
old implementation and rename "grenew" to "gre".

commit 3fe8053b36da715c411b907ac125e41f9e9a28f2
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=3fe8053b36da715c411b907ac125e41f9e9a28f2
Author: Jesse Gross <jesse at nicira.com>
tunneling: Add userspace support for new GRE implementation.
Add a netdev that supports the new datapath GRE implementation.
It currently coexists with the old implementation so it is named

commit 4c0f178060b740faac9a5aec915a24dc3b61770c
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=4c0f178060b740faac9a5aec915a24dc3b61770c
Author: Jesse Gross <jesse at nicira.com>
netdev: Allow get_ifindex and get_features to be null.
Allow netdev providers to set get_ifindex and get_features it
null if they would always return EOPNOTSUPP.  This is particuarly
useful for virtual devices.

commit 658797c83a9b656493c8911026f12a5397cbd5ba
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=658797c83a9b656493c8911026f12a5397cbd5ba
Author: Jesse Gross <jesse at nicira.com>
netdev-linux: Don't free a member of a struct.
We allocate struct netdev_linux which contains struct netdev but
free the netdev.  In practice this makes no difference because the
netdev is the first member of the struct but we should be correct

commit 15b3596a4105bbea82108ac251f9b19dc316e19d
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=15b3596a4105bbea82108ac251f9b19dc316e19d
Author: Jesse Gross <jesse at nicira.com>
netdev-linux: Check notifications are for netdev-linux device.
When receiving a change notification from rtnetlink we checked whether
a netdev of that name existed and if so tried to handle it.  This also
checks that the type of the device is one handled by netdev-linux.

commit 2736b84e2348090d4756f987db37aa7ddfcb50e0
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=2736b84e2348090d4756f987db37aa7ddfcb50e0
Author: Jesse Gross <jesse at nicira.com>
tunneling: Add datapath GRE support.
Add a new vport type that implements GRE support inside of the
datapath instead of relying on Linux devices.  This provides
greater scalability, performance, and control.

The new GRE implementation supports nearly all features of the
Linux implementation.  It does not currently support multicast,
NBMA tunnels, or non-Ethernet devices.

This implementation of GRE has several important benefits over the
existing Linux implementation.  The first is simply that is not a
Linux device.  Linux devices are fairly heavy weight both in terms
of memory consumption and interactions with the rest of the system
(notifications, processes polling, etc.).  There are many pieces of
code that make assumptions about the maximum reasonable number of
ports.  Simply maintaining the state of several thousand devices is
enough to full occupy the CPU.

A tighter coupling between the GRE implementation and datapath
also allows more flexibility.  The key can be set and retrieved
from the flow table, which allows even greater scalability.
There will probably be additional use cases in the future.

commit ff6402a9f0d9ee4c29567b62938c82924d502b92
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=ff6402a9f0d9ee4c29567b62938c82924d502b92
Author: Jesse Gross <jesse at nicira.com>
datapath: Add function to copy skb checksum bits.
Some kernels don't copy the checksum offload state in the skb
header when doing different types of copies.  Xen adds even more
fields, which are also not consistently copied.  The result is
uninitialized memory and random outcomes.  This adds a function to
consistently copy these bits across all kernel versions.

commit 2d2a0e309f2464fd2cf77a328b15acc62cfc7c09
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=2d2a0e309f2464fd2cf77a328b15acc62cfc7c09
Author: Jesse Gross <jesse at nicira.com>
datapath: Add skb_csum_help compatibility function.
Later kernel versions remove the direction argument from
skb_checksum_help.  This provides a compatibility function so we
can have consistent syntax across versions.

Since CHECKSUM_PARTIAL is the same as CHECKSUM_HW on older kernels
this allows a unified code path for computing checksums.

commit 8d5ebd839b86463c72239fe972001e4f1a367a7b
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=8d5ebd839b86463c72239fe972001e4f1a367a7b
Author: Jesse Gross <jesse at nicira.com>
datapath: Genericize hash table.
Currently the flow hash table assumes that it is storing flows.
However, we will need additional types of hash tables in the
future so remove assumptions about flows and convert the datapath
to use the new table.

commit 3abc4a1a6c29ebecffeecedd582c64e0bb7d4c53
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=3abc4a1a6c29ebecffeecedd582c64e0bb7d4c53
Author: Jesse Gross <jesse at nicira.com>
dpif-linux: Clean up vports that are no longer in config.
If the config changes while ovs-vswitchd is not running it is possible
that there could be some vports which are no longer needed but won't
be destroyed when closed because they aren't open.  This deletes
unneeded vports at the same time that we clean up unneeded datapaths.

commit fdd8224884cbc92dd6e42f617018625f6a6d4c96
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=fdd8224884cbc92dd6e42f617018625f6a6d4c96
Author: Jesse Gross <jesse at nicira.com>
netdev: Add function netdev_is_open().
Add netdev_is_open(), which checks to see if a given netdev is
currently open.  It will be used to assist in cleaning up old ports
that are no longer in use.

commit f2459fe7d91c4c325dfaa3ed18f56200b63ae27e
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=f2459fe7d91c4c325dfaa3ed18f56200b63ae27e
Author: Jesse Gross <jesse at nicira.com>
datapath: Add generic virtual port layer.
Currently the datapath directly accesses devices through their
Linux functions.  Obviously this doesn't work for virtual devices
that are not backed by an actual Linux device.  This creates a
new virtual port layer which handles all interaction with devices.

The existing support for Linux devices was then implemented on top
of this layer as two device types.  It splits out and renames dp_dev
to internal_dev.  There were several places where datapath devices
had to handled in a special manner and this cleans that up by putting
all the special casing in a single location.

commit 6b8a6c529b2bd8ce03584b132263dca5ac932c1b
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=6b8a6c529b2bd8ce03584b132263dca5ac932c1b
Author: Jesse Gross <jesse at nicira.com>
datapath: Don't read net namespace on kernels that don't use them.
Use macros to eliminate the network namespace argument before it
gets to the compiler.  This allows us to specify a namespace on
kernels that know about them and prevent the compiler from complaining
on kernels that don't.

commit b5e80aecc4b10f73196f272598bac0644f196471
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=b5e80aecc4b10f73196f272598bac0644f196471
Author: Jesse Gross <jesse at nicira.com>
datapath: Add rtnl_is_locked compatibility function.
rtnl_is_locked wasn't added until 2.6.26 so provide an implementation
of it.

commit c5ccff0db1e0ef75e36a414e8c0c2b8421cdeda8
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=c5ccff0db1e0ef75e36a414e8c0c2b8421cdeda8
Author: Jesse Gross <jesse at nicira.com>
datapath: Add dev_get_stats compatibility function.
The dev_get_stats function wasn't added until 2.6.29 so provide
a replacement for it.

commit 659586efcf6f9539282da9447007897907c41112
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=659586efcf6f9539282da9447007897907c41112
Author: Jesse Gross <jesse at nicira.com>
tunneling: Add support for tunnel ID.
Add a tun_id field which contains the ID of the encapsulating tunnel
on which a packet was received (0 if not received on a tunnel).  Also
add an action which allows the tunnel ID to be set for outgoing
packets.  At this point there aren't any tunnel implementations so
these fields don't have any effect.

The matching is exposed to OpenFlow by overloading the high 32 bits
of the cookie as the tunnel ID.  ovs-ofctl is capable of turning
on this special behavior using a new "tun-cookie" command but this
command is intentially undocumented to avoid it being used without
a full understanding of the consequences.


Summary of changes:
 acinclude.m4                                       |   11 -
 datapath/Modules.mk                                |   14 +-
 datapath/actions.c                                 |   77 +-
 datapath/actions.h                                 |   22 +-
 datapath/datapath.c                                |  579 +++---
 datapath/datapath.h                                |  103 +-
 datapath/dp_dev.c                                  |  271 ---
 datapath/dp_dev.h                                  |   34 -
 datapath/dp_notify.c                               |   29 +-
 datapath/dp_sysfs.h                                |    8 +-
 datapath/dp_sysfs_dp.c                             |   85 +-
 datapath/dp_sysfs_if.c                             |   66 +-
 datapath/flow.c                                    |   38 +-
 datapath/flow.h                                    |    9 +-
 datapath/linux-2.6/Makefile.main.in                |    1 -
 datapath/linux-2.6/Modules.mk                      |   38 +-
 ...f_core-ip_gre.c => addrconf_core-openvswitch.c} |    0 
 datapath/linux-2.6/compat-2.6/dev-ip_gre.c         |   63 -
 .../linux-2.6/compat-2.6/include/linux/netdevice.h |   12 +
 .../linux-2.6/compat-2.6/include/linux/rtnetlink.h |   28 +-
 datapath/linux-2.6/compat-2.6/include/net/ipip.h   |   85 -
 .../compat-2.6/include/net/net_namespace.h         |   29 -
 .../compat-2.6/include/net/netns/generic.h         |   19 -
 datapath/linux-2.6/compat-2.6/ip_gre.c             | 2356 --------------------
 ...{ip_output-ip_gre.c => ip_output-openvswitch.c} |    0 
 .../linux-2.6/compat-2.6/net_namespace-ip_gre.c    |  117 -
 datapath/table.c                                   |  392 ++--
 datapath/table.h                                   |   44 +
 datapath/vport-gre.c                               | 1390 ++++++++++++
 datapath/vport-internal_dev.c                      |  368 +++
 datapath/vport-internal_dev.h                      |   20 +
 datapath/vport-netdev.c                            |  380 ++++
 datapath/vport-netdev.h                            |   41 +
 datapath/vport.c                                   | 1171 ++++++++++
 datapath/vport.h                                   |  235 ++
 debian/openvswitch-switch.init                     |    3 -
 include/openflow/nicira-ext.h                      |   37 +-
 include/openvswitch/datapath-protocol.h            |   69 +-
 include/openvswitch/gre.h                          |   48 +-
 lib/automake.mk                                    |    1 +
 lib/classifier.c                                   |   20 +-
 lib/classifier.h                                   |   13 +-
 lib/dhcp-client.c                                  |    2 +-
 lib/dpif-linux.c                                   |   47 +-
 lib/dpif-netdev.c                                  |    4 +-
 lib/flow.c                                         |   58 +-
 lib/flow.h                                         |   12 +-
 lib/learning-switch.c                              |    2 +-
 lib/netdev-gre.c                                   |  476 ++++
 lib/netdev-linux.c                                 |  570 +-----
 lib/netdev-provider.h                              |   11 +-
 lib/netdev.c                                       |   39 +-
 lib/netdev.h                                       |    1 +
 lib/odp-util.c                                     |    3 +
 lib/ofp-print.c                                    |   14 +-
 lib/vconn.c                                        |    3 +-
 lib/vlog-modules.def                               |    1 +
 ofproto/fail-open.c                                |    4 +-
 ofproto/in-band.c                                  |    2 +-
 ofproto/ofproto-sflow.c                            |    2 +-
 ofproto/ofproto.c                                  |   87 +-
 tests/test-classifier.c                            |   11 +-
 tests/test-flows.c                                 |    4 +-
 utilities/ovs-ofctl.8.in                           |   14 +-
 utilities/ovs-ofctl.c                              |   29 +-
 vswitchd/bridge.c                                  |    5 +-
 xenserver/etc_init.d_openvswitch                   |    6 -
 xenserver/openvswitch-xen.spec                     |    3 -
 68 files changed, 5344 insertions(+), 4392 deletions(-)
 delete mode 100644 datapath/dp_dev.c
 delete mode 100644 datapath/dp_dev.h
 rename datapath/linux-2.6/compat-2.6/{addrconf_core-ip_gre.c => addrconf_core-openvswitch.c} (100%)
 delete mode 100644 datapath/linux-2.6/compat-2.6/dev-ip_gre.c
 delete mode 100644 datapath/linux-2.6/compat-2.6/include/net/ipip.h
 delete mode 100644 datapath/linux-2.6/compat-2.6/include/net/net_namespace.h
 delete mode 100644 datapath/linux-2.6/compat-2.6/include/net/netns/generic.h
 delete mode 100644 datapath/linux-2.6/compat-2.6/ip_gre.c
 rename datapath/linux-2.6/compat-2.6/{ip_output-ip_gre.c => ip_output-openvswitch.c} (100%)
 delete mode 100644 datapath/linux-2.6/compat-2.6/net_namespace-ip_gre.c
 create mode 100644 datapath/table.h
 create mode 100644 datapath/vport-gre.c
 create mode 100644 datapath/vport-internal_dev.c
 create mode 100644 datapath/vport-internal_dev.h
 create mode 100644 datapath/vport-netdev.c
 create mode 100644 datapath/vport-netdev.h
 create mode 100644 datapath/vport.c
 create mode 100644 datapath/vport.h
 create mode 100644 lib/netdev-gre.c

Open vSwitch

More information about the git mailing list